From 8fc62874325e9707be4ee3c7519534ec1771c6ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 14:47:15 +0100 Subject: [PATCH 01/53] Create invite-guest.yml --- .github/workflows/invite-guest.yml | 133 +++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 .github/workflows/invite-guest.yml diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml new file mode 100644 index 00000000..441ba85f --- /dev/null +++ b/.github/workflows/invite-guest.yml @@ -0,0 +1,133 @@ +name: Invite Guest +on: + workflow_dispatch: + inputs: + name: + description: Name of user + required: true + email: + description: E-mail address to send invitation to + required: true + roles: + description: Comma-separated list of roles + required: true +env: + AUTH0_TENANT: shape-docs-dev + AUTH0_REGION: eu + REDIRECT_URL: https://staging.docs.shapetools.io +jobs: + build: + name: Invite Guest + runs-on: ubuntu-latest + steps: + - name: Install 1Password CLI + uses: 1password/install-cli-action@v1 + - name: Install Secrets + run: | + AUTH0_MANAGEMENT_CLIENT_ID=$(op read "op://Shape Docs GitHub Actions/Auth0 Management API Client ID/password") + AUTH0_MANAGEMENT_CLIENT_SECRET=$(op read "op://Shape Docs GitHub Actions/Auth0 Management API Client Secret/password") + echo "AUTH0_MANAGEMENT_CLIENT_ID=${AUTH0_MANAGEMENT_CLIENT_ID}" >> $GITHUB_ENV + echo "AUTH0_MANAGEMENT_CLIENT_SECRET=${AUTH0_MANAGEMENT_CLIENT_SECRET}" >> $GITHUB_ENV + echo "::add-mask::${AUTH0_MANAGEMENT_CLIENT_ID}" + echo "::add-mask::${AUTH0_MANAGEMENT_CLIENT_SECRET}" + - name: Send Invitation + run: | + AUTH0_MANAGEMENT_DOMAIN="${AUTH0_TENANT}.${AUTH0_REGION}.auth0.com" + USER_NAME="${{ github.event.inputs.name }}" + USER_EMAIL="${{ github.event.inputs.email }}" + USER_PASSWORD=$(LC_ALL=C tr -dc A-Za-z0-9 Date: Thu, 2 Nov 2023 14:48:56 +0100 Subject: [PATCH 02/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index 441ba85f..88d53461 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -15,6 +15,7 @@ env: AUTH0_TENANT: shape-docs-dev AUTH0_REGION: eu REDIRECT_URL: https://staging.docs.shapetools.io + OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN_SHAPE_DOCS }} jobs: build: name: Invite Guest From 41c8bdb2cbc659ecd992b962f6feb935e55ba195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 14:53:30 +0100 Subject: [PATCH 03/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index 88d53461..8ebad79f 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -113,7 +113,7 @@ jobs: --header "Content-Type: application/json"\ --data "${ASSIGN_ROLES_REQUEST_BODY}" - if [ -z "EXISTING_USER_ID" ]; then + if [ -z "$EXISTING_USER_ID" ]; then # Send the user an e-mail asking to change their password. PASSWORD_CHANGE_REQUEST_BODY=$( jq -n '{"email": $USER_EMAIL,"connection": "Username-Password-Authentication"}'\ From d21cc4b407dd3bc034b8eba82f5646c6325dc211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 14:57:46 +0100 Subject: [PATCH 04/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index 8ebad79f..f52a716f 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -36,7 +36,7 @@ jobs: AUTH0_MANAGEMENT_DOMAIN="${AUTH0_TENANT}.${AUTH0_REGION}.auth0.com" USER_NAME="${{ github.event.inputs.name }}" USER_EMAIL="${{ github.event.inputs.email }}" - USER_PASSWORD=$(LC_ALL=C tr -dc A-Za-z0-9 Date: Thu, 2 Nov 2023 15:00:00 +0100 Subject: [PATCH 05/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index f52a716f..19bfcd31 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -112,7 +112,9 @@ jobs: --header "Authorization: Bearer ${TOKEN}"\ --header "Content-Type: application/json"\ --data "${ASSIGN_ROLES_REQUEST_BODY}" - + + URLENCODED_USER_ID=$(jq -rn --arg USER_ID "${USER_ID}" '$USER_ID|@uri') + USER_MANAGEMENT_URL="https://manage.auth0.com/dashboard/${AUTH0_REGION}/${AUTH0_TENANT}/users/${URLENCODED_USER_ID}" if [ -z "$EXISTING_USER_ID" ]; then # Send the user an e-mail asking to change their password. PASSWORD_CHANGE_REQUEST_BODY=$( @@ -127,8 +129,8 @@ jobs: -o /dev/null echo "${USER_NAME} (${USER_EMAIL}) has been invited and can be managed by visiting:" - echo "https://manage.auth0.com/dashboard/${AUTH0_REGION}/${AUTH0_TENANT}/users/${USER_ID}" + echo $USER_MANAGEMENT_URL else echo "${USER_NAME} (${USER_EMAIL}) was already invited but has been updated and can be managed by visiting:" - echo "https://manage.auth0.com/dashboard/${AUTH0_REGION}/${AUTH0_TENANT}/users/${USER_ID}" + echo $USER_MANAGEMENT_URL fi From 76e4d1dabd45424fab2587fa54018a5ee3904f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 15:02:17 +0100 Subject: [PATCH 06/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index 19bfcd31..9f7beb1a 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -83,7 +83,8 @@ jobs: IFS=',' read -ra UNTRIMMED_ROLES <<< "$STR_ROLES" for role in "${UNTRIMMED_ROLES[@]}"; do trimmed_role=$(echo "$role" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - ROLES+=("$trimmed_role") + lowercase_role=$(echo "${trimmed_role}" | awk '{print tolower($0)}') + ROLES+=("$lowercase_role") done for role in "${ROLES[@]}"; do body=$(jq -n '{"name":$ROLE,"description":$ROLE}' --arg "ROLE" "${role}") From 7af4ebe7fd57b91c6fed0358b5e22157cfefbb9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 15:06:36 +0100 Subject: [PATCH 07/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index 9f7beb1a..8c555977 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -128,10 +128,14 @@ jobs: --header "Content-Type: application/json"\ --data "${PASSWORD_CHANGE_REQUEST_BODY}"\ -o /dev/null - + + echo "::group::Created User" echo "${USER_NAME} (${USER_EMAIL}) has been invited and can be managed by visiting:" echo $USER_MANAGEMENT_URL + echo "::endgroup::" else + echo "::group::Updated User" echo "${USER_NAME} (${USER_EMAIL}) was already invited but has been updated and can be managed by visiting:" echo $USER_MANAGEMENT_URL + echo "::endgroup::" fi From b46389e004dfa1c843b7faf3d01a32579c96592e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 15:18:23 +0100 Subject: [PATCH 08/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index 8c555977..f224d3c1 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -2,6 +2,13 @@ name: Invite Guest on: workflow_dispatch: inputs: + environment: + type: choice + description: Environment + options: + - production + - staging + required: true name: description: Name of user required: true @@ -12,9 +19,6 @@ on: description: Comma-separated list of roles required: true env: - AUTH0_TENANT: shape-docs-dev - AUTH0_REGION: eu - REDIRECT_URL: https://staging.docs.shapetools.io OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN_SHAPE_DOCS }} jobs: build: @@ -23,10 +27,26 @@ jobs: steps: - name: Install 1Password CLI uses: 1password/install-cli-action@v1 + - name: Configure for Production + if: "${{ github.event.inputs.environment == 'production' }}" + run: | + echo "AUTH0_TENANT=shape-docs" >> $GITHUB_ENV + echo "AUTH0_REGION=eu" >> $GITHUB_ENV + echo "REDIRECT_URL=https://docs.shapetools.io" >> $GITHUB_ENV + echo "AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client ID/password" >> $GITHUB_ENV + echo "AUTH0_MANAGEMENT_CLIENT_SECRET_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client Secret/password" >> $GITHUB_ENV + - name: Configure for Staging + if: "${{ github.event.inputs.environment == 'staging' }}" + run: | + echo "AUTH0_TENANT=shape-docs-dev" >> $GITHUB_ENV + echo "AUTH0_REGION=eu" >> $GITHUB_ENV + echo "REDIRECT_URL=https://staging.docs.shapetools.io" >> $GITHUB_ENV + echo "AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client ID (Staging)/password" >> $GITHUB_ENV + echo "AUTH0_MANAGEMENT_CLIENT_SECRET_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client Secret (Staging)/password" >> $GITHUB_ENV - name: Install Secrets run: | - AUTH0_MANAGEMENT_CLIENT_ID=$(op read "op://Shape Docs GitHub Actions/Auth0 Management API Client ID/password") - AUTH0_MANAGEMENT_CLIENT_SECRET=$(op read "op://Shape Docs GitHub Actions/Auth0 Management API Client Secret/password") + AUTH0_MANAGEMENT_CLIENT_ID=$(op read "${AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY}") + AUTH0_MANAGEMENT_CLIENT_SECRET=$(op read "${AUTH0_MANAGEMENT_CLIENT_SECRET_OP_KEY}") echo "AUTH0_MANAGEMENT_CLIENT_ID=${AUTH0_MANAGEMENT_CLIENT_ID}" >> $GITHUB_ENV echo "AUTH0_MANAGEMENT_CLIENT_SECRET=${AUTH0_MANAGEMENT_CLIENT_SECRET}" >> $GITHUB_ENV echo "::add-mask::${AUTH0_MANAGEMENT_CLIENT_ID}" From b956f713a4024de6ba287005427747c6fe7faed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 15:20:27 +0100 Subject: [PATCH 09/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index f224d3c1..b9d30873 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -41,8 +41,8 @@ jobs: echo "AUTH0_TENANT=shape-docs-dev" >> $GITHUB_ENV echo "AUTH0_REGION=eu" >> $GITHUB_ENV echo "REDIRECT_URL=https://staging.docs.shapetools.io" >> $GITHUB_ENV - echo "AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client ID (Staging)/password" >> $GITHUB_ENV - echo "AUTH0_MANAGEMENT_CLIENT_SECRET_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client Secret (Staging)/password" >> $GITHUB_ENV + echo "AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client ID Staging/password" >> $GITHUB_ENV + echo "AUTH0_MANAGEMENT_CLIENT_SECRET_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client Secret Staging/password" >> $GITHUB_ENV - name: Install Secrets run: | AUTH0_MANAGEMENT_CLIENT_ID=$(op read "${AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY}") From 38f49214988989549d626bd2f22d746e0c0d6396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 15:23:13 +0100 Subject: [PATCH 10/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index b9d30873..5aee2e8b 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -99,7 +99,7 @@ jobs: USER_ID=$(echo $CREATE_USER_RESPONSE | jq -r ".user_id") fi - # Assign roles to the user. + # Create all the roles. IFS=',' read -ra UNTRIMMED_ROLES <<< "$STR_ROLES" for role in "${UNTRIMMED_ROLES[@]}"; do trimmed_role=$(echo "$role" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') From 198a29cb36c4d69b412d6ed301bab3eacf4d3b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 17:43:40 +0100 Subject: [PATCH 11/53] Adds invite-user action --- .github/actions/invite-user/action.yml | 12 + .github/actions/invite-user/dist/index.js | 16 ++ .github/actions/invite-user/package-lock.json | 217 ++++++++++++++++++ .github/actions/invite-user/package.json | 20 ++ .github/actions/invite-user/src/Action.ts | 87 +++++++ .../actions/invite-user/src/Logger/ILogger.ts | 4 + .../actions/invite-user/src/Logger/Logger.ts | 12 + .../PasswordGenerator/IPasswordGenerator.ts | 3 + .../PasswordGenerator/PasswordGenerator.ts | 14 ++ .../src/RoleNameParser/IRoleNameParser.ts | 3 + .../src/RoleNameParser/RoleNameParser.ts | 9 + .../invite-user/src/StateStore/IStateStore.ts | 3 + .../src/StateStore/KeyValueStateStore.ts | 27 +++ .../src/UserClient/Auth0UserClient.ts | 119 ++++++++++ .../invite-user/src/UserClient/IUserClient.ts | 17 ++ .github/actions/invite-user/src/getOptions.ts | 10 + .github/actions/invite-user/src/index.ts | 42 ++++ .github/actions/invite-user/tsconfig.json | 15 ++ .gitignore | 2 + 19 files changed, 632 insertions(+) create mode 100644 .github/actions/invite-user/action.yml create mode 100644 .github/actions/invite-user/dist/index.js create mode 100644 .github/actions/invite-user/package-lock.json create mode 100644 .github/actions/invite-user/package.json create mode 100644 .github/actions/invite-user/src/Action.ts create mode 100644 .github/actions/invite-user/src/Logger/ILogger.ts create mode 100644 .github/actions/invite-user/src/Logger/Logger.ts create mode 100644 .github/actions/invite-user/src/PasswordGenerator/IPasswordGenerator.ts create mode 100644 .github/actions/invite-user/src/PasswordGenerator/PasswordGenerator.ts create mode 100644 .github/actions/invite-user/src/RoleNameParser/IRoleNameParser.ts create mode 100644 .github/actions/invite-user/src/RoleNameParser/RoleNameParser.ts create mode 100644 .github/actions/invite-user/src/StateStore/IStateStore.ts create mode 100644 .github/actions/invite-user/src/StateStore/KeyValueStateStore.ts create mode 100644 .github/actions/invite-user/src/UserClient/Auth0UserClient.ts create mode 100644 .github/actions/invite-user/src/UserClient/IUserClient.ts create mode 100644 .github/actions/invite-user/src/getOptions.ts create mode 100644 .github/actions/invite-user/src/index.ts create mode 100644 .github/actions/invite-user/tsconfig.json diff --git a/.github/actions/invite-user/action.yml b/.github/actions/invite-user/action.yml new file mode 100644 index 00000000..668b0b2c --- /dev/null +++ b/.github/actions/invite-user/action.yml @@ -0,0 +1,12 @@ +name: Select Xcode Versions +description: Selects a version of Xcode. +branding: + icon: smartphone + color: blue +inputs: + version: + description: The version of Xcode to install. + required: true +runs: + using: node16 + main: dist/index.js diff --git a/.github/actions/invite-user/dist/index.js b/.github/actions/invite-user/dist/index.js new file mode 100644 index 00000000..90452b89 --- /dev/null +++ b/.github/actions/invite-user/dist/index.js @@ -0,0 +1,16 @@ +(()=>{var __webpack_modules__={3658:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});class Action{constructor(e){this.stateStore=e.stateStore;this.logger=e.logger;this.userClient=e.userClient;this.passwordGenerator=e.passwordGenerator;this.roleNameParser=e.roleNameParser}run(e){return n(this,void 0,void 0,(function*(){if(!this.stateStore.isPost){yield this.runMain(e);this.stateStore.isPost=true}}))}runMain(e){return n(this,void 0,void 0,(function*(){if(!e.name||e.name.length==0){throw new Error("No name supplied.")}if(!e.email||e.email.length==0){throw new Error("No e-mail supplied.")}if(!e.roles||e.roles.length==0){throw new Error("No roles supplied.")}const t=this.roleNameParser.parse(e.roles);if(t.length==0){throw new Error("No roles supplied.")}const n=yield this.userClient.getUser({email:e.email});let s=n;if(!n){const t=this.passwordGenerator.generatePassword();const n=yield this.userClient.createUser({name:e.name,email:e.email,password:t});s=n}if(!s){throw new Error("Could not get an existing user or create a new user.")}const i=yield this.userClient.createRoles({roleNames:t});if(i.length==0){throw new Error("Received an empty set of roles.")}const r=i.map((e=>e.id));yield this.userClient.assignRolesToUser({userID:s.id,roleIDs:r});if(n){yield this.userClient.sendChangePasswordEmail({email:s.email});this.logger.log(`${s.id} (${s.email}) has been invited.`)}else{this.logger.log(`${s.id} (${s.email}) has been updated.`)}}))}}t["default"]=Action},8245:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(n(2186));class Logger{log(e){console.log(e)}error(e){o.setFailed(e)}}t["default"]=Logger},2127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class PasswordGenerator{generatePassword(){let e="";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$";const n=18;for(let s=1;s<=n;s++){const n=Math.floor(Math.random()*t.length+1);e+=t.charAt(n)}return e}}t["default"]=PasswordGenerator},3834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class RoleNameParser{parse(e){return e.split(",").map((e=>e.trim().toLowerCase())).filter((e=>e.length>0))}}t["default"]=RoleNameParser},9531:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n={IS_POST:"isPost"};class KeyValueStateStore{constructor(e){this.writerReader=e;this.isPost=false}get isPost(){return!!this.writerReader.getState(n.IS_POST)}set isPost(e){this.writerReader.saveState(n.IS_POST,e)}}t["default"]=KeyValueStateStore},1485:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=i(n(8757));const o=n(4712);class Auth0UserClient{constructor(e){this.config=e;this.managementClient=new o.ManagementClient({domain:e.domain,clientId:e.clientId,clientSecret:e.clientSecret})}getUser(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.usersByEmail.getByEmail({email:e.email});if(t.data.length==0){return null}const n=t.data[0];return{id:n.user_id,email:n.email}}))}createUser(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.users.create({connection:"Username-Password-Authentication",name:e.name,email:e.email,email_verified:true,password:e.password,app_metadata:{has_pending_invitation:true}});return{id:t.data.user_id,email:t.data.email}}))}createRoles(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.roles.getAll();const n=t.data;const s=n.filter((t=>e.roleNames.includes(t.name))).map((e=>({id:e.id,name:e.name})));const i=e.roleNames.filter((e=>{const t=s.find((t=>t.name==e));return t==null}));const r=yield Promise.all(i.map((e=>this.managementClient.roles.create({name:e}))));const o=r.map((e=>({id:e.data.id,name:e.data.name})));return s.concat(o)}))}assignRolesToUser(e){return s(this,void 0,void 0,(function*(){yield this.managementClient.users.assignRoles({id:e.userID},{roles:e.roleIDs})}))}sendChangePasswordEmail(e){return s(this,void 0,void 0,(function*(){const t=yield this.getToken();yield r.default.post(this.getURL("/dbconnections/change_password"),{email:e.email,connection:"Username-Password-Authentication"},{headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}})}))}getToken(){return s(this,void 0,void 0,(function*(){const e=yield r.default.post(this.getURL("/oauth/token"),{grant_type:"client_credentials",client_id:this.config.clientId,client_secret:this.config.clientSecret,audience:`https://${this.config.domain}/api/v2/`},{headers:{"Content-Type":"application/x-www-form-urlencoded"}});return e.data.access_token}))}getURL(e){return`https://${this.config.domain}${e}`}}t["default"]=Auth0UserClient},8873:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(n(2186));function getOptions(){return{name:o.getInput("name"),email:o.getInput("email"),roles:o.getInput("roles")}}t["default"]=getOptions},4822:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const A=r(n(2186));const a=o(n(3658));const c=o(n(1485));const u=o(n(8873));const l=o(n(8245));const d=o(n(9531));const p=o(n(2127));const g=o(n(3834));const{AUTH0_MANAGEMENT_CLIENT_ID:h,AUTH0_MANAGEMENT_CLIENT_SECRET:f,AUTH0_MANAGEMENT_CLIENT_DOMAIN:E}=process.env;if(!h||h.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}else if(!f||f.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}else if(!E||E.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}const m=new d.default(A);const C=new l.default;const Q=new c.default({clientId:h,clientSecret:f,domain:E});const I=new p.default;const B=new g.default;const y=new a.default({stateStore:m,logger:C,userClient:Q,passwordGenerator:I,roleNameParser:B});y.run((0,u.default)()).catch((e=>{C.error(e.toString())}))},7351:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=r(n(2037));const A=n(5278);function issueCommand(e,t,n){const s=new Command(e,t,n);process.stdout.write(s.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const a="::";class Command{constructor(e,t,n){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=n}toString(){let e=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const s=this.properties[n];if(s){if(t){t=false}else{e+=","}e+=`${n}=${escapeProperty(s)}`}}}}e+=`${a}${escapeData(this.message)}`;return e}}function escapeData(e){return A.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return A.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const A=n(7351);const a=n(717);const c=n(5278);const u=r(n(2037));const l=r(n(1017));const d=n(8041);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const n=c.toCommandValue(t);process.env[e]=n;const s=process.env["GITHUB_ENV"]||"";if(s){return a.issueFileCommand("ENV",a.prepareKeyValueMessage(e,t))}A.issueCommand("set-env",{name:e},n)}t.exportVariable=exportVariable;function setSecret(e){A.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){a.issueFileCommand("PATH",e)}else{A.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${l.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const n=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!n){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return n}return n.trim()}t.getInput=getInput;function getMultilineInput(e,t){const n=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return n}return n.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const n=["true","True","TRUE"];const s=["false","False","FALSE"];const i=getInput(e,t);if(n.includes(i))return true;if(s.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const n=process.env["GITHUB_OUTPUT"]||"";if(n){return a.issueFileCommand("OUTPUT",a.prepareKeyValueMessage(e,t))}process.stdout.write(u.EOL);A.issueCommand("set-output",{name:e},c.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){A.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){A.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){A.issueCommand("error",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){A.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){A.issueCommand("notice",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){A.issue("group",e)}t.startGroup=startGroup;function endGroup(){A.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let n;try{n=yield t()}finally{endGroup()}return n}))}t.group=group;function saveState(e,t){const n=process.env["GITHUB_STATE"]||"";if(n){return a.issueFileCommand("STATE",a.prepareKeyValueMessage(e,t))}A.issueCommand("save-state",{name:e},c.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var g=n(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return g.summary}});var h=n(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return h.markdownSummary}});var f=n(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return f.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return f.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return f.toPlatformPath}})},717:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=r(n(7147));const A=r(n(2037));const a=n(5840);const c=n(5278);function issueFileCommand(e,t){const n=process.env[`GITHUB_${e}`];if(!n){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!o.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}o.appendFileSync(n,`${c.toCommandValue(t)}${A.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const n=`ghadelimiter_${a.v4()}`;const s=c.toCommandValue(t);if(e.includes(n)){throw new Error(`Unexpected input: name should not contain the delimiter "${n}"`)}if(s.includes(n)){throw new Error(`Unexpected input: value should not contain the delimiter "${n}"`)}return`${e}<<${n}${A.EOL}${s}${A.EOL}${n}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const i=n(6255);const r=n(5526);const o=n(2186);class OidcClient{static createHttpClient(e=true,t=10){const n={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new r.BearerCredentialHandler(OidcClient.getRequestToken())],n)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return s(this,void 0,void 0,(function*(){const n=OidcClient.createHttpClient();const s=yield n.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const i=(t=s.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return s(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const n=encodeURIComponent(e);t=`${t}&audience=${n}`}o.debug(`ID token url is ${t}`);const n=yield OidcClient.getCall(t);o.setSecret(n);return n}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=r(n(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,o.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const i=n(2037);const r=n(7147);const{access:o,appendFile:A,writeFile:a}=r.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return s(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield o(e,r.constants.R_OK|r.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,n={}){const s=Object.entries(n).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${s}>`}return`<${e}${s}>${t}`}write(e){return s(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const n=yield this.filePath();const s=t?a:A;yield s(n,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return s(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(i.EOL)}addCodeBlock(e,t){const n=Object.assign({},t&&{lang:t});const s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,t=false){const n=t?"ol":"ul";const s=e.map((e=>this.wrap("li",e))).join("");const i=this.wrap(n,s);return this.addRaw(i).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:n,colspan:s,rowspan:i}=e;const r=t?"th":"td";const o=Object.assign(Object.assign({},s&&{colspan:s}),i&&{rowspan:i});return this.wrap(r,n,o)})).join("");return this.wrap("tr",t)})).join("");const n=this.wrap("table",t);return this.addRaw(n).addEOL()}addDetails(e,t){const n=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(n).addEOL()}addImage(e,t,n){const{width:s,height:i}=n||{};const r=Object.assign(Object.assign({},s&&{width:s}),i&&{height:i});const o=this.wrap("img",null,Object.assign({src:e,alt:t},r));return this.addRaw(o).addEOL()}addHeading(e,t){const n=`h${t}`;const s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1";const i=this.wrap(s,e);return this.addRaw(i).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const n=Object.assign({},t&&{cite:t});const s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,t){const n=this.wrap("a",e,{href:t});return this.addRaw(n).addEOL()}}const c=new Summary;t.markdownSummary=c;t.summary=c},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},5526:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const A=r(n(3685));const a=r(n(5687));const c=r(n(9835));const u=r(n(4294));const l=n(1773);var d;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(d||(t.HttpCodes=d={}));var p;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(p||(t.Headers=p={}));var g;(function(e){e["ApplicationJson"]="application/json"})(g||(t.MediaTypes=g={}));function getProxyUrl(e){const t=c.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const f=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const E=["OPTIONS","GET","DELETE","HEAD"];const m=10;const C=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return o(this,void 0,void 0,(function*(){return new Promise((e=>o(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return o(this,void 0,void 0,(function*(){return new Promise((e=>o(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,n||{})}))}patch(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,n||{})}))}put(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,n||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,n,s){return o(this,void 0,void 0,(function*(){return this.request(e,t,n,s)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[p.Accept]=this._getExistingOrDefaultHeader(t,p.Accept,g.ApplicationJson);const n=yield this.get(e,t);return this._processResponse(n,this.requestOptions)}))}postJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.post(e,s,n);return this._processResponse(i,this.requestOptions)}))}putJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.put(e,s,n);return this._processResponse(i,this.requestOptions)}))}patchJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.patch(e,s,n);return this._processResponse(i,this.requestOptions)}))}request(e,t,n,s){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const i=new URL(t);let r=this._prepareRequest(e,i,s);const o=this._allowRetries&&E.includes(e)?this._maxRetries+1:1;let A=0;let a;do{a=yield this.requestRaw(r,n);if(a&&a.message&&a.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(a)){e=t;break}}if(e){return e.handleAuthentication(this,r,n)}else{return a}}let t=this._maxRedirects;while(a.message.statusCode&&h.includes(a.message.statusCode)&&this._allowRedirects&&t>0){const o=a.message.headers["location"];if(!o){break}const A=new URL(o);if(i.protocol==="https:"&&i.protocol!==A.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield a.readBody();if(A.hostname!==i.hostname){for(const e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}r=this._prepareRequest(e,A,s);a=yield this.requestRaw(r,n);t--}if(!a.message.statusCode||!f.includes(a.message.statusCode)){return a}A+=1;if(A{function callbackForResult(e,t){if(e){s(e)}else if(!t){s(new Error("Unknown error"))}else{n(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,n){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let s=false;function handleResult(e,t){if(!s){s=true;n(e,t)}}const i=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let r;i.on("socket",(e=>{r=e}));i.setTimeout(this._socketTimeout||3*6e4,(()=>{if(r){r.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));i.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){i.end()}));t.pipe(i)}else{i.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const n=c.getProxyUrl(t);const s=n&&n.hostname;if(!s){return}return this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){const s={};s.parsedUrl=t;const i=s.parsedUrl.protocol==="https:";s.httpModule=i?a:A;const r=i?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):r;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(n);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(s.options)}}return s}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,n){let s;if(this.requestOptions&&this.requestOptions.headers){s=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||s||n}_getAgent(e){let t;const n=c.getProxyUrl(e);const s=n&&n.hostname;if(this._keepAlive&&s){t=this._proxyAgent}if(this._keepAlive&&!s){t=this._agent}if(t){return t}const i=e.protocol==="https:";let r=100;if(this.requestOptions){r=this.requestOptions.maxSockets||A.globalAgent.maxSockets}if(n&&n.hostname){const e={maxSockets:r,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})};let s;const o=n.protocol==="https:";if(i){s=o?u.httpsOverHttps:u.httpsOverHttp}else{s=o?u.httpOverHttps:u.httpOverHttp}t=s(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:r};t=i?new a.Agent(e):new A.Agent(e);this._agent=t}if(!t){t=i?a.globalAgent:A.globalAgent}if(i&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let n;if(this._keepAlive){n=this._proxyAgentDispatcher}if(n){return n}const s=e.protocol==="https:";n=new l.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`${t.username}:${t.password}`}));this._proxyAgentDispatcher=n;if(s&&this._ignoreSslError){n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:false})}return n}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(m,e);const t=C*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((n,s)=>o(this,void 0,void 0,(function*(){const i=e.message.statusCode||0;const r={statusCode:i,result:null,headers:{}};if(i===d.NotFound){n(r)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let A;try{A=yield e.readBody();if(A&&A.length>0){if(t&&t.deserializeDates){o=JSON.parse(A,dateTimeDeserializer)}else{o=JSON.parse(A)}r.result=o}r.headers=e.message.headers}catch(e){}if(i>299){let e;if(o&&o.message){e=o.message}else if(A&&A.length>0){e=A}else{e=`Failed request: (${i})`}const t=new HttpClientError(e,i);t.result=r.result;s(t)}else{n(r)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const n=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(n){try{return new URL(n)}catch(e){if(!n.startsWith("http://")&&!n.startsWith("https://"))return new URL(`http://${n}`)}}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const n=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!n){return false}let s;if(e.port){s=Number(e.port)}else if(e.protocol==="http:"){s=80}else if(e.protocol==="https:"){s=443}const i=[e.hostname.toUpperCase()];if(typeof s==="number"){i.push(`${i[0]}:${s}`)}for(const e of n.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||i.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}},2856:(e,t,n)=>{"use strict";const s=n(4492).Writable;const i=n(7261).inherits;const r=n(8534);const o=n(8710);const A=n(333);const a=45;const c=Buffer.from("-");const u=Buffer.from("\r\n");const EMPTY_FN=function(){};function Dicer(e){if(!(this instanceof Dicer)){return new Dicer(e)}s.call(this,e);if(!e||!e.headerFirst&&typeof e.boundary!=="string"){throw new TypeError("Boundary required")}if(typeof e.boundary==="string"){this.setBoundary(e.boundary)}else{this._bparser=undefined}this._headerFirst=e.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:e.partHwm};this._pause=false;const t=this;this._hparser=new A(e);this._hparser.on("header",(function(e){t._inHeader=false;t._part.emit("header",e)}))}i(Dicer,s);Dicer.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){const e=this;process.nextTick((function(){e.emit("error",new Error("Unexpected end of multipart data"));if(e._part&&!e._ignoreData){const t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data"));e._part.push(null);process.nextTick((function(){e._realFinish=true;e.emit("finish");e._realFinish=false}));return}e._realFinish=true;e.emit("finish");e._realFinish=false}))}}else{s.prototype.emit.apply(this,arguments)}};Dicer.prototype._write=function(e,t,n){if(!this._hparser&&!this._bparser){return n()}if(this._headerFirst&&this._isPreamble){if(!this._part){this._part=new o(this._partOpts);if(this._events.preamble){this.emit("preamble",this._part)}else{this._ignore()}}const t=this._hparser.push(e);if(!this._inHeader&&t!==undefined&&t{"use strict";const s=n(5673).EventEmitter;const i=n(7261).inherits;const r=n(9692);const o=n(8534);const A=Buffer.from("\r\n\r\n");const a=/\r\n/g;const c=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function HeaderParser(e){s.call(this);e=e||{};const t=this;this.nread=0;this.maxed=false;this.npairs=0;this.maxHeaderPairs=r(e,"maxHeaderPairs",2e3);this.maxHeaderSize=r(e,"maxHeaderSize",80*1024);this.buffer="";this.header={};this.finished=false;this.ss=new o(A);this.ss.on("info",(function(e,n,s,i){if(n&&!t.maxed){if(t.nread+i-s>=t.maxHeaderSize){i=t.maxHeaderSize-t.nread+s;t.nread=t.maxHeaderSize;t.maxed=true}else{t.nread+=i-s}t.buffer+=n.toString("binary",s,i)}if(e){t._finish()}}))}i(HeaderParser,s);HeaderParser.prototype.push=function(e){const t=this.ss.push(e);if(this.finished){return t}};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 e=this.header;this.header={};this.buffer="";this.finished=true;this.nread=this.npairs=0;this.maxed=false;this.emit("header",e)};HeaderParser.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs){return}const e=this.buffer.split(a);const t=e.length;let n,s;for(var i=0;i{"use strict";const s=n(7261).inherits;const i=n(4492).Readable;function PartStream(e){i.call(this,e)}s(PartStream,i);PartStream.prototype._read=function(e){};e.exports=PartStream},8534:(e,t,n)=>{"use strict";const s=n(5673).EventEmitter;const i=n(7261).inherits;function SBMH(e){if(typeof e==="string"){e=Buffer.from(e)}if(!Buffer.isBuffer(e)){throw new TypeError("The needle has to be a String or a Buffer.")}const t=e.length;if(t===0){throw new Error("The needle cannot be an empty String/Buffer.")}if(t>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(t);this._lookbehind_size=0;this._needle=e;this._bufpos=0;this._lookbehind=Buffer.alloc(t);for(var n=0;n=0){this.emit("info",false,this._lookbehind,0,this._lookbehind_size);this._lookbehind_size=0}else{const n=this._lookbehind_size+r;if(n>0){this.emit("info",false,this._lookbehind,0,n)}this._lookbehind.copy(this._lookbehind,0,n,this._lookbehind_size-n);this._lookbehind_size-=n;e.copy(this._lookbehind,this._lookbehind_size);this._lookbehind_size+=t;this._bufpos=t;return t}}r+=(r>=0)*this._bufpos;if(e.indexOf(n,r)!==-1){r=e.indexOf(n,r);++this.matches;if(r>0){this.emit("info",true,e,this._bufpos,r)}else{this.emit("info",true)}return this._bufpos=r+s}else{r=t-s}while(r0){this.emit("info",false,e,this._bufpos,r{"use strict";const s=n(4492).Writable;const{inherits:i}=n(7261);const r=n(2856);const o=n(415);const A=n(6780);const a=n(4426);function Busboy(e){if(!(this instanceof Busboy)){return new Busboy(e)}if(typeof e!=="object"){throw new TypeError("Busboy expected an options-Object.")}if(typeof e.headers!=="object"){throw new TypeError("Busboy expected an options-Object with headers-attribute.")}if(typeof e.headers["content-type"]!=="string"){throw new TypeError("Missing Content-Type-header.")}const{headers:t,...n}=e;this.opts={autoDestroy:false,...n};s.call(this,this.opts);this._done=false;this._parser=this.getParserByHeaders(t);this._finished=false}i(Busboy,s);Busboy.prototype.emit=function(e){if(e==="finish"){if(!this._done){this._parser?.end();return}else if(this._finished){return}this._finished=true}s.prototype.emit.apply(this,arguments)};Busboy.prototype.getParserByHeaders=function(e){const t=a(e["content-type"]);const n={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:t,preservePath:this.opts.preservePath};if(o.detect.test(t[0])){return new o(this,n)}if(A.detect.test(t[0])){return new A(this,n)}throw new Error("Unsupported Content-Type.")};Busboy.prototype._write=function(e,t,n){this._parser.write(e,n)};e.exports=Busboy;e.exports["default"]=Busboy;e.exports.Busboy=Busboy;e.exports.Dicer=r},415:(e,t,n)=>{"use strict";const{Readable:s}=n(4492);const{inherits:i}=n(7261);const r=n(2856);const o=n(4426);const A=n(9136);const a=n(496);const c=n(9692);const u=/^boundary$/i;const l=/^form-data$/i;const d=/^charset$/i;const p=/^filename$/i;const g=/^name$/i;Multipart.detect=/^multipart\/form-data/i;function Multipart(e,t){let n;let s;const i=this;let h;const f=t.limits;const E=t.isPartAFile||((e,t,n)=>t==="application/octet-stream"||n!==undefined);const m=t.parsedConType||[];const C=t.defCharset||"utf8";const Q=t.preservePath;const I={highWaterMark:t.fileHwm};for(n=0,s=m.length;nR){i.parser.removeListener("part",onPart);i.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(N){const e=N;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(r){let c;let u;let h;let f;let m;let R;let v=0;if(r["content-type"]){h=o(r["content-type"][0]);if(h[0]){c=h[0].toLowerCase();for(n=0,s=h.length;ny){const s=y-v+e.length;if(s>0){n.push(e.slice(0,s))}n.truncated=true;n.bytesRead=y;t.removeAllListeners("data");n.emit("limit");return}else if(!n.push(e)){i._pause=true}n.bytesRead=v};F=function(){_=undefined;n.push(null)}}else{if(x===w){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++x;++D;let n="";let s=false;N=t;k=function(e){if((v+=e.length)>B){const i=B-(v-e.length);n+=e.toString("binary",0,i);s=true;t.removeAllListeners("data")}else{n+=e.toString("binary")}};F=function(){N=undefined;if(n.length){n=A(n,"binary",f)}e.emit("field",u,n,false,s,m,c);--D;checkFinished()}}t._readableState.sync=false;t.on("data",k);t.on("end",F)})).on("error",(function(e){if(_){_.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){F=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const n=this.parser.write(e);if(n&&!this._pause){t()}else{this._needDrain=!n;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){s.call(this,e);this.bytesRead=0;this.truncated=false}i(FileStream,s);FileStream.prototype._read=function(e){};e.exports=Multipart},6780:(e,t,n)=>{"use strict";const s=n(9730);const i=n(9136);const r=n(9692);const o=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const n=t.limits;const i=t.parsedConType;this.boy=e;this.fieldSizeLimit=r(n,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=r(n,"fieldNameSize",100);this.fieldsLimit=r(n,"fields",Infinity);let A;for(var a=0,c=i.length;ao){this._key+=this.decoder.write(e.toString("binary",o,n))}this._state="val";this._hitLimit=false;this._checkingBytes=true;this._val="";this._bytesVal=0;this._valTrunc=false;this.decoder.reset();o=n+1}else if(s!==undefined){++this._fields;let n;const r=this._keyTrunc;if(s>o){n=this._key+=this.decoder.write(e.toString("binary",o,s))}else{n=this._key}this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();if(n.length){this.boy.emit("field",i(n,"binary",this.charset),"",r,false)}o=s+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(r>o){this._key+=this.decoder.write(e.toString("binary",o,r))}o=r;if((this._bytesKey=this._key.length)===this.fieldNameSizeLimit){this._checkingBytes=false;this._keyTrunc=true}}else{if(oo){this._val+=this.decoder.write(e.toString("binary",o,s))}this.boy.emit("field",i(this._key,"binary",this.charset),i(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();o=s+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(r>o){this._val+=this.decoder.write(e.toString("binary",o,r))}o=r;if(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit){this._checkingBytes=false;this._valTrunc=true}}else{if(o0){this.boy.emit("field",i(this._key,"binary",this.charset),"",this._keyTrunc,false)}else if(this._state==="val"){this.boy.emit("field",i(this._key,"binary",this.charset),i(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc)}this.boy._done=true;this.boy.emit("finish")};e.exports=UrlEncoded},9730:e=>{"use strict";const t=/\+/g;const n=[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(e){e=e.replace(t," ");let s="";let i=0;let r=0;const o=e.length;for(;ir){s+=e.substring(r,i);r=i}this.buffer="";++r}}if(r{"use strict";e.exports=function basename(e){if(typeof e!=="string"){return""}for(var t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===".."||e==="."?"":e}}return e===".."||e==="."?"":e}},9136:e=>{"use strict";const t=new TextDecoder("utf-8");const n=new Map([["utf-8",t],["utf8",t]]);function decodeText(e,t,s){if(e){if(n.has(s)){try{return n.get(s).decode(Buffer.from(e,t))}catch(e){}}else{try{n.set(s,new TextDecoder(s));return n.get(s).decode(Buffer.from(e,t))}catch(e){}}}return e}e.exports=decodeText},9692:e=>{"use strict";e.exports=function getLimit(e,t,n){if(!e||e[t]===undefined||e[t]===null){return n}if(typeof e[t]!=="number"||isNaN(e[t])){throw new TypeError("Limit "+t+" is not a valid number")}return e[t]}},4426:(e,t,n)=>{"use strict";const s=n(9136);const i=/%([a-fA-F0-9]{2})/g;function encodedReplacer(e,t){return String.fromCharCode(parseInt(t,16))}function parseParams(e){const t=[];let n="key";let r="";let o=false;let A=false;let a=0;let c="";for(var u=0,l=e.length;u{e.exports={parallel:n(8210),serial:n(445),serialOrdered:n(3578)}},1700:e=>{e.exports=abort;function abort(e){Object.keys(e.jobs).forEach(clean.bind(e));e.jobs={}}function clean(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}},2794:(e,t,n)=>{var s=n(5295);e.exports=async;function async(e){var t=false;s((function(){t=true}));return function async_callback(n,i){if(t){e(n,i)}else{s((function nextTick_callback(){e(n,i)}))}}}},5295:e=>{e.exports=defer;function defer(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}},9023:(e,t,n)=>{var s=n(2794),i=n(1700);e.exports=iterate;function iterate(e,t,n,s){var r=n["keyedList"]?n["keyedList"][n.index]:n.index;n.jobs[r]=runJob(t,r,e[r],(function(e,t){if(!(r in n.jobs)){return}delete n.jobs[r];if(e){i(n)}else{n.results[r]=t}s(e,n.results)}))}function runJob(e,t,n,i){var r;if(e.length==2){r=e(n,s(i))}else{r=e(n,t,s(i))}return r}},2474:e=>{e.exports=state;function state(e,t){var n=!Array.isArray(e),s={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};if(t){s.keyedList.sort(n?t:function(n,s){return t(e[n],e[s])})}return s}},7942:(e,t,n)=>{var s=n(1700),i=n(2794);e.exports=terminator;function terminator(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;s(this);i(e)(null,this.results)}},8210:(e,t,n)=>{var s=n(9023),i=n(2474),r=n(7942);e.exports=parallel;function parallel(e,t,n){var o=i(e);while(o.index<(o["keyedList"]||e).length){s(e,t,o,(function(e,t){if(e){n(e,t);return}if(Object.keys(o.jobs).length===0){n(null,o.results);return}}));o.index++}return r.bind(o,n)}},445:(e,t,n)=>{var s=n(3578);e.exports=serial;function serial(e,t,n){return s(e,t,null,n)}},3578:(e,t,n)=>{var s=n(9023),i=n(2474),r=n(7942);e.exports=serialOrdered;e.exports.ascending=ascending;e.exports.descending=descending;function serialOrdered(e,t,n,o){var A=i(e,n);s(e,t,A,(function iteratorHandler(n,i){if(n){o(n,i);return}A.index++;if(A.index<(A["keyedList"]||e).length){s(e,t,A,iteratorHandler);return}o(null,A.results)}));return r.bind(A,o)}function ascending(e,t){return et?1:0}function descending(e,t){return-1*ascending(e,t)}},6008:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return A.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return r.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return a.default}});var s=_interopRequireDefault(n(272));var i=_interopRequireDefault(n(4867));var r=_interopRequireDefault(n(1537));var o=_interopRequireDefault(n(1453));var A=_interopRequireDefault(n(588));var a=_interopRequireDefault(n(5440));var c=_interopRequireDefault(n(2092));var u=_interopRequireDefault(n(61));var l=_interopRequireDefault(n(1855));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},1774:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("md5").update(e).digest()}var i=md5;t["default"]=i},5056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i={randomUUID:s.default.randomUUID};t["default"]=i},588:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n="00000000-0000-0000-0000-000000000000";t["default"]=n},1855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}let t;const n=new Uint8Array(16);n[0]=(t=parseInt(e.slice(0,8),16))>>>24;n[1]=t>>>16&255;n[2]=t>>>8&255;n[3]=t&255;n[4]=(t=parseInt(e.slice(9,13),16))>>>8;n[5]=t&255;n[6]=(t=parseInt(e.slice(14,18),16))>>>8;n[7]=t&255;n[8]=(t=parseInt(e.slice(19,23),16))>>>8;n[9]=t&255;n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;n[11]=t/4294967296&255;n[12]=t>>>24&255;n[13]=t>>>16&255;n[14]=t>>>8&255;n[15]=t&255;return n}var i=parse;t["default"]=i},2822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=/^(?:[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;t["default"]=n},2378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=new Uint8Array(256);let r=i.length;function rng(){if(r>i.length-16){s.default.randomFillSync(i);r=0}return i.slice(r,r+=16)}},2732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("sha1").update(e).digest()}var i=sha1;t["default"]=i},61:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;t.unsafeStringify=unsafeStringify;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=[];for(let e=0;e<256;++e){i.push((e+256).toString(16).slice(1))}function unsafeStringify(e,t=0){return i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]}function stringify(e,t=0){const n=unsafeStringify(e,t);if(!(0,s.default)(n)){throw TypeError("Stringified UUID is invalid")}return n}var r=stringify;t["default"]=r},272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2378));var i=n(61);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let r;let o;let A=0;let a=0;function v1(e,t,n){let c=t&&n||0;const u=t||new Array(16);e=e||{};let l=e.node||r;let d=e.clockseq!==undefined?e.clockseq:o;if(l==null||d==null){const t=e.random||(e.rng||s.default)();if(l==null){l=r=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=o=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let g=e.nsecs!==undefined?e.nsecs:a+1;const h=p-A+(g-a)/1e4;if(h<0&&e.clockseq===undefined){d=d+1&16383}if((h<0||p>A)&&e.nsecs===undefined){g=0}if(g>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}A=p;a=g;o=d;p+=122192928e5;const f=((p&268435455)*1e4+g)%4294967296;u[c++]=f>>>24&255;u[c++]=f>>>16&255;u[c++]=f>>>8&255;u[c++]=f&255;const E=p/4294967296*1e4&268435455;u[c++]=E>>>8&255;u[c++]=E&255;u[c++]=E>>>24&15|16;u[c++]=E>>>16&255;u[c++]=d>>>8|128;u[c++]=d&255;for(let e=0;e<6;++e){u[c+e]=l[e]}return t||(0,i.unsafeStringify)(u)}var c=v1;t["default"]=c},4867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6222));var i=_interopRequireDefault(n(1774));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v3",48,i.default);var o=r;t["default"]=o},6222:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.URL=t.DNS=void 0;t["default"]=v35;var s=n(61);var i=_interopRequireDefault(n(1855));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(5056));var i=_interopRequireDefault(n(2378));var r=n(61);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,n){if(s.default.randomUUID&&!t&&!e){return s.default.randomUUID()}e=e||{};const o=e.random||(e.rng||i.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){n=n||0;for(let e=0;e<16;++e){t[n+e]=o[e]}return t}return(0,r.unsafeStringify)(o)}var o=v4;t["default"]=o},1453:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6222));var i=_interopRequireDefault(n(2732));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v5",80,i.default);var o=r;t["default"]=o},2092:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2822));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&s.default.test(e)}var i=validate;t["default"]=i},5440:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.slice(14,15),16)}var i=version;t["default"]=i},5443:(e,t,n)=>{var s=n(3837);var i=n(2781).Stream;var r=n(8611);e.exports=CombinedStream;function CombinedStream(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}s.inherits(CombinedStream,i);CombinedStream.create=function(e){var t=new this;e=e||{};for(var n in e){t[n]=e[n]}return t};CombinedStream.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};CombinedStream.prototype.append=function(e){var t=CombinedStream.isStreamLike(e);if(t){if(!(e instanceof r)){var n=r.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=n}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};CombinedStream.prototype.pipe=function(e,t){i.prototype.pipe.call(this,e,t);this.resume();return e};CombinedStream.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};CombinedStream.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(e){var t=CombinedStream.isStreamLike(e);if(t){e.on("data",this._checkDataSize.bind(this));this._handleErrors(e)}this._pipeNext(e)}.bind(this))};CombinedStream.prototype._pipeNext=function(e){this._currentStream=e;var t=CombinedStream.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var n=e;this.write(n);this._getNext()};CombinedStream.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))};CombinedStream.prototype.write=function(e){this.emit("data",e)};CombinedStream.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};CombinedStream.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}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")};CombinedStream.prototype.destroy=function(){this._reset();this.emit("close")};CombinedStream.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};CombinedStream.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};CombinedStream.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize}));if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};CombinedStream.prototype._emitError=function(e){this._reset();this.emit("error",e)}},8611:(e,t,n)=>{var s=n(2781).Stream;var i=n(3837);e.exports=DelayedStream;function DelayedStream(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}i.inherits(DelayedStream,s);DelayedStream.create=function(e,t){var n=new this;t=t||{};for(var s in t){n[s]=t[s]}n.source=e;var i=e.emit;e.emit=function(){n._handleEmit(arguments);return i.apply(e,arguments)};e.on("error",(function(){}));if(n.pauseStream){e.pause()}return n};Object.defineProperty(DelayedStream.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});DelayedStream.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};DelayedStream.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};DelayedStream.prototype.pause=function(){this.source.pause()};DelayedStream.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};DelayedStream.prototype.pipe=function(){var e=s.prototype.pipe.apply(this,arguments);this.resume();return e};DelayedStream.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};DelayedStream.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},1133:(e,t,n)=>{var s;e.exports=function(){if(!s){try{s=n(6167)("follow-redirects")}catch(e){}if(typeof s!=="function"){s=function(){}}}s.apply(null,arguments)}},7707:(e,t,n)=>{var s=n(7310);var i=s.URL;var r=n(3685);var o=n(5687);var A=n(2781).Writable;var a=n(9491);var c=n(1133);var u=["abort","aborted","connect","error","socket","timeout"];var l=Object.create(null);u.forEach((function(e){l[e]=function(t,n,s){this._redirectable.emit(e,t,n,s)}}));var d=createErrorType("ERR_INVALID_URL","Invalid URL",TypeError);var p=createErrorType("ERR_FR_REDIRECTION_FAILURE","Redirected request failed");var g=createErrorType("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded");var h=createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit");var f=createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");var E=A.prototype.destroy||noop;function RedirectableRequest(e,t){A.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var n=this;this._onNativeResponse=function(e){n._processResponse(e)};this._performRequest()}RedirectableRequest.prototype=Object.create(A.prototype);RedirectableRequest.prototype.abort=function(){destroyRequest(this._currentRequest);this._currentRequest.abort();this.emit("abort")};RedirectableRequest.prototype.destroy=function(e){destroyRequest(this._currentRequest,e);E.call(this,e);return this};RedirectableRequest.prototype.write=function(e,t,n){if(this._ending){throw new f}if(!isString(e)&&!isBuffer(e)){throw new TypeError("data should be a string, Buffer or Uint8Array")}if(isFunction(t)){n=t;t=null}if(e.length===0){if(n){n()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,n)}else{this.emit("error",new h);this.abort()}};RedirectableRequest.prototype.end=function(e,t,n){if(isFunction(e)){n=e;e=t=null}else if(isFunction(t)){n=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,n)}else{var s=this;var i=this._currentRequest;this.write(e,t,(function(){s._ended=true;i.end(null,null,n)}));this._ending=true}};RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};RedirectableRequest.prototype.setTimeout=function(e,t){var n=this;function destroyOnTimeout(t){t.setTimeout(e);t.removeListener("timeout",t.destroy);t.addListener("timeout",t.destroy)}function startTimer(t){if(n._timeout){clearTimeout(n._timeout)}n._timeout=setTimeout((function(){n.emit("timeout");clearTimer()}),e);destroyOnTimeout(t)}function clearTimer(){if(n._timeout){clearTimeout(n._timeout);n._timeout=null}n.removeListener("abort",clearTimer);n.removeListener("error",clearTimer);n.removeListener("response",clearTimer);n.removeListener("close",clearTimer);if(t){n.removeListener("timeout",t)}if(!n.socket){n._currentRequest.removeListener("socket",startTimer)}}if(t){this.on("timeout",t)}if(this.socket){startTimer(this.socket)}else{this._currentRequest.once("socket",startTimer)}this.on("socket",destroyOnTimeout);this.on("abort",clearTimer);this.on("error",clearTimer);this.on("response",clearTimer);this.on("close",clearTimer);return this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){RedirectableRequest.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}}));["aborted","connection","socket"].forEach((function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})}));RedirectableRequest.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){this.emit("error",new TypeError("Unsupported protocol "+e));return}if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var r of u){i.on(r,l[r])}this._currentUrl=/^\//.test(this._options.path)?s.format(this._options):this._options.path;if(this._isRedirect){var o=0;var A=this;var a=this._requestBodyBuffers;(function writeNext(e){if(i===A._currentRequest){if(e){A.emit("error",e)}else if(o=400){e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[];return}destroyRequest(this._currentRequest);e.destroy();if(++this._redirectCount>this._options.maxRedirects){this.emit("error",new g);return}var i;var r=this._options.beforeRedirect;if(r){i=Object.assign({Host:e.req.getHeader("host")},this._options.headers)}var o=this._options.method;if((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method)){this._options.method="GET";this._requestBodyBuffers=[];removeMatchingHeaders(/^content-/i,this._options.headers)}var A=removeMatchingHeaders(/^host$/i,this._options.headers);var a=s.parse(this._currentUrl);var u=A||a.host;var l=/^\w+:/.test(n)?this._currentUrl:s.format(Object.assign(a,{host:u}));var d;try{d=s.resolve(l,n)}catch(e){this.emit("error",new p({cause:e}));return}c("redirecting to",d);this._isRedirect=true;var h=s.parse(d);Object.assign(this._options,h);if(h.protocol!==a.protocol&&h.protocol!=="https:"||h.host!==u&&!isSubdomain(h.host,u)){removeMatchingHeaders(/^(?:authorization|cookie)$/i,this._options.headers)}if(isFunction(r)){var f={headers:e.headers,statusCode:t};var E={url:l,method:o,headers:i};try{r(this._options,f,E)}catch(e){this.emit("error",e);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new p({cause:e}))}};function wrap(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var n={};Object.keys(e).forEach((function(r){var o=r+":";var A=n[o]=e[r];var u=t[r]=Object.create(A);function request(e,r,A){if(isString(e)){var u;try{u=urlToOptions(new i(e))}catch(t){u=s.parse(e)}if(!isString(u.protocol)){throw new d({input:e})}e=u}else if(i&&e instanceof i){e=urlToOptions(e)}else{A=r;r=e;e={protocol:o}}if(isFunction(r)){A=r;r=null}r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r);r.nativeProtocols=n;if(!isString(r.host)&&!isString(r.hostname)){r.hostname="::1"}a.equal(r.protocol,o,"protocol mismatch");c("options",r);return new RedirectableRequest(r,A)}function get(e,t,n){var s=u.request(e,t,n);s.end();return s}Object.defineProperties(u,{request:{value:request,configurable:true,enumerable:true,writable:true},get:{value:get,configurable:true,enumerable:true,writable:true}})}));return t}function noop(){}function urlToOptions(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};if(e.port!==""){t.port=Number(e.port)}return t}function removeMatchingHeaders(e,t){var n;for(var s in t){if(e.test(s)){n=t[s];delete t[s]}}return n===null||typeof n==="undefined"?undefined:String(n).trim()}function createErrorType(e,t,n){function CustomError(n){Error.captureStackTrace(this,this.constructor);Object.assign(this,n||{});this.code=e;this.message=this.cause?t+": "+this.cause.message:t}CustomError.prototype=new(n||Error);CustomError.prototype.constructor=CustomError;CustomError.prototype.name="Error ["+e+"]";return CustomError}function destroyRequest(e,t){for(var n of u){e.removeListener(n,l[n])}e.on("error",noop);e.destroy(t)}function isSubdomain(e,t){a(isString(e)&&isString(t));var n=e.length-t.length-1;return n>0&&e[n]==="."&&e.endsWith(t)}function isString(e){return typeof e==="string"||e instanceof String}function isFunction(e){return typeof e==="function"}function isBuffer(e){return typeof e==="object"&&"length"in e}e.exports=wrap({http:r,https:o});e.exports.wrap=wrap},4334:(e,t,n)=>{var s=n(5443);var i=n(3837);var r=n(1017);var o=n(3685);var A=n(5687);var a=n(7310).parse;var c=n(7147);var u=n(2781).Stream;var l=n(3583);var d=n(4812);var p=n(7142);e.exports=FormData;i.inherits(FormData,s);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];s.call(this);e=e||{};for(var t in e){this[t]=e[t]}}FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,n){n=n||{};if(typeof n=="string"){n={filename:n}}var r=s.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(i.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,n);var A=this._multiPartFooter();r(o);r(t);r(A);this._trackLength(o,t,n)};FormData.prototype._trackLength=function(e,t,n){var s=0;if(n.knownLength!=null){s+=+n.knownLength}else if(Buffer.isBuffer(t)){s=t.length}else if(typeof t==="string"){s=Buffer.byteLength(t)}this._valueLength+=s;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof u)){return}if(!n.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{c.stat(e.path,(function(n,s){var i;if(n){t(n);return}i=s.size-(e.start?e.start:0);t(null,i)}))}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",(function(n){e.pause();t(null,+n.headers["content-length"])}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,n){if(typeof n.header=="string"){return n.header}var s=this._getContentDisposition(t,n);var i=this._getContentType(t,n);var r="";var o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(s||[]),"Content-Type":[].concat(i||[])};if(typeof n.header=="object"){p(o,n.header)}var A;for(var a in o){if(!o.hasOwnProperty(a))continue;A=o[a];if(A==null){continue}if(!Array.isArray(A)){A=[A]}if(A.length){r+=a+": "+A.join("; ")+FormData.LINE_BREAK}}return"--"+this.getBoundary()+FormData.LINE_BREAK+r+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var n,s;if(typeof t.filepath==="string"){n=r.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){n=r.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){n=r.basename(e.client._httpMessage.path||"")}if(n){s='filename="'+n+'"'}return s};FormData.prototype._getContentType=function(e,t){var n=t.contentType;if(!n&&e.name){n=l.lookup(e.name)}if(!n&&e.path){n=l.lookup(e.path)}if(!n&&e.readable&&e.hasOwnProperty("httpVersion")){n=e.headers["content-type"]}if(!n&&(t.filepath||t.filename)){n=l.lookup(t.filepath||t.filename)}if(!n&&typeof e=="object"){n=FormData.DEFAULT_CONTENT_TYPE}return n};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var n=this._streams.length===0;if(n){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){n[t.toLowerCase()]=e[t]}}return n};FormData.prototype.setBoundary=function(e){this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var n=0,s=this._streams.length;n{e.exports=function(e,t){Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]}));return e}},4061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.cryptoRuntime=t.base64url=t.generateSecret=t.generateKeyPair=t.errors=t.decodeJwt=t.decodeProtectedHeader=t.importJWK=t.importX509=t.importPKCS8=t.importSPKI=t.exportJWK=t.exportSPKI=t.exportPKCS8=t.UnsecuredJWT=t.createRemoteJWKSet=t.createLocalJWKSet=t.EmbeddedJWK=t.calculateJwkThumbprintUri=t.calculateJwkThumbprint=t.EncryptJWT=t.SignJWT=t.GeneralSign=t.FlattenedSign=t.CompactSign=t.FlattenedEncrypt=t.CompactEncrypt=t.jwtDecrypt=t.jwtVerify=t.generalVerify=t.flattenedVerify=t.compactVerify=t.GeneralEncrypt=t.generalDecrypt=t.flattenedDecrypt=t.compactDecrypt=void 0;var s=n(7651);Object.defineProperty(t,"compactDecrypt",{enumerable:true,get:function(){return s.compactDecrypt}});var i=n(7566);Object.defineProperty(t,"flattenedDecrypt",{enumerable:true,get:function(){return i.flattenedDecrypt}});var r=n(5684);Object.defineProperty(t,"generalDecrypt",{enumerable:true,get:function(){return r.generalDecrypt}});var o=n(3992);Object.defineProperty(t,"GeneralEncrypt",{enumerable:true,get:function(){return o.GeneralEncrypt}});var A=n(5212);Object.defineProperty(t,"compactVerify",{enumerable:true,get:function(){return A.compactVerify}});var a=n(2095);Object.defineProperty(t,"flattenedVerify",{enumerable:true,get:function(){return a.flattenedVerify}});var c=n(4975);Object.defineProperty(t,"generalVerify",{enumerable:true,get:function(){return c.generalVerify}});var u=n(9887);Object.defineProperty(t,"jwtVerify",{enumerable:true,get:function(){return u.jwtVerify}});var l=n(3378);Object.defineProperty(t,"jwtDecrypt",{enumerable:true,get:function(){return l.jwtDecrypt}});var d=n(6203);Object.defineProperty(t,"CompactEncrypt",{enumerable:true,get:function(){return d.CompactEncrypt}});var p=n(1555);Object.defineProperty(t,"FlattenedEncrypt",{enumerable:true,get:function(){return p.FlattenedEncrypt}});var g=n(8257);Object.defineProperty(t,"CompactSign",{enumerable:true,get:function(){return g.CompactSign}});var h=n(4825);Object.defineProperty(t,"FlattenedSign",{enumerable:true,get:function(){return h.FlattenedSign}});var f=n(4268);Object.defineProperty(t,"GeneralSign",{enumerable:true,get:function(){return f.GeneralSign}});var E=n(8882);Object.defineProperty(t,"SignJWT",{enumerable:true,get:function(){return E.SignJWT}});var m=n(960);Object.defineProperty(t,"EncryptJWT",{enumerable:true,get:function(){return m.EncryptJWT}});var C=n(3494);Object.defineProperty(t,"calculateJwkThumbprint",{enumerable:true,get:function(){return C.calculateJwkThumbprint}});Object.defineProperty(t,"calculateJwkThumbprintUri",{enumerable:true,get:function(){return C.calculateJwkThumbprintUri}});var Q=n(1751);Object.defineProperty(t,"EmbeddedJWK",{enumerable:true,get:function(){return Q.EmbeddedJWK}});var I=n(9970);Object.defineProperty(t,"createLocalJWKSet",{enumerable:true,get:function(){return I.createLocalJWKSet}});var B=n(9035);Object.defineProperty(t,"createRemoteJWKSet",{enumerable:true,get:function(){return B.createRemoteJWKSet}});var y=n(8568);Object.defineProperty(t,"UnsecuredJWT",{enumerable:true,get:function(){return y.UnsecuredJWT}});var b=n(465);Object.defineProperty(t,"exportPKCS8",{enumerable:true,get:function(){return b.exportPKCS8}});Object.defineProperty(t,"exportSPKI",{enumerable:true,get:function(){return b.exportSPKI}});Object.defineProperty(t,"exportJWK",{enumerable:true,get:function(){return b.exportJWK}});var w=n(4230);Object.defineProperty(t,"importSPKI",{enumerable:true,get:function(){return w.importSPKI}});Object.defineProperty(t,"importPKCS8",{enumerable:true,get:function(){return w.importPKCS8}});Object.defineProperty(t,"importX509",{enumerable:true,get:function(){return w.importX509}});Object.defineProperty(t,"importJWK",{enumerable:true,get:function(){return w.importJWK}});var R=n(3991);Object.defineProperty(t,"decodeProtectedHeader",{enumerable:true,get:function(){return R.decodeProtectedHeader}});var v=n(5611);Object.defineProperty(t,"decodeJwt",{enumerable:true,get:function(){return v.decodeJwt}});t.errors=n(4419);var k=n(1036);Object.defineProperty(t,"generateKeyPair",{enumerable:true,get:function(){return k.generateKeyPair}});var S=n(6617);Object.defineProperty(t,"generateSecret",{enumerable:true,get:function(){return S.generateSecret}});t.base64url=n(3238);var x=n(1173);Object.defineProperty(t,"cryptoRuntime",{enumerable:true,get:function(){return x.default}})},7651:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.compactDecrypt=void 0;const s=n(7566);const i=n(4419);const r=n(1691);async function compactDecrypt(e,t,n){if(e instanceof Uint8Array){e=r.decoder.decode(e)}if(typeof e!=="string"){throw new i.JWEInvalid("Compact JWE must be a string or Uint8Array")}const{0:o,1:A,2:a,3:c,4:u,length:l}=e.split(".");if(l!==5){throw new i.JWEInvalid("Invalid Compact JWE")}const d=await(0,s.flattenedDecrypt)({ciphertext:c,iv:a||undefined,protected:o||undefined,tag:u||undefined,encrypted_key:A||undefined},t,n);const p={plaintext:d.plaintext,protectedHeader:d.protectedHeader};if(typeof t==="function"){return{...p,key:d.key}}return p}t.compactDecrypt=compactDecrypt},6203:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CompactEncrypt=void 0;const s=n(1555);class CompactEncrypt{constructor(e){this._flattened=new s.FlattenedEncrypt(e)}setContentEncryptionKey(e){this._flattened.setContentEncryptionKey(e);return this}setInitializationVector(e){this._flattened.setInitializationVector(e);return this}setProtectedHeader(e){this._flattened.setProtectedHeader(e);return this}setKeyManagementParameters(e){this._flattened.setKeyManagementParameters(e);return this}async encrypt(e,t){const n=await this._flattened.encrypt(e,t);return[n.protected,n.encrypted_key,n.iv,n.ciphertext,n.tag].join(".")}}t.CompactEncrypt=CompactEncrypt},7566:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.flattenedDecrypt=void 0;const s=n(518);const i=n(6137);const r=n(7022);const o=n(4419);const A=n(6063);const a=n(9127);const c=n(6127);const u=n(1691);const l=n(3987);const d=n(863);const p=n(5148);async function flattenedDecrypt(e,t,n){var g;if(!(0,a.default)(e)){throw new o.JWEInvalid("Flattened JWE must be an object")}if(e.protected===undefined&&e.header===undefined&&e.unprotected===undefined){throw new o.JWEInvalid("JOSE Header missing")}if(typeof e.iv!=="string"){throw new o.JWEInvalid("JWE Initialization Vector missing or incorrect type")}if(typeof e.ciphertext!=="string"){throw new o.JWEInvalid("JWE Ciphertext missing or incorrect type")}if(typeof e.tag!=="string"){throw new o.JWEInvalid("JWE Authentication Tag missing or incorrect type")}if(e.protected!==undefined&&typeof e.protected!=="string"){throw new o.JWEInvalid("JWE Protected Header incorrect type")}if(e.encrypted_key!==undefined&&typeof e.encrypted_key!=="string"){throw new o.JWEInvalid("JWE Encrypted Key incorrect type")}if(e.aad!==undefined&&typeof e.aad!=="string"){throw new o.JWEInvalid("JWE AAD incorrect type")}if(e.header!==undefined&&!(0,a.default)(e.header)){throw new o.JWEInvalid("JWE Shared Unprotected Header incorrect type")}if(e.unprotected!==undefined&&!(0,a.default)(e.unprotected)){throw new o.JWEInvalid("JWE Per-Recipient Unprotected Header incorrect type")}let h;if(e.protected){try{const t=(0,s.decode)(e.protected);h=JSON.parse(u.decoder.decode(t))}catch{throw new o.JWEInvalid("JWE Protected Header is invalid")}}if(!(0,A.default)(h,e.header,e.unprotected)){throw new o.JWEInvalid("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint")}const f={...h,...e.header,...e.unprotected};(0,d.default)(o.JWEInvalid,new Map,n===null||n===void 0?void 0:n.crit,h,f);if(f.zip!==undefined){if(!h||!h.zip){throw new o.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}if(f.zip!=="DEF"){throw new o.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}}const{alg:E,enc:m}=f;if(typeof E!=="string"||!E){throw new o.JWEInvalid("missing JWE Algorithm (alg) in JWE Header")}if(typeof m!=="string"||!m){throw new o.JWEInvalid("missing JWE Encryption Algorithm (enc) in JWE Header")}const C=n&&(0,p.default)("keyManagementAlgorithms",n.keyManagementAlgorithms);const Q=n&&(0,p.default)("contentEncryptionAlgorithms",n.contentEncryptionAlgorithms);if(C&&!C.has(E)){throw new o.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed')}if(Q&&!Q.has(m)){throw new o.JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter not allowed')}let I;if(e.encrypted_key!==undefined){try{I=(0,s.decode)(e.encrypted_key)}catch{throw new o.JWEInvalid("Failed to base64url decode the encrypted_key")}}let B=false;if(typeof t==="function"){t=await t(h,e);B=true}let y;try{y=await(0,c.default)(E,t,I,f,n)}catch(e){if(e instanceof TypeError||e instanceof o.JWEInvalid||e instanceof o.JOSENotSupported){throw e}y=(0,l.default)(m)}let b;let w;try{b=(0,s.decode)(e.iv)}catch{throw new o.JWEInvalid("Failed to base64url decode the iv")}try{w=(0,s.decode)(e.tag)}catch{throw new o.JWEInvalid("Failed to base64url decode the tag")}const R=u.encoder.encode((g=e.protected)!==null&&g!==void 0?g:"");let v;if(e.aad!==undefined){v=(0,u.concat)(R,u.encoder.encode("."),u.encoder.encode(e.aad))}else{v=R}let k;try{k=(0,s.decode)(e.ciphertext)}catch{throw new o.JWEInvalid("Failed to base64url decode the ciphertext")}let S=await(0,i.default)(m,y,k,b,w,v);if(f.zip==="DEF"){S=await((n===null||n===void 0?void 0:n.inflateRaw)||r.inflate)(S)}const x={plaintext:S};if(e.protected!==undefined){x.protectedHeader=h}if(e.aad!==undefined){try{x.additionalAuthenticatedData=(0,s.decode)(e.aad)}catch{throw new o.JWEInvalid("Failed to base64url decode the aad")}}if(e.unprotected!==undefined){x.sharedUnprotectedHeader=e.unprotected}if(e.header!==undefined){x.unprotectedHeader=e.header}if(B){return{...x,key:t}}return x}t.flattenedDecrypt=flattenedDecrypt},1555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FlattenedEncrypt=t.unprotected=void 0;const s=n(518);const i=n(6476);const r=n(7022);const o=n(4630);const A=n(3286);const a=n(4419);const c=n(6063);const u=n(1691);const l=n(863);t.unprotected=Symbol();class FlattenedEncrypt{constructor(e){if(!(e instanceof Uint8Array)){throw new TypeError("plaintext must be an instance of Uint8Array")}this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters){throw new TypeError("setKeyManagementParameters can only be called once")}this._keyManagementParameters=e;return this}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader){throw new TypeError("setSharedUnprotectedHeader can only be called once")}this._sharedUnprotectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}setContentEncryptionKey(e){if(this._cek){throw new TypeError("setContentEncryptionKey can only be called once")}this._cek=e;return this}setInitializationVector(e){if(this._iv){throw new TypeError("setInitializationVector can only be called once")}this._iv=e;return this}async encrypt(e,n){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader){throw new a.JWEInvalid("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()")}if(!(0,c.default)(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader)){throw new a.JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint")}const d={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};(0,l.default)(a.JWEInvalid,new Map,n===null||n===void 0?void 0:n.crit,this._protectedHeader,d);if(d.zip!==undefined){if(!this._protectedHeader||!this._protectedHeader.zip){throw new a.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}if(d.zip!=="DEF"){throw new a.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}}const{alg:p,enc:g}=d;if(typeof p!=="string"||!p){throw new a.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid')}if(typeof g!=="string"||!g){throw new a.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid')}let h;if(p==="dir"){if(this._cek){throw new TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}}else if(p==="ECDH-ES"){if(this._cek){throw new TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement")}}let f;{let s;({cek:f,encryptedKey:h,parameters:s}=await(0,A.default)(p,g,e,this._cek,this._keyManagementParameters));if(s){if(n&&t.unprotected in n){if(!this._unprotectedHeader){this.setUnprotectedHeader(s)}else{this._unprotectedHeader={...this._unprotectedHeader,...s}}}else{if(!this._protectedHeader){this.setProtectedHeader(s)}else{this._protectedHeader={...this._protectedHeader,...s}}}}}this._iv||(this._iv=(0,o.default)(g));let E;let m;let C;if(this._protectedHeader){m=u.encoder.encode((0,s.encode)(JSON.stringify(this._protectedHeader)))}else{m=u.encoder.encode("")}if(this._aad){C=(0,s.encode)(this._aad);E=(0,u.concat)(m,u.encoder.encode("."),u.encoder.encode(C))}else{E=m}let Q;let I;if(d.zip==="DEF"){const e=await((n===null||n===void 0?void 0:n.deflateRaw)||r.deflate)(this._plaintext);({ciphertext:Q,tag:I}=await(0,i.default)(g,e,f,this._iv,E))}else{({ciphertext:Q,tag:I}=await(0,i.default)(g,this._plaintext,f,this._iv,E))}const B={ciphertext:(0,s.encode)(Q),iv:(0,s.encode)(this._iv),tag:(0,s.encode)(I)};if(h){B.encrypted_key=(0,s.encode)(h)}if(C){B.aad=C}if(this._protectedHeader){B.protected=u.decoder.decode(m)}if(this._sharedUnprotectedHeader){B.unprotected=this._sharedUnprotectedHeader}if(this._unprotectedHeader){B.header=this._unprotectedHeader}return B}}t.FlattenedEncrypt=FlattenedEncrypt},5684:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generalDecrypt=void 0;const s=n(7566);const i=n(4419);const r=n(9127);async function generalDecrypt(e,t,n){if(!(0,r.default)(e)){throw new i.JWEInvalid("General JWE must be an object")}if(!Array.isArray(e.recipients)||!e.recipients.every(r.default)){throw new i.JWEInvalid("JWE Recipients missing or incorrect type")}if(!e.recipients.length){throw new i.JWEInvalid("JWE Recipients has no members")}for(const i of e.recipients){try{return await(0,s.flattenedDecrypt)({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:i.encrypted_key,header:i.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,n)}catch{}}throw new i.JWEDecryptionFailed}t.generalDecrypt=generalDecrypt},3992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GeneralEncrypt=void 0;const s=n(1555);const i=n(4419);const r=n(3987);const o=n(6063);const A=n(3286);const a=n(518);const c=n(863);class IndividualRecipient{constructor(e,t,n){this.parent=e;this.key=t;this.options=n}setUnprotectedHeader(e){if(this.unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this.unprotectedHeader=e;return this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class GeneralEncrypt{constructor(e){this._recipients=[];this._plaintext=e}addRecipient(e,t){const n=new IndividualRecipient(this,e,{crit:t===null||t===void 0?void 0:t.crit});this._recipients.push(n);return n}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setSharedUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}async encrypt(e){var t,n,u;if(!this._recipients.length){throw new i.JWEInvalid("at least one recipient must be added")}e={deflateRaw:e===null||e===void 0?void 0:e.deflateRaw};if(this._recipients.length===1){const[t]=this._recipients;const n=await new s.FlattenedEncrypt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options,...e});let i={ciphertext:n.ciphertext,iv:n.iv,recipients:[{}],tag:n.tag};if(n.aad)i.aad=n.aad;if(n.protected)i.protected=n.protected;if(n.unprotected)i.unprotected=n.unprotected;if(n.encrypted_key)i.recipients[0].encrypted_key=n.encrypted_key;if(n.header)i.recipients[0].header=n.header;return i}let l;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EmbeddedJWK=void 0;const s=n(4230);const i=n(9127);const r=n(4419);async function EmbeddedJWK(e,t){const n={...e,...t===null||t===void 0?void 0:t.header};if(!(0,i.default)(n.jwk)){throw new r.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object')}const o=await(0,s.importJWK)({...n.jwk,ext:true},n.alg,true);if(o instanceof Uint8Array||o.type!=="public"){throw new r.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key')}return o}t.EmbeddedJWK=EmbeddedJWK},3494:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.calculateJwkThumbprintUri=t.calculateJwkThumbprint=void 0;const s=n(2355);const i=n(518);const r=n(4419);const o=n(1691);const A=n(9127);const check=(e,t)=>{if(typeof e!=="string"||!e){throw new r.JWKInvalid(`${t} missing or invalid`)}};async function calculateJwkThumbprint(e,t){if(!(0,A.default)(e)){throw new TypeError("JWK must be an object")}t!==null&&t!==void 0?t:t="sha256";if(t!=="sha256"&&t!=="sha384"&&t!=="sha512"){throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"')}let n;switch(e.kty){case"EC":check(e.crv,'"crv" (Curve) Parameter');check(e.x,'"x" (X Coordinate) Parameter');check(e.y,'"y" (Y Coordinate) Parameter');n={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":check(e.crv,'"crv" (Subtype of Key Pair) Parameter');check(e.x,'"x" (Public Key) Parameter');n={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":check(e.e,'"e" (Exponent) Parameter');check(e.n,'"n" (Modulus) Parameter');n={e:e.e,kty:e.kty,n:e.n};break;case"oct":check(e.k,'"k" (Key Value) Parameter');n={k:e.k,kty:e.kty};break;default:throw new r.JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported')}const a=o.encoder.encode(JSON.stringify(n));return(0,i.encode)(await(0,s.default)(t,a))}t.calculateJwkThumbprint=calculateJwkThumbprint;async function calculateJwkThumbprintUri(e,t){t!==null&&t!==void 0?t:t="sha256";const n=await calculateJwkThumbprint(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${n}`}t.calculateJwkThumbprintUri=calculateJwkThumbprintUri},9970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createLocalJWKSet=t.LocalJWKSet=t.isJWKSLike=void 0;const s=n(4230);const i=n(4419);const r=n(9127);function getKtyFromAlg(e){switch(typeof e==="string"&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new i.JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set')}}function isJWKSLike(e){return e&&typeof e==="object"&&Array.isArray(e.keys)&&e.keys.every(isJWKLike)}t.isJWKSLike=isJWKSLike;function isJWKLike(e){return(0,r.default)(e)}function clone(e){if(typeof structuredClone==="function"){return structuredClone(e)}return JSON.parse(JSON.stringify(e))}class LocalJWKSet{constructor(e){this._cached=new WeakMap;if(!isJWKSLike(e)){throw new i.JWKSInvalid("JSON Web Key Set malformed")}this._jwks=clone(e)}async getKey(e,t){const{alg:n,kid:s}={...e,...t===null||t===void 0?void 0:t.header};const r=getKtyFromAlg(n);const o=this._jwks.keys.filter((e=>{let t=r===e.kty;if(t&&typeof s==="string"){t=s===e.kid}if(t&&typeof e.alg==="string"){t=n===e.alg}if(t&&typeof e.use==="string"){t=e.use==="sig"}if(t&&Array.isArray(e.key_ops)){t=e.key_ops.includes("verify")}if(t&&n==="EdDSA"){t=e.crv==="Ed25519"||e.crv==="Ed448"}if(t){switch(n){case"ES256":t=e.crv==="P-256";break;case"ES256K":t=e.crv==="secp256k1";break;case"ES384":t=e.crv==="P-384";break;case"ES512":t=e.crv==="P-521";break}}return t}));const{0:A,length:a}=o;if(a===0){throw new i.JWKSNoMatchingKey}else if(a!==1){const e=new i.JWKSMultipleMatchingKeys;const{_cached:t}=this;e[Symbol.asyncIterator]=async function*(){for(const e of o){try{yield await importWithAlgCache(t,e,n)}catch{continue}}};throw e}return importWithAlgCache(this._cached,A,n)}}t.LocalJWKSet=LocalJWKSet;async function importWithAlgCache(e,t,n){const r=e.get(t)||e.set(t,{}).get(t);if(r[n]===undefined){const e=await(0,s.importJWK)({...t,ext:true},n);if(e instanceof Uint8Array||e.type!=="public"){throw new i.JWKSInvalid("JSON Web Key Set members must be public keys")}r[n]=e}return r[n]}function createLocalJWKSet(e){const t=new LocalJWKSet(e);return async function(e,n){return t.getKey(e,n)}}t.createLocalJWKSet=createLocalJWKSet},9035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createRemoteJWKSet=void 0;const s=n(3650);const i=n(4419);const r=n(9970);function isCloudflareWorkers(){return typeof WebSocketPair!=="undefined"||typeof navigator!=="undefined"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime!=="undefined"&&EdgeRuntime==="vercel"}class RemoteJWKSet extends r.LocalJWKSet{constructor(e,t){super({keys:[]});this._jwks=undefined;if(!(e instanceof URL)){throw new TypeError("url must be an instance of URL")}this._url=new URL(e.href);this._options={agent:t===null||t===void 0?void 0:t.agent,headers:t===null||t===void 0?void 0:t.headers};this._timeoutDuration=typeof(t===null||t===void 0?void 0:t.timeoutDuration)==="number"?t===null||t===void 0?void 0:t.timeoutDuration:5e3;this._cooldownDuration=typeof(t===null||t===void 0?void 0:t.cooldownDuration)==="number"?t===null||t===void 0?void 0:t.cooldownDuration:3e4;this._cacheMaxAge=typeof(t===null||t===void 0?void 0:t.cacheMaxAge)==="number"?t===null||t===void 0?void 0:t.cacheMaxAge:6e5}coolingDown(){return typeof this._jwksTimestamp==="number"?Date.now(){if(!(0,r.isJWKSLike)(e)){throw new i.JWKSInvalid("JSON Web Key Set malformed")}this._jwks={keys:e.keys};this._jwksTimestamp=Date.now();this._pendingFetch=undefined})).catch((e=>{this._pendingFetch=undefined;throw e})));await this._pendingFetch}}function createRemoteJWKSet(e,t){const n=new RemoteJWKSet(e,t);return async function(e,t){return n.getKey(e,t)}}t.createRemoteJWKSet=createRemoteJWKSet},8257:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CompactSign=void 0;const s=n(4825);class CompactSign{constructor(e){this._flattened=new s.FlattenedSign(e)}setProtectedHeader(e){this._flattened.setProtectedHeader(e);return this}async sign(e,t){const n=await this._flattened.sign(e,t);if(n.payload===undefined){throw new TypeError("use the flattened module for creating JWS with b64: false")}return`${n.protected}.${n.payload}.${n.signature}`}}t.CompactSign=CompactSign},5212:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.compactVerify=void 0;const s=n(2095);const i=n(4419);const r=n(1691);async function compactVerify(e,t,n){if(e instanceof Uint8Array){e=r.decoder.decode(e)}if(typeof e!=="string"){throw new i.JWSInvalid("Compact JWS must be a string or Uint8Array")}const{0:o,1:A,2:a,length:c}=e.split(".");if(c!==3){throw new i.JWSInvalid("Invalid Compact JWS")}const u=await(0,s.flattenedVerify)({payload:A,protected:o,signature:a},t,n);const l={payload:u.payload,protectedHeader:u.protectedHeader};if(typeof t==="function"){return{...l,key:u.key}}return l}t.compactVerify=compactVerify},4825:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FlattenedSign=void 0;const s=n(518);const i=n(9935);const r=n(6063);const o=n(4419);const A=n(1691);const a=n(6241);const c=n(863);class FlattenedSign{constructor(e){if(!(e instanceof Uint8Array)){throw new TypeError("payload must be an instance of Uint8Array")}this._payload=e}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader){throw new o.JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()")}if(!(0,r.default)(this._protectedHeader,this._unprotectedHeader)){throw new o.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint")}const n={...this._protectedHeader,...this._unprotectedHeader};const u=(0,c.default)(o.JWSInvalid,new Map([["b64",true]]),t===null||t===void 0?void 0:t.crit,this._protectedHeader,n);let l=true;if(u.has("b64")){l=this._protectedHeader.b64;if(typeof l!=="boolean"){throw new o.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}}const{alg:d}=n;if(typeof d!=="string"||!d){throw new o.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid')}(0,a.default)(d,e,"sign");let p=this._payload;if(l){p=A.encoder.encode((0,s.encode)(p))}let g;if(this._protectedHeader){g=A.encoder.encode((0,s.encode)(JSON.stringify(this._protectedHeader)))}else{g=A.encoder.encode("")}const h=(0,A.concat)(g,A.encoder.encode("."),p);const f=await(0,i.default)(d,e,h);const E={signature:(0,s.encode)(f),payload:""};if(l){E.payload=A.decoder.decode(p)}if(this._unprotectedHeader){E.header=this._unprotectedHeader}if(this._protectedHeader){E.protected=A.decoder.decode(g)}return E}}t.FlattenedSign=FlattenedSign},2095:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.flattenedVerify=void 0;const s=n(518);const i=n(3569);const r=n(4419);const o=n(1691);const A=n(6063);const a=n(9127);const c=n(6241);const u=n(863);const l=n(5148);async function flattenedVerify(e,t,n){var d;if(!(0,a.default)(e)){throw new r.JWSInvalid("Flattened JWS must be an object")}if(e.protected===undefined&&e.header===undefined){throw new r.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members')}if(e.protected!==undefined&&typeof e.protected!=="string"){throw new r.JWSInvalid("JWS Protected Header incorrect type")}if(e.payload===undefined){throw new r.JWSInvalid("JWS Payload missing")}if(typeof e.signature!=="string"){throw new r.JWSInvalid("JWS Signature missing or incorrect type")}if(e.header!==undefined&&!(0,a.default)(e.header)){throw new r.JWSInvalid("JWS Unprotected Header incorrect type")}let p={};if(e.protected){try{const t=(0,s.decode)(e.protected);p=JSON.parse(o.decoder.decode(t))}catch{throw new r.JWSInvalid("JWS Protected Header is invalid")}}if(!(0,A.default)(p,e.header)){throw new r.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint")}const g={...p,...e.header};const h=(0,u.default)(r.JWSInvalid,new Map([["b64",true]]),n===null||n===void 0?void 0:n.crit,p,g);let f=true;if(h.has("b64")){f=p.b64;if(typeof f!=="boolean"){throw new r.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}}const{alg:E}=g;if(typeof E!=="string"||!E){throw new r.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid')}const m=n&&(0,l.default)("algorithms",n.algorithms);if(m&&!m.has(E)){throw new r.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed')}if(f){if(typeof e.payload!=="string"){throw new r.JWSInvalid("JWS Payload must be a string")}}else if(typeof e.payload!=="string"&&!(e.payload instanceof Uint8Array)){throw new r.JWSInvalid("JWS Payload must be a string or an Uint8Array instance")}let C=false;if(typeof t==="function"){t=await t(p,e);C=true}(0,c.default)(E,t,"verify");const Q=(0,o.concat)(o.encoder.encode((d=e.protected)!==null&&d!==void 0?d:""),o.encoder.encode("."),typeof e.payload==="string"?o.encoder.encode(e.payload):e.payload);let I;try{I=(0,s.decode)(e.signature)}catch{throw new r.JWSInvalid("Failed to base64url decode the signature")}const B=await(0,i.default)(E,t,I,Q);if(!B){throw new r.JWSSignatureVerificationFailed}let y;if(f){try{y=(0,s.decode)(e.payload)}catch{throw new r.JWSInvalid("Failed to base64url decode the payload")}}else if(typeof e.payload==="string"){y=o.encoder.encode(e.payload)}else{y=e.payload}const b={payload:y};if(e.protected!==undefined){b.protectedHeader=p}if(e.header!==undefined){b.unprotectedHeader=e.header}if(C){return{...b,key:t}}return b}t.flattenedVerify=flattenedVerify},4268:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GeneralSign=void 0;const s=n(4825);const i=n(4419);class IndividualSignature{constructor(e,t,n){this.parent=e;this.key=t;this.options=n}setProtectedHeader(e){if(this.protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this.protectedHeader=e;return this}setUnprotectedHeader(e){if(this.unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this.unprotectedHeader=e;return this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class GeneralSign{constructor(e){this._signatures=[];this._payload=e}addSignature(e,t){const n=new IndividualSignature(this,e,t);this._signatures.push(n);return n}async sign(){if(!this._signatures.length){throw new i.JWSInvalid("at least one signature must be added")}const e={signatures:[],payload:""};for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generalVerify=void 0;const s=n(2095);const i=n(4419);const r=n(9127);async function generalVerify(e,t,n){if(!(0,r.default)(e)){throw new i.JWSInvalid("General JWS must be an object")}if(!Array.isArray(e.signatures)||!e.signatures.every(r.default)){throw new i.JWSInvalid("JWS Signatures missing or incorrect type")}for(const i of e.signatures){try{return await(0,s.flattenedVerify)({header:i.header,payload:e.payload,protected:i.protected,signature:i.signature},t,n)}catch{}}throw new i.JWSSignatureVerificationFailed}t.generalVerify=generalVerify},3378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwtDecrypt=void 0;const s=n(7651);const i=n(7274);const r=n(4419);async function jwtDecrypt(e,t,n){const o=await(0,s.compactDecrypt)(e,t,n);const A=(0,i.default)(o.protectedHeader,o.plaintext,n);const{protectedHeader:a}=o;if(a.iss!==undefined&&a.iss!==A.iss){throw new r.JWTClaimValidationFailed('replicated "iss" claim header parameter mismatch',"iss","mismatch")}if(a.sub!==undefined&&a.sub!==A.sub){throw new r.JWTClaimValidationFailed('replicated "sub" claim header parameter mismatch',"sub","mismatch")}if(a.aud!==undefined&&JSON.stringify(a.aud)!==JSON.stringify(A.aud)){throw new r.JWTClaimValidationFailed('replicated "aud" claim header parameter mismatch',"aud","mismatch")}const c={payload:A,protectedHeader:a};if(typeof t==="function"){return{...c,key:o.key}}return c}t.jwtDecrypt=jwtDecrypt},960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EncryptJWT=void 0;const s=n(6203);const i=n(1691);const r=n(1908);class EncryptJWT extends r.ProduceJWT{setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setKeyManagementParameters(e){if(this._keyManagementParameters){throw new TypeError("setKeyManagementParameters can only be called once")}this._keyManagementParameters=e;return this}setContentEncryptionKey(e){if(this._cek){throw new TypeError("setContentEncryptionKey can only be called once")}this._cek=e;return this}setInitializationVector(e){if(this._iv){throw new TypeError("setInitializationVector can only be called once")}this._iv=e;return this}replicateIssuerAsHeader(){this._replicateIssuerAsHeader=true;return this}replicateSubjectAsHeader(){this._replicateSubjectAsHeader=true;return this}replicateAudienceAsHeader(){this._replicateAudienceAsHeader=true;return this}async encrypt(e,t){const n=new s.CompactEncrypt(i.encoder.encode(JSON.stringify(this._payload)));if(this._replicateIssuerAsHeader){this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}}if(this._replicateSubjectAsHeader){this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}}if(this._replicateAudienceAsHeader){this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}}n.setProtectedHeader(this._protectedHeader);if(this._iv){n.setInitializationVector(this._iv)}if(this._cek){n.setContentEncryptionKey(this._cek)}if(this._keyManagementParameters){n.setKeyManagementParameters(this._keyManagementParameters)}return n.encrypt(e,t)}}t.EncryptJWT=EncryptJWT},1908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ProduceJWT=void 0;const s=n(4476);const i=n(9127);const r=n(7810);class ProduceJWT{constructor(e){if(!(0,i.default)(e)){throw new TypeError("JWT Claims Set MUST be an object")}this._payload=e}setIssuer(e){this._payload={...this._payload,iss:e};return this}setSubject(e){this._payload={...this._payload,sub:e};return this}setAudience(e){this._payload={...this._payload,aud:e};return this}setJti(e){this._payload={...this._payload,jti:e};return this}setNotBefore(e){if(typeof e==="number"){this._payload={...this._payload,nbf:e}}else{this._payload={...this._payload,nbf:(0,s.default)(new Date)+(0,r.default)(e)}}return this}setExpirationTime(e){if(typeof e==="number"){this._payload={...this._payload,exp:e}}else{this._payload={...this._payload,exp:(0,s.default)(new Date)+(0,r.default)(e)}}return this}setIssuedAt(e){if(typeof e==="undefined"){this._payload={...this._payload,iat:(0,s.default)(new Date)}}else{this._payload={...this._payload,iat:e}}return this}}t.ProduceJWT=ProduceJWT},8882:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SignJWT=void 0;const s=n(8257);const i=n(4419);const r=n(1691);const o=n(1908);class SignJWT extends o.ProduceJWT{setProtectedHeader(e){this._protectedHeader=e;return this}async sign(e,t){var n;const o=new s.CompactSign(r.encoder.encode(JSON.stringify(this._payload)));o.setProtectedHeader(this._protectedHeader);if(Array.isArray((n=this._protectedHeader)===null||n===void 0?void 0:n.crit)&&this._protectedHeader.crit.includes("b64")&&this._protectedHeader.b64===false){throw new i.JWTInvalid("JWTs MUST NOT use unencoded payload")}return o.sign(e,t)}}t.SignJWT=SignJWT},8568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UnsecuredJWT=void 0;const s=n(518);const i=n(1691);const r=n(4419);const o=n(7274);const A=n(1908);class UnsecuredJWT extends A.ProduceJWT{encode(){const e=s.encode(JSON.stringify({alg:"none"}));const t=s.encode(JSON.stringify(this._payload));return`${e}.${t}.`}static decode(e,t){if(typeof e!=="string"){throw new r.JWTInvalid("Unsecured JWT must be a string")}const{0:n,1:A,2:a,length:c}=e.split(".");if(c!==3||a!==""){throw new r.JWTInvalid("Invalid Unsecured JWT")}let u;try{u=JSON.parse(i.decoder.decode(s.decode(n)));if(u.alg!=="none")throw new Error}catch{throw new r.JWTInvalid("Invalid Unsecured JWT")}const l=(0,o.default)(u,s.decode(A),t);return{payload:l,header:u}}}t.UnsecuredJWT=UnsecuredJWT},9887:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwtVerify=void 0;const s=n(5212);const i=n(7274);const r=n(4419);async function jwtVerify(e,t,n){var o;const A=await(0,s.compactVerify)(e,t,n);if(((o=A.protectedHeader.crit)===null||o===void 0?void 0:o.includes("b64"))&&A.protectedHeader.b64===false){throw new r.JWTInvalid("JWTs MUST NOT use unencoded payload")}const a=(0,i.default)(A.protectedHeader,A.payload,n);const c={payload:a,protectedHeader:A.protectedHeader};if(typeof t==="function"){return{...c,key:A.key}}return c}t.jwtVerify=jwtVerify},465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.exportJWK=t.exportPKCS8=t.exportSPKI=void 0;const s=n(858);const i=n(858);const r=n(997);async function exportSPKI(e){return(0,s.toSPKI)(e)}t.exportSPKI=exportSPKI;async function exportPKCS8(e){return(0,i.toPKCS8)(e)}t.exportPKCS8=exportPKCS8;async function exportJWK(e){return(0,r.default)(e)}t.exportJWK=exportJWK},1036:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateKeyPair=void 0;const s=n(9378);async function generateKeyPair(e,t){return(0,s.generateKeyPair)(e,t)}t.generateKeyPair=generateKeyPair},6617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateSecret=void 0;const s=n(9378);async function generateSecret(e,t){return(0,s.generateSecret)(e,t)}t.generateSecret=generateSecret},4230:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.importJWK=t.importPKCS8=t.importX509=t.importSPKI=void 0;const s=n(518);const i=n(858);const r=n(2659);const o=n(4419);const A=n(9127);async function importSPKI(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN PUBLIC KEY-----")!==0){throw new TypeError('"spki" must be SPKI formatted string')}return(0,i.fromSPKI)(e,t,n)}t.importSPKI=importSPKI;async function importX509(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN CERTIFICATE-----")!==0){throw new TypeError('"x509" must be X.509 formatted string')}return(0,i.fromX509)(e,t,n)}t.importX509=importX509;async function importPKCS8(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0){throw new TypeError('"pkcs8" must be PKCS#8 formatted string')}return(0,i.fromPKCS8)(e,t,n)}t.importPKCS8=importPKCS8;async function importJWK(e,t,n){var i;if(!(0,A.default)(e)){throw new TypeError("JWK must be an object")}t||(t=e.alg);switch(e.kty){case"oct":if(typeof e.k!=="string"||!e.k){throw new TypeError('missing "k" (Key Value) Parameter value')}n!==null&&n!==void 0?n:n=e.ext!==true;if(n){return(0,r.default)({...e,alg:t,ext:(i=e.ext)!==null&&i!==void 0?i:false})}return(0,s.decode)(e.k);case"RSA":if(e.oth!==undefined){throw new o.JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported')}case"EC":case"OKP":return(0,r.default)({...e,alg:t});default:throw new o.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value')}}t.importJWK=importJWK},233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unwrap=t.wrap=void 0;const s=n(6476);const i=n(6137);const r=n(4630);const o=n(518);async function wrap(e,t,n,i){const A=e.slice(0,7);i||(i=(0,r.default)(A));const{ciphertext:a,tag:c}=await(0,s.default)(A,n,t,i,new Uint8Array(0));return{encryptedKey:a,iv:(0,o.encode)(i),tag:(0,o.encode)(c)}}t.wrap=wrap;async function unwrap(e,t,n,s,r){const o=e.slice(0,7);return(0,i.default)(o,t,n,s,r,new Uint8Array(0))}t.unwrap=unwrap},1691:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.concatKdf=t.lengthAndInput=t.uint32be=t.uint64be=t.p2s=t.concat=t.decoder=t.encoder=void 0;const s=n(2355);t.encoder=new TextEncoder;t.decoder=new TextDecoder;const i=2**32;function concat(...e){const t=e.reduce(((e,{length:t})=>e+t),0);const n=new Uint8Array(t);let s=0;e.forEach((e=>{n.set(e,s);s+=e.length}));return n}t.concat=concat;function p2s(e,n){return concat(t.encoder.encode(e),new Uint8Array([0]),n)}t.p2s=p2s;function writeUInt32BE(e,t,n){if(t<0||t>=i){throw new RangeError(`value must be >= 0 and <= ${i-1}. Received ${t}`)}e.set([t>>>24,t>>>16,t>>>8,t&255],n)}function uint64be(e){const t=Math.floor(e/i);const n=e%i;const s=new Uint8Array(8);writeUInt32BE(s,t,0);writeUInt32BE(s,n,4);return s}t.uint64be=uint64be;function uint32be(e){const t=new Uint8Array(4);writeUInt32BE(t,e);return t}t.uint32be=uint32be;function lengthAndInput(e){return concat(uint32be(e.length),e)}t.lengthAndInput=lengthAndInput;async function concatKdf(e,t,n){const i=Math.ceil((t>>3)/32);const r=new Uint8Array(i*32);for(let t=0;t>3)}t.concatKdf=concatKdf},3987:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.bitLength=void 0;const s=n(4419);const i=n(5770);function bitLength(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new s.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}t.bitLength=bitLength;t["default"]=e=>(0,i.default)(new Uint8Array(bitLength(e)>>3))},1120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(4630);const checkIvLength=(e,t)=>{if(t.length<<3!==(0,i.bitLength)(e)){throw new s.JWEInvalid("Invalid Initialization Vector length")}};t["default"]=checkIvLength},6241:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(1146);const i=n(7947);const symmetricTypeCheck=(e,t)=>{if(t instanceof Uint8Array)return;if(!(0,i.default)(t)){throw new TypeError((0,s.withAlg)(e,t,...i.types,"Uint8Array"))}if(t.type!=="secret"){throw new TypeError(`${i.types.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}};const asymmetricTypeCheck=(e,t,n)=>{if(!(0,i.default)(t)){throw new TypeError((0,s.withAlg)(e,t,...i.types))}if(t.type==="secret"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`)}if(n==="sign"&&t.type==="public"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`)}if(n==="decrypt"&&t.type==="public"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`)}if(t.algorithm&&n==="verify"&&t.type==="private"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`)}if(t.algorithm&&n==="encrypt"&&t.type==="private"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)}};const checkKeyType=(e,t,n)=>{const s=e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e);if(s){symmetricTypeCheck(e,t)}else{asymmetricTypeCheck(e,t,n)}};t["default"]=checkKeyType},3499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function checkP2s(e){if(!(e instanceof Uint8Array)||e.length<8){throw new s.JWEInvalid("PBES2 Salt Input must be 8 or more octets")}}t["default"]=checkP2s},3386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkEncCryptoKey=t.checkSigCryptoKey=void 0;function unusable(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function isAlgorithm(e,t){return e.name===t}function getHashLength(e){return parseInt(e.name.slice(4),10)}function getNamedCurve(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function checkUsage(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const n=t.pop();e+=`one of ${t.join(", ")}, or ${n}.`}else if(t.length===2){e+=`one of ${t[0]} or ${t[1]}.`}else{e+=`${t[0]}.`}throw new TypeError(e)}}function checkSigCryptoKey(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!isAlgorithm(e.algorithm,"HMAC"))throw unusable("HMAC");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!isAlgorithm(e.algorithm,"RSASSA-PKCS1-v1_5"))throw unusable("RSASSA-PKCS1-v1_5");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!isAlgorithm(e.algorithm,"RSA-PSS"))throw unusable("RSA-PSS");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":{if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448"){throw unusable("Ed25519 or Ed448")}break}case"ES256":case"ES384":case"ES512":{if(!isAlgorithm(e.algorithm,"ECDSA"))throw unusable("ECDSA");const n=getNamedCurve(t);const s=e.algorithm.namedCurve;if(s!==n)throw unusable(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(e,n)}t.checkSigCryptoKey=checkSigCryptoKey;function checkEncCryptoKey(e,t,...n){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!isAlgorithm(e.algorithm,"AES-GCM"))throw unusable("AES-GCM");const n=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==n)throw unusable(n,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!isAlgorithm(e.algorithm,"AES-KW"))throw unusable("AES-KW");const n=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==n)throw unusable(n,"algorithm.length");break}case"ECDH":{switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw unusable("ECDH, X25519, or X448")}break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!isAlgorithm(e.algorithm,"PBKDF2"))throw unusable("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!isAlgorithm(e.algorithm,"RSA-OAEP"))throw unusable("RSA-OAEP");const n=parseInt(t.slice(9),10)||1;const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(e,n)}t.checkEncCryptoKey=checkEncCryptoKey},6127:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6083);const i=n(3706);const r=n(6898);const o=n(9526);const A=n(518);const a=n(4419);const c=n(3987);const u=n(4230);const l=n(6241);const d=n(9127);const p=n(233);async function decryptKeyManagement(e,t,n,g,h){(0,l.default)(e,t,"decrypt");switch(e){case"dir":{if(n!==undefined)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");return t}case"ECDH-ES":if(n!==undefined)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!(0,d.default)(g.epk))throw new a.JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`);if(!i.ecdhAllowed(t))throw new a.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime");const r=await(0,u.importJWK)(g.epk,e);let o;let l;if(g.apu!==undefined){if(typeof g.apu!=="string")throw new a.JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`);try{o=(0,A.decode)(g.apu)}catch{throw new a.JWEInvalid("Failed to base64url decode the apu")}}if(g.apv!==undefined){if(typeof g.apv!=="string")throw new a.JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`);try{l=(0,A.decode)(g.apv)}catch{throw new a.JWEInvalid("Failed to base64url decode the apv")}}const p=await i.deriveKey(r,t,e==="ECDH-ES"?g.enc:e,e==="ECDH-ES"?(0,c.bitLength)(g.enc):parseInt(e.slice(-5,-2),10),o,l);if(e==="ECDH-ES")return p;if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,s.unwrap)(e.slice(-6),p,n)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,o.decrypt)(e,t,n)}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");if(typeof g.p2c!=="number")throw new a.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`);const s=(h===null||h===void 0?void 0:h.maxPBES2Count)||1e4;if(g.p2c>s)throw new a.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds`);if(typeof g.p2s!=="string")throw new a.JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`);let i;try{i=(0,A.decode)(g.p2s)}catch{throw new a.JWEInvalid("Failed to base64url decode the p2s")}return(0,r.decrypt)(e,t,n,g.p2c,i)}case"A128KW":case"A192KW":case"A256KW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,s.unwrap)(e,t,n)}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");if(typeof g.iv!=="string")throw new a.JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`);if(typeof g.tag!=="string")throw new a.JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`);let s;try{s=(0,A.decode)(g.iv)}catch{throw new a.JWEInvalid("Failed to base64url decode the iv")}let i;try{i=(0,A.decode)(g.tag)}catch{throw new a.JWEInvalid("Failed to base64url decode the tag")}return(0,p.unwrap)(e,t,n,s,i)}default:{throw new a.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}}t["default"]=decryptKeyManagement},3286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6083);const i=n(3706);const r=n(6898);const o=n(9526);const A=n(518);const a=n(3987);const c=n(4419);const u=n(465);const l=n(6241);const d=n(233);async function encryptKeyManagement(e,t,n,p,g={}){let h;let f;let E;(0,l.default)(e,n,"encrypt");switch(e){case"dir":{E=n;break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!i.ecdhAllowed(n)){throw new c.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime")}const{apu:r,apv:o}=g;let{epk:l}=g;l||(l=(await i.generateEpk(n)).privateKey);const{x:d,y:m,crv:C,kty:Q}=await(0,u.exportJWK)(l);const I=await i.deriveKey(n,l,e==="ECDH-ES"?t:e,e==="ECDH-ES"?(0,a.bitLength)(t):parseInt(e.slice(-5,-2),10),r,o);f={epk:{x:d,crv:C,kty:Q}};if(Q==="EC")f.epk.y=m;if(r)f.apu=(0,A.encode)(r);if(o)f.apv=(0,A.encode)(o);if(e==="ECDH-ES"){E=I;break}E=p||(0,a.default)(t);const B=e.slice(-6);h=await(0,s.wrap)(B,I,E);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{E=p||(0,a.default)(t);h=await(0,o.encrypt)(e,n,E);break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{E=p||(0,a.default)(t);const{p2c:s,p2s:i}=g;({encryptedKey:h,...f}=await(0,r.encrypt)(e,n,E,s,i));break}case"A128KW":case"A192KW":case"A256KW":{E=p||(0,a.default)(t);h=await(0,s.wrap)(e,n,E);break}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{E=p||(0,a.default)(t);const{iv:s}=g;({encryptedKey:h,...f}=await(0,d.wrap)(e,n,E,s));break}default:{throw new c.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}return{cek:E,encryptedKey:h,parameters:f}}t["default"]=encryptKeyManagement},4476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=e=>Math.floor(e.getTime()/1e3)},1146:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.withAlg=void 0;function message(e,t,...n){if(n.length>2){const t=n.pop();e+=`one of type ${n.join(", ")}, or ${t}.`}else if(n.length===2){e+=`one of type ${n[0]} or ${n[1]}.`}else{e+=`of type ${n[0]}.`}if(t==null){e+=` Received ${t}`}else if(typeof t==="function"&&t.name){e+=` Received function ${t.name}`}else if(typeof t==="object"&&t!=null){if(t.constructor&&t.constructor.name){e+=` Received an instance of ${t.constructor.name}`}}return e}t["default"]=(e,...t)=>message("Key must be ",e,...t);function withAlg(e,t,...n){return message(`Key for the ${e} algorithm must be `,t,...n)}t.withAlg=withAlg},6063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const isDisjoint=(...e)=>{const t=e.filter(Boolean);if(t.length===0||t.length===1){return true}let n;for(const e of t){const t=Object.keys(e);if(!n||n.size===0){n=new Set(t);continue}for(const e of t){if(n.has(e)){return false}n.add(e)}}return true};t["default"]=isDisjoint},9127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function isObjectLike(e){return typeof e==="object"&&e!==null}function isObject(e){if(!isObjectLike(e)||Object.prototype.toString.call(e)!=="[object Object]"){return false}if(Object.getPrototypeOf(e)===null){return true}let t=e;while(Object.getPrototypeOf(t)!==null){t=Object.getPrototypeOf(t)}return Object.getPrototypeOf(e)===t}t["default"]=isObject},4630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.bitLength=void 0;const s=n(4419);const i=n(5770);function bitLength(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new s.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}t.bitLength=bitLength;t["default"]=e=>(0,i.default)(new Uint8Array(bitLength(e)>>3))},7274:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(1691);const r=n(4476);const o=n(7810);const A=n(9127);const normalizeTyp=e=>e.toLowerCase().replace(/^application\//,"");const checkAudiencePresence=(e,t)=>{if(typeof e==="string"){return t.includes(e)}if(Array.isArray(e)){return t.some(Set.prototype.has.bind(new Set(e)))}return false};t["default"]=(e,t,n={})=>{const{typ:a}=n;if(a&&(typeof e.typ!=="string"||normalizeTyp(e.typ)!==normalizeTyp(a))){throw new s.JWTClaimValidationFailed('unexpected "typ" JWT header value',"typ","check_failed")}let c;try{c=JSON.parse(i.decoder.decode(t))}catch{}if(!(0,A.default)(c)){throw new s.JWTInvalid("JWT Claims Set must be a top-level JSON object")}const{requiredClaims:u=[],issuer:l,subject:d,audience:p,maxTokenAge:g}=n;if(g!==undefined)u.push("iat");if(p!==undefined)u.push("aud");if(d!==undefined)u.push("sub");if(l!==undefined)u.push("iss");for(const e of new Set(u.reverse())){if(!(e in c)){throw new s.JWTClaimValidationFailed(`missing required "${e}" claim`,e,"missing")}}if(l&&!(Array.isArray(l)?l:[l]).includes(c.iss)){throw new s.JWTClaimValidationFailed('unexpected "iss" claim value',"iss","check_failed")}if(d&&c.sub!==d){throw new s.JWTClaimValidationFailed('unexpected "sub" claim value',"sub","check_failed")}if(p&&!checkAudiencePresence(c.aud,typeof p==="string"?[p]:p)){throw new s.JWTClaimValidationFailed('unexpected "aud" claim value',"aud","check_failed")}let h;switch(typeof n.clockTolerance){case"string":h=(0,o.default)(n.clockTolerance);break;case"number":h=n.clockTolerance;break;case"undefined":h=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:f}=n;const E=(0,r.default)(f||new Date);if((c.iat!==undefined||g)&&typeof c.iat!=="number"){throw new s.JWTClaimValidationFailed('"iat" claim must be a number',"iat","invalid")}if(c.nbf!==undefined){if(typeof c.nbf!=="number"){throw new s.JWTClaimValidationFailed('"nbf" claim must be a number',"nbf","invalid")}if(c.nbf>E+h){throw new s.JWTClaimValidationFailed('"nbf" claim timestamp check failed',"nbf","check_failed")}}if(c.exp!==undefined){if(typeof c.exp!=="number"){throw new s.JWTClaimValidationFailed('"exp" claim must be a number',"exp","invalid")}if(c.exp<=E-h){throw new s.JWTExpired('"exp" claim timestamp check failed',"exp","check_failed")}}if(g){const e=E-c.iat;const t=typeof g==="number"?g:(0,o.default)(g);if(e-h>t){throw new s.JWTExpired('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed")}if(e<0-h){throw new s.JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}}return c}},7810:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=60;const s=n*60;const i=s*24;const r=i*7;const o=i*365.25;const A=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i;t["default"]=e=>{const t=A.exec(e);if(!t){throw new TypeError("Invalid time period format")}const a=parseFloat(t[1]);const c=t[2].toLowerCase();switch(c){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(a);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(a*n);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(a*s);case"day":case"days":case"d":return Math.round(a*i);case"week":case"weeks":case"w":return Math.round(a*r);default:return Math.round(a*o)}}},5148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const validateAlgorithms=(e,t)=>{if(t!==undefined&&(!Array.isArray(t)||t.some((e=>typeof e!=="string")))){throw new TypeError(`"${e}" option must be an array of strings`)}if(!t){return undefined}return new Set(t)};t["default"]=validateAlgorithms},863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function validateCrit(e,t,n,i,r){if(r.crit!==undefined&&i.crit===undefined){throw new e('"crit" (Critical) Header Parameter MUST be integrity protected')}if(!i||i.crit===undefined){return new Set}if(!Array.isArray(i.crit)||i.crit.length===0||i.crit.some((e=>typeof e!=="string"||e.length===0))){throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present')}let o;if(n!==undefined){o=new Map([...Object.entries(n),...t.entries()])}else{o=t}for(const t of i.crit){if(!o.has(t)){throw new s.JOSENotSupported(`Extension Header Parameter "${t}" is not recognized`)}if(r[t]===undefined){throw new e(`Extension Header Parameter "${t}" is missing`)}else if(o.get(t)&&i[t]===undefined){throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}}return new Set(i.crit)}t["default"]=validateCrit},6083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unwrap=t.wrap=void 0;const s=n(4300);const i=n(6113);const r=n(4419);const o=n(1691);const A=n(6852);const a=n(3386);const c=n(2768);const u=n(1146);const l=n(4618);const d=n(7947);function checkKeySize(e,t){if(e.symmetricKeySize<<3!==parseInt(t.slice(1,4),10)){throw new TypeError(`Invalid key size for alg: ${t}`)}}function ensureKeyObject(e,t,n){if((0,c.default)(e)){return e}if(e instanceof Uint8Array){return(0,i.createSecretKey)(e)}if((0,A.isCryptoKey)(e)){(0,a.checkEncCryptoKey)(e,t,n);return i.KeyObject.from(e)}throw new TypeError((0,u.default)(e,...d.types,"Uint8Array"))}const wrap=(e,t,n)=>{const A=parseInt(e.slice(1,4),10);const a=`aes${A}-wrap`;if(!(0,l.default)(a)){throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}const c=ensureKeyObject(t,e,"wrapKey");checkKeySize(c,e);const u=(0,i.createCipheriv)(a,c,s.Buffer.alloc(8,166));return(0,o.concat)(u.update(n),u.final())};t.wrap=wrap;const unwrap=(e,t,n)=>{const A=parseInt(e.slice(1,4),10);const a=`aes${A}-wrap`;if(!(0,l.default)(a)){throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}const c=ensureKeyObject(t,e,"unwrapKey");checkKeySize(c,e);const u=(0,i.createDecipheriv)(a,c,s.Buffer.alloc(8,166));return(0,o.concat)(u.update(n),u.final())};t.unwrap=unwrap},858:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.fromX509=t.fromSPKI=t.fromPKCS8=t.toPKCS8=t.toSPKI=void 0;const s=n(6113);const i=n(4300);const r=n(6852);const o=n(2768);const A=n(1146);const a=n(7947);const genericExport=(e,t,n)=>{let i;if((0,r.isCryptoKey)(n)){if(!n.extractable){throw new TypeError("CryptoKey is not extractable")}i=s.KeyObject.from(n)}else if((0,o.default)(n)){i=n}else{throw new TypeError((0,A.default)(n,...a.types))}if(i.type!==e){throw new TypeError(`key is not a ${e} key`)}return i.export({format:"pem",type:t})};const toSPKI=e=>genericExport("public","spki",e);t.toSPKI=toSPKI;const toPKCS8=e=>genericExport("private","pkcs8",e);t.toPKCS8=toPKCS8;const fromPKCS8=e=>(0,s.createPrivateKey)({key:i.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,""),"base64"),type:"pkcs8",format:"der"});t.fromPKCS8=fromPKCS8;const fromSPKI=e=>(0,s.createPublicKey)({key:i.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,""),"base64"),type:"spki",format:"der"});t.fromSPKI=fromSPKI;const fromX509=e=>(0,s.createPublicKey)({key:e,type:"spki",format:"pem"});t.fromX509=fromX509},3888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=2;const s=48;class Asn1SequenceDecoder{constructor(e){if(e[0]!==s){throw new TypeError}this.buffer=e;this.offset=1;const t=this.decodeLength();if(t!==e.length-this.offset){throw new TypeError}}decodeLength(){let e=this.buffer[this.offset++];if(e&128){const t=e&~128;e=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4300);const i=n(4419);const r=2;const o=3;const A=4;const a=48;const c=s.Buffer.from([0]);const u=s.Buffer.from([r]);const l=s.Buffer.from([o]);const d=s.Buffer.from([a]);const p=s.Buffer.from([A]);const encodeLength=e=>{if(e<128)return s.Buffer.from([e]);const t=s.Buffer.alloc(5);t.writeUInt32BE(e,1);let n=1;while(t[n]===0)n++;t[n-1]=128|5-n;return t.slice(n-1)};const g=new Map([["P-256",s.Buffer.from("06 08 2A 86 48 CE 3D 03 01 07".replace(/ /g,""),"hex")],["secp256k1",s.Buffer.from("06 05 2B 81 04 00 0A".replace(/ /g,""),"hex")],["P-384",s.Buffer.from("06 05 2B 81 04 00 22".replace(/ /g,""),"hex")],["P-521",s.Buffer.from("06 05 2B 81 04 00 23".replace(/ /g,""),"hex")],["ecPublicKey",s.Buffer.from("06 07 2A 86 48 CE 3D 02 01".replace(/ /g,""),"hex")],["X25519",s.Buffer.from("06 03 2B 65 6E".replace(/ /g,""),"hex")],["X448",s.Buffer.from("06 03 2B 65 6F".replace(/ /g,""),"hex")],["Ed25519",s.Buffer.from("06 03 2B 65 70".replace(/ /g,""),"hex")],["Ed448",s.Buffer.from("06 03 2B 65 71".replace(/ /g,""),"hex")]]);class DumbAsn1Encoder{constructor(){this.length=0;this.elements=[]}oidFor(e){const t=g.get(e);if(!t){throw new i.JOSENotSupported("Invalid or unsupported OID")}this.elements.push(t);this.length+=t.length}zero(){this.elements.push(u,s.Buffer.from([1]),c);this.length+=3}one(){this.elements.push(u,s.Buffer.from([1]),s.Buffer.from([1]));this.length+=3}unsignedInteger(e){if(e[0]&128){const t=encodeLength(e.length+1);this.elements.push(u,t,c,e);this.length+=2+t.length+e.length}else{let t=0;while(e[t]===0&&(e[t+1]&128)===0)t++;const n=encodeLength(e.length-t);this.elements.push(u,encodeLength(e.length-t),e.slice(t));this.length+=1+n.length+e.length-t}}octStr(e){const t=encodeLength(e.length);this.elements.push(p,encodeLength(e.length),e);this.length+=1+t.length+e.length}bitStr(e){const t=encodeLength(e.length+1);this.elements.push(l,encodeLength(e.length+1),c,e);this.length+=1+t.length+e.length+1}add(e){this.elements.push(e);this.length+=e.length}end(e=d){const t=encodeLength(this.length);return s.Buffer.concat([e,t,...this.elements],1+t.length+this.length)}}t["default"]=DumbAsn1Encoder},518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=t.encodeBase64=t.decodeBase64=void 0;const s=n(4300);const i=n(1691);let r;function normalize(e){let t=e;if(t instanceof Uint8Array){t=i.decoder.decode(t)}return t}if(s.Buffer.isEncoding("base64url")){t.encode=r=e=>s.Buffer.from(e).toString("base64url")}else{t.encode=r=e=>s.Buffer.from(e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}const decodeBase64=e=>s.Buffer.from(e,"base64");t.decodeBase64=decodeBase64;const encodeBase64=e=>s.Buffer.from(e).toString("base64");t.encodeBase64=encodeBase64;const decode=e=>s.Buffer.from(normalize(e),"base64");t.decode=decode},4519:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1691);function cbcTag(e,t,n,r,o,A){const a=(0,i.concat)(e,t,n,(0,i.uint64be)(e.length<<3));const c=(0,s.createHmac)(`sha${r}`,o);c.update(a);return c.digest().slice(0,A>>3)}t["default"]=cbcTag},4047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(2768);const checkCekLength=(e,t)=>{let n;switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":n=parseInt(e.slice(-3),10);break;case"A128GCM":case"A192GCM":case"A256GCM":n=parseInt(e.slice(1,4),10);break;default:throw new s.JOSENotSupported(`Content Encryption Algorithm ${e} is not supported either by JOSE or your javascript runtime`)}if(t instanceof Uint8Array){const e=t.byteLength<<3;if(e!==n){throw new s.JWEInvalid(`Invalid Content Encryption Key length. Expected ${n} bits, got ${e} bits`)}return}if((0,i.default)(t)&&t.type==="secret"){const e=t.symmetricKeySize<<3;if(e!==n){throw new s.JWEInvalid(`Invalid Content Encryption Key length. Expected ${n} bits, got ${e} bits`)}return}throw new TypeError("Invalid Content Encryption Key type")};t["default"]=checkCekLength},122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setModulusLength=t.weakMap=void 0;t.weakMap=new WeakMap;const getLength=(e,t)=>{let n=e.readUInt8(1);if((n&128)===0){if(t===0){return n}return getLength(e.subarray(2+n),t-1)}const s=n&127;n=0;for(let t=0;t{const n=e.readUInt8(1);if((n&128)===0){return getLength(e.subarray(2),t)}const s=n&127;return getLength(e.subarray(2+s),t)};const getModulusLength=e=>{var n,s;if(t.weakMap.has(e)){return t.weakMap.get(e)}const i=(s=(n=e.asymmetricKeyDetails)===null||n===void 0?void 0:n.modulusLength)!==null&&s!==void 0?s:getLengthOfSeqIndex(e.export({format:"der",type:"pkcs1"}),e.type==="private"?1:0)-1<<3;t.weakMap.set(e,i);return i};const setModulusLength=(e,n)=>{t.weakMap.set(e,n)};t.setModulusLength=setModulusLength;t["default"]=(e,t)=>{if(getModulusLength(e)<2048){throw new TypeError(`${t} requires key modulusLength to be 2048 bits or larger`)}}},4618:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);let i;t["default"]=e=>{i||(i=new Set((0,s.getCiphers)()));return i.has(e)}},6137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1120);const r=n(4047);const o=n(1691);const A=n(4419);const a=n(5390);const c=n(4519);const u=n(6852);const l=n(3386);const d=n(2768);const p=n(1146);const g=n(4618);const h=n(7947);function cbcDecrypt(e,t,n,i,r,u){const l=parseInt(e.slice(1,4),10);if((0,d.default)(t)){t=t.export()}const p=t.subarray(l>>3);const h=t.subarray(0,l>>3);const f=parseInt(e.slice(-3),10);const E=`aes-${l}-cbc`;if(!(0,g.default)(E)){throw new A.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const m=(0,c.default)(u,i,n,f,h,l);let C;try{C=(0,a.default)(r,m)}catch{}if(!C){throw new A.JWEDecryptionFailed}let Q;try{const e=(0,s.createDecipheriv)(E,p,i);Q=(0,o.concat)(e.update(n),e.final())}catch{}if(!Q){throw new A.JWEDecryptionFailed}return Q}function gcmDecrypt(e,t,n,i,r,o){const a=parseInt(e.slice(1,4),10);const c=`aes-${a}-gcm`;if(!(0,g.default)(c)){throw new A.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}try{const e=(0,s.createDecipheriv)(c,t,i,{authTagLength:16});e.setAuthTag(r);if(o.byteLength){e.setAAD(o,{plaintextLength:n.length})}const A=e.update(n);e.final();return A}catch{throw new A.JWEDecryptionFailed}}const decrypt=(e,t,n,o,a,c)=>{let g;if((0,u.isCryptoKey)(t)){(0,l.checkEncCryptoKey)(t,e,"decrypt");g=s.KeyObject.from(t)}else if(t instanceof Uint8Array||(0,d.default)(t)){g=t}else{throw new TypeError((0,p.default)(t,...h.types,"Uint8Array"))}(0,r.default)(e,g);(0,i.default)(e,o);switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return cbcDecrypt(e,g,n,o,a,c);case"A128GCM":case"A192GCM":case"A256GCM":return gcmDecrypt(e,g,n,o,a,c);default:throw new A.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}};t["default"]=decrypt},2355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const digest=(e,t)=>(0,s.createHash)(e).update(t).digest();t["default"]=digest},4965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function dsaDigest(e){switch(e){case"PS256":case"RS256":case"ES256":case"ES256K":return"sha256";case"PS384":case"RS384":case"ES384":return"sha384";case"PS512":case"RS512":case"ES512":return"sha512";case"EdDSA":return undefined;default:throw new s.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=dsaDigest},3706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ecdhAllowed=t.generateEpk=t.deriveKey=void 0;const s=n(6113);const i=n(3837);const r=n(9302);const o=n(1691);const A=n(4419);const a=n(6852);const c=n(3386);const u=n(2768);const l=n(1146);const d=n(7947);const p=(0,i.promisify)(s.generateKeyPair);async function deriveKey(e,t,n,i,r=new Uint8Array(0),A=new Uint8Array(0)){let p;if((0,a.isCryptoKey)(e)){(0,c.checkEncCryptoKey)(e,"ECDH");p=s.KeyObject.from(e)}else if((0,u.default)(e)){p=e}else{throw new TypeError((0,l.default)(e,...d.types))}let g;if((0,a.isCryptoKey)(t)){(0,c.checkEncCryptoKey)(t,"ECDH","deriveBits");g=s.KeyObject.from(t)}else if((0,u.default)(t)){g=t}else{throw new TypeError((0,l.default)(t,...d.types))}const h=(0,o.concat)((0,o.lengthAndInput)(o.encoder.encode(n)),(0,o.lengthAndInput)(r),(0,o.lengthAndInput)(A),(0,o.uint32be)(i));const f=(0,s.diffieHellman)({privateKey:g,publicKey:p});return(0,o.concatKdf)(f,i,h)}t.deriveKey=deriveKey;async function generateEpk(e){let t;if((0,a.isCryptoKey)(e)){t=s.KeyObject.from(e)}else if((0,u.default)(e)){t=e}else{throw new TypeError((0,l.default)(e,...d.types))}switch(t.asymmetricKeyType){case"x25519":return p("x25519");case"x448":{return p("x448")}case"ec":{const e=(0,r.default)(t);return p("ec",{namedCurve:e})}default:throw new A.JOSENotSupported("Invalid or unsupported EPK")}}t.generateEpk=generateEpk;const ecdhAllowed=e=>["P-256","P-384","P-521","X25519","X448"].includes((0,r.default)(e));t.ecdhAllowed=ecdhAllowed},6476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1120);const r=n(4047);const o=n(1691);const A=n(4519);const a=n(6852);const c=n(3386);const u=n(2768);const l=n(1146);const d=n(4419);const p=n(4618);const g=n(7947);function cbcEncrypt(e,t,n,i,r){const a=parseInt(e.slice(1,4),10);if((0,u.default)(n)){n=n.export()}const c=n.subarray(a>>3);const l=n.subarray(0,a>>3);const g=`aes-${a}-cbc`;if(!(0,p.default)(g)){throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const h=(0,s.createCipheriv)(g,c,i);const f=(0,o.concat)(h.update(t),h.final());const E=parseInt(e.slice(-3),10);const m=(0,A.default)(r,i,f,E,l,a);return{ciphertext:f,tag:m}}function gcmEncrypt(e,t,n,i,r){const o=parseInt(e.slice(1,4),10);const A=`aes-${o}-gcm`;if(!(0,p.default)(A)){throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const a=(0,s.createCipheriv)(A,n,i,{authTagLength:16});if(r.byteLength){a.setAAD(r,{plaintextLength:t.length})}const c=a.update(t);a.final();const u=a.getAuthTag();return{ciphertext:c,tag:u}}const encrypt=(e,t,n,o,A)=>{let p;if((0,a.isCryptoKey)(n)){(0,c.checkEncCryptoKey)(n,e,"encrypt");p=s.KeyObject.from(n)}else if(n instanceof Uint8Array||(0,u.default)(n)){p=n}else{throw new TypeError((0,l.default)(n,...g.types,"Uint8Array"))}(0,r.default)(e,p);(0,i.default)(e,o);switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return cbcEncrypt(e,t,p,o,A);case"A128GCM":case"A192GCM":case"A256GCM":return gcmEncrypt(e,t,p,o,A);default:throw new d.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}};t["default"]=encrypt},3650:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(3685);const i=n(5687);const r=n(2361);const o=n(4419);const A=n(1691);const fetchJwks=async(e,t,n)=>{let a;switch(e.protocol){case"https:":a=i.get;break;case"http:":a=s.get;break;default:throw new TypeError("Unsupported URL protocol.")}const{agent:c,headers:u}=n;const l=a(e.href,{agent:c,timeout:t,headers:u});const[d]=await Promise.race([(0,r.once)(l,"response"),(0,r.once)(l,"timeout")]);if(!d){l.destroy();throw new o.JWKSTimeout}if(d.statusCode!==200){throw new o.JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response")}const p=[];for await(const e of d){p.push(e)}try{return JSON.parse(A.decoder.decode((0,A.concat)(...p)))}catch{throw new o.JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON")}};t["default"]=fetchJwks},9737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwkImport=t.jwkExport=t.rsaPssParams=t.oneShotCallback=void 0;const[n,s]=process.versions.node.split(".").map((e=>parseInt(e,10)));t.oneShotCallback=n>=16||n===15&&s>=13;t.rsaPssParams=!("electron"in process.versions)&&(n>=17||n===16&&s>=9);t.jwkExport=n>=16||n===15&&s>=9;t.jwkImport=n>=16||n===15&&s>=12},9378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateKeyPair=t.generateSecret=void 0;const s=n(6113);const i=n(3837);const r=n(5770);const o=n(122);const A=n(4419);const a=(0,i.promisify)(s.generateKeyPair);async function generateSecret(e,t){let n;switch(e){case"HS256":case"HS384":case"HS512":case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":n=parseInt(e.slice(-3),10);break;case"A128KW":case"A192KW":case"A256KW":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":n=parseInt(e.slice(1,4),10);break;default:throw new A.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return(0,s.createSecretKey)((0,r.default)(new Uint8Array(n>>3)))}t.generateSecret=generateSecret;async function generateKeyPair(e,t){var n,s;switch(e){case"RS256":case"RS384":case"RS512":case"PS256":case"PS384":case"PS512":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":case"RSA1_5":{const e=(n=t===null||t===void 0?void 0:t.modulusLength)!==null&&n!==void 0?n:2048;if(typeof e!=="number"||e<2048){throw new A.JOSENotSupported("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used")}const s=await a("rsa",{modulusLength:e,publicExponent:65537});(0,o.setModulusLength)(s.privateKey,e);(0,o.setModulusLength)(s.publicKey,e);return s}case"ES256":return a("ec",{namedCurve:"P-256"});case"ES256K":return a("ec",{namedCurve:"secp256k1"});case"ES384":return a("ec",{namedCurve:"P-384"});case"ES512":return a("ec",{namedCurve:"P-521"});case"EdDSA":{switch(t===null||t===void 0?void 0:t.crv){case undefined:case"Ed25519":return a("ed25519");case"Ed448":return a("ed448");default:throw new A.JOSENotSupported("Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448")}}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":const e=(s=t===null||t===void 0?void 0:t.crv)!==null&&s!==void 0?s:"P-256";switch(e){case undefined:case"P-256":case"P-384":case"P-521":return a("ec",{namedCurve:e});case"X25519":return a("x25519");case"X448":return a("x448");default:throw new A.JOSENotSupported("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}default:throw new A.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}}t.generateKeyPair=generateKeyPair},9302:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setCurve=t.weakMap=void 0;const s=n(4300);const i=n(6113);const r=n(4419);const o=n(6852);const A=n(2768);const a=n(1146);const c=n(7947);const u=s.Buffer.from([42,134,72,206,61,3,1,7]);const l=s.Buffer.from([43,129,4,0,34]);const d=s.Buffer.from([43,129,4,0,35]);const p=s.Buffer.from([43,129,4,0,10]);t.weakMap=new WeakMap;const namedCurveToJOSE=e=>{switch(e){case"prime256v1":return"P-256";case"secp384r1":return"P-384";case"secp521r1":return"P-521";case"secp256k1":return"secp256k1";default:throw new r.JOSENotSupported("Unsupported key curve for this operation")}};const getNamedCurve=(e,n)=>{var s;let g;if((0,o.isCryptoKey)(e)){g=i.KeyObject.from(e)}else if((0,A.default)(e)){g=e}else{throw new TypeError((0,a.default)(e,...c.types))}if(g.type==="secret"){throw new TypeError('only "private" or "public" type keys can be used for this operation')}switch(g.asymmetricKeyType){case"ed25519":case"ed448":return`Ed${g.asymmetricKeyType.slice(2)}`;case"x25519":case"x448":return`X${g.asymmetricKeyType.slice(1)}`;case"ec":{if(t.weakMap.has(g)){return t.weakMap.get(g)}let e=(s=g.asymmetricKeyDetails)===null||s===void 0?void 0:s.namedCurve;if(!e&&g.type==="private"){e=getNamedCurve((0,i.createPublicKey)(g),true)}else if(!e){const t=g.export({format:"der",type:"spki"});const n=t[1]<128?14:15;const s=t[n];const i=t.slice(n+1,n+1+s);if(i.equals(u)){e="prime256v1"}else if(i.equals(l)){e="secp384r1"}else if(i.equals(d)){e="secp521r1"}else if(i.equals(p)){e="secp256k1"}else{throw new r.JOSENotSupported("Unsupported key curve for this operation")}}if(n)return e;const o=namedCurveToJOSE(e);t.weakMap.set(g,o);return o}default:throw new TypeError("Invalid asymmetric key type for this operation")}};function setCurve(e,n){t.weakMap.set(e,n)}t.setCurve=setCurve;t["default"]=getNamedCurve},3170:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(6852);const r=n(3386);const o=n(1146);const A=n(7947);function getSignVerifyKey(e,t,n){if(t instanceof Uint8Array){if(!e.startsWith("HS")){throw new TypeError((0,o.default)(t,...A.types))}return(0,s.createSecretKey)(t)}if(t instanceof s.KeyObject){return t}if((0,i.isCryptoKey)(t)){(0,r.checkSigCryptoKey)(t,e,n);return s.KeyObject.from(t)}throw new TypeError((0,o.default)(t,...A.types,"Uint8Array"))}t["default"]=getSignVerifyKey},3811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function hmacDigest(e){switch(e){case"HS256":return"sha256";case"HS384":return"sha384";case"HS512":return"sha512";default:throw new s.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=hmacDigest},7947:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.types=void 0;const s=n(6852);const i=n(2768);t["default"]=e=>(0,i.default)(e)||(0,s.isCryptoKey)(e);const r=["KeyObject"];t.types=r;if(globalThis.CryptoKey||(s.default===null||s.default===void 0?void 0:s.default.CryptoKey)){r.push("CryptoKey")}},2768:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);t["default"]=i.types.isKeyObject?e=>i.types.isKeyObject(e):e=>e!=null&&e instanceof s.KeyObject},2659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4300);const i=n(6113);const r=n(518);const o=n(4419);const A=n(9302);const a=n(122);const c=n(3341);const u=n(9737);const parse=e=>{if(u.jwkImport&&e.kty!=="oct"){return e.d?(0,i.createPrivateKey)({format:"jwk",key:e}):(0,i.createPublicKey)({format:"jwk",key:e})}switch(e.kty){case"oct":{return(0,i.createSecretKey)((0,r.decode)(e.k))}case"RSA":{const t=new c.default;const n=e.d!==undefined;const r=s.Buffer.from(e.n,"base64");const o=s.Buffer.from(e.e,"base64");if(n){t.zero();t.unsignedInteger(r);t.unsignedInteger(o);t.unsignedInteger(s.Buffer.from(e.d,"base64"));t.unsignedInteger(s.Buffer.from(e.p,"base64"));t.unsignedInteger(s.Buffer.from(e.q,"base64"));t.unsignedInteger(s.Buffer.from(e.dp,"base64"));t.unsignedInteger(s.Buffer.from(e.dq,"base64"));t.unsignedInteger(s.Buffer.from(e.qi,"base64"))}else{t.unsignedInteger(r);t.unsignedInteger(o)}const A=t.end();const u={key:A,format:"der",type:"pkcs1"};const l=n?(0,i.createPrivateKey)(u):(0,i.createPublicKey)(u);(0,a.setModulusLength)(l,r.length<<3);return l}case"EC":{const t=new c.default;const n=e.d!==undefined;const r=s.Buffer.concat([s.Buffer.alloc(1,4),s.Buffer.from(e.x,"base64"),s.Buffer.from(e.y,"base64")]);if(n){t.zero();const n=new c.default;n.oidFor("ecPublicKey");n.oidFor(e.crv);t.add(n.end());const o=new c.default;o.one();o.octStr(s.Buffer.from(e.d,"base64"));const a=new c.default;a.bitStr(r);const u=a.end(s.Buffer.from([161]));o.add(u);const l=o.end();const d=new c.default;d.add(l);const p=d.end(s.Buffer.from([4]));t.add(p);const g=t.end();const h=(0,i.createPrivateKey)({key:g,format:"der",type:"pkcs8"});(0,A.setCurve)(h,e.crv);return h}const o=new c.default;o.oidFor("ecPublicKey");o.oidFor(e.crv);t.add(o.end());t.bitStr(r);const a=t.end();const u=(0,i.createPublicKey)({key:a,format:"der",type:"spki"});(0,A.setCurve)(u,e.crv);return u}case"OKP":{const t=new c.default;const n=e.d!==undefined;if(n){t.zero();const n=new c.default;n.oidFor(e.crv);t.add(n.end());const r=new c.default;r.octStr(s.Buffer.from(e.d,"base64"));const o=r.end(s.Buffer.from([4]));t.add(o);const A=t.end();return(0,i.createPrivateKey)({key:A,format:"der",type:"pkcs8"})}const r=new c.default;r.oidFor(e.crv);t.add(r.end());t.bitStr(s.Buffer.from(e.x,"base64"));const o=t.end();return(0,i.createPublicKey)({key:o,format:"der",type:"spki"})}default:throw new o.JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}};t["default"]=parse},997:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(518);const r=n(3888);const o=n(4419);const A=n(9302);const a=n(6852);const c=n(2768);const u=n(1146);const l=n(7947);const d=n(9737);const keyToJWK=e=>{let t;if((0,a.isCryptoKey)(e)){if(!e.extractable){throw new TypeError("CryptoKey is not extractable")}t=s.KeyObject.from(e)}else if((0,c.default)(e)){t=e}else if(e instanceof Uint8Array){return{kty:"oct",k:(0,i.encode)(e)}}else{throw new TypeError((0,u.default)(e,...l.types,"Uint8Array"))}if(d.jwkExport){if(t.type!=="secret"&&!["rsa","ec","ed25519","x25519","ed448","x448"].includes(t.asymmetricKeyType)){throw new o.JOSENotSupported("Unsupported key asymmetricKeyType")}return t.export({format:"jwk"})}switch(t.type){case"secret":return{kty:"oct",k:(0,i.encode)(t.export())};case"private":case"public":{switch(t.asymmetricKeyType){case"rsa":{const e=t.export({format:"der",type:"pkcs1"});const n=new r.default(e);if(t.type==="private"){n.unsignedInteger()}const s=(0,i.encode)(n.unsignedInteger());const o=(0,i.encode)(n.unsignedInteger());let A;if(t.type==="private"){A={d:(0,i.encode)(n.unsignedInteger()),p:(0,i.encode)(n.unsignedInteger()),q:(0,i.encode)(n.unsignedInteger()),dp:(0,i.encode)(n.unsignedInteger()),dq:(0,i.encode)(n.unsignedInteger()),qi:(0,i.encode)(n.unsignedInteger())}}n.end();return{kty:"RSA",n:s,e:o,...A}}case"ec":{const e=(0,A.default)(t);let n;let r;let a;switch(e){case"secp256k1":n=64;r=31+2;a=-1;break;case"P-256":n=64;r=34+2;a=-1;break;case"P-384":n=96;r=33+2;a=-3;break;case"P-521":n=132;r=33+2;a=-3;break;default:throw new o.JOSENotSupported("Unsupported curve")}if(t.type==="public"){const s=t.export({type:"spki",format:"der"});return{kty:"EC",crv:e,x:(0,i.encode)(s.subarray(-n,-n/2)),y:(0,i.encode)(s.subarray(-n/2))}}const c=t.export({type:"pkcs8",format:"der"});if(c.length<100){r+=a}return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(c.subarray(r,r+n/2))}}case"ed25519":case"x25519":{const e=(0,A.default)(t);if(t.type==="public"){const n=t.export({type:"spki",format:"der"});return{kty:"OKP",crv:e,x:(0,i.encode)(n.subarray(-32))}}const n=t.export({type:"pkcs8",format:"der"});return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(n.subarray(-32))}}case"ed448":case"x448":{const e=(0,A.default)(t);if(t.type==="public"){const n=t.export({type:"spki",format:"der"});return{kty:"OKP",crv:e,x:(0,i.encode)(n.subarray(e==="Ed448"?-57:-56))}}const n=t.export({type:"pkcs8",format:"der"});return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(n.subarray(e==="Ed448"?-57:-56))}}default:throw new o.JOSENotSupported("Unsupported key asymmetricKeyType")}}default:throw new o.JOSENotSupported("Unsupported key type")}};t["default"]=keyToJWK},2413:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(9302);const r=n(4419);const o=n(122);const A=n(9737);const a={padding:s.constants.RSA_PKCS1_PSS_PADDING,saltLength:s.constants.RSA_PSS_SALTLEN_DIGEST};const c=new Map([["ES256","P-256"],["ES256K","secp256k1"],["ES384","P-384"],["ES512","P-521"]]);function keyForCrypto(e,t){switch(e){case"EdDSA":if(!["ed25519","ed448"].includes(t.asymmetricKeyType)){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448")}return t;case"RS256":case"RS384":case"RS512":if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,o.default)(t,e);return t;case A.rsaPssParams&&"PS256":case A.rsaPssParams&&"PS384":case A.rsaPssParams&&"PS512":if(t.asymmetricKeyType==="rsa-pss"){const{hashAlgorithm:n,mgf1HashAlgorithm:s,saltLength:i}=t.asymmetricKeyDetails;const r=parseInt(e.slice(-3),10);if(n!==undefined&&(n!==`sha${r}`||s!==n)){throw new TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}`)}if(i!==undefined&&i>r>>3){throw new TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}`)}}else if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss")}(0,o.default)(t,e);return{key:t,...a};case!A.rsaPssParams&&"PS256":case!A.rsaPssParams&&"PS384":case!A.rsaPssParams&&"PS512":if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,o.default)(t,e);return{key:t,...a};case"ES256":case"ES256K":case"ES384":case"ES512":{if(t.asymmetricKeyType!=="ec"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be ec")}const n=(0,i.default)(t);const s=c.get(e);if(n!==s){throw new TypeError(`Invalid key curve for the algorithm, its curve must be ${s}, got ${n}`)}return{dsaEncoding:"ieee-p1363",key:t}}default:throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=keyForCrypto},6898:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.encrypt=void 0;const s=n(3837);const i=n(6113);const r=n(5770);const o=n(1691);const A=n(518);const a=n(6083);const c=n(3499);const u=n(6852);const l=n(3386);const d=n(2768);const p=n(1146);const g=n(7947);const h=(0,s.promisify)(i.pbkdf2);function getPassword(e,t){if((0,d.default)(e)){return e.export()}if(e instanceof Uint8Array){return e}if((0,u.isCryptoKey)(e)){(0,l.checkEncCryptoKey)(e,t,"deriveBits","deriveKey");return i.KeyObject.from(e).export()}throw new TypeError((0,p.default)(e,...g.types,"Uint8Array"))}const encrypt=async(e,t,n,s=2048,i=(0,r.default)(new Uint8Array(16)))=>{(0,c.default)(i);const u=(0,o.p2s)(e,i);const l=parseInt(e.slice(13,16),10)>>3;const d=getPassword(t,e);const p=await h(d,u,s,l,`sha${e.slice(8,11)}`);const g=await(0,a.wrap)(e.slice(-6),p,n);return{encryptedKey:g,p2c:s,p2s:(0,A.encode)(i)}};t.encrypt=encrypt;const decrypt=async(e,t,n,s,i)=>{(0,c.default)(i);const r=(0,o.p2s)(e,i);const A=parseInt(e.slice(13,16),10)>>3;const u=getPassword(t,e);const l=await h(u,r,s,A,`sha${e.slice(8,11)}`);return(0,a.unwrap)(e.slice(-6),l,n)};t.decrypt=decrypt},5770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=n(6113);Object.defineProperty(t,"default",{enumerable:true,get:function(){return s.randomFillSync}})},9526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.encrypt=void 0;const s=n(6113);const i=n(122);const r=n(6852);const o=n(3386);const A=n(2768);const a=n(1146);const c=n(7947);const checkKey=(e,t)=>{if(e.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,i.default)(e,t)};const resolvePadding=e=>{switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return s.constants.RSA_PKCS1_OAEP_PADDING;case"RSA1_5":return s.constants.RSA_PKCS1_PADDING;default:return undefined}};const resolveOaepHash=e=>{switch(e){case"RSA-OAEP":return"sha1";case"RSA-OAEP-256":return"sha256";case"RSA-OAEP-384":return"sha384";case"RSA-OAEP-512":return"sha512";default:return undefined}};function ensureKeyObject(e,t,...n){if((0,A.default)(e)){return e}if((0,r.isCryptoKey)(e)){(0,o.checkEncCryptoKey)(e,t,...n);return s.KeyObject.from(e)}throw new TypeError((0,a.default)(e,...c.types))}const encrypt=(e,t,n)=>{const i=resolvePadding(e);const r=resolveOaepHash(e);const o=ensureKeyObject(t,e,"wrapKey","encrypt");checkKey(o,e);return(0,s.publicEncrypt)({key:o,oaepHash:r,padding:i},n)};t.encrypt=encrypt;const decrypt=(e,t,n)=>{const i=resolvePadding(e);const r=resolveOaepHash(e);const o=ensureKeyObject(t,e,"unwrapKey","decrypt");checkKey(o,e);return(0,s.privateDecrypt)({key:o,oaepHash:r,padding:i},n)};t.decrypt=decrypt},1622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]="node:crypto"},9935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);const r=n(4965);const o=n(3811);const A=n(2413);const a=n(3170);let c;if(s.sign.length>3){c=(0,i.promisify)(s.sign)}else{c=s.sign}const sign=async(e,t,n)=>{const i=(0,a.default)(e,t,"sign");if(e.startsWith("HS")){const t=s.createHmac((0,o.default)(e),i);t.update(n);return t.digest()}return c((0,r.default)(e),n,(0,A.default)(e,i))};t["default"]=sign},5390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=s.timingSafeEqual;t["default"]=i},3569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);const r=n(4965);const o=n(2413);const A=n(9935);const a=n(3170);const c=n(9737);let u;if(s.verify.length>4&&c.oneShotCallback){u=(0,i.promisify)(s.verify)}else{u=s.verify}const verify=async(e,t,n,i)=>{const c=(0,a.default)(e,t,"verify");if(e.startsWith("HS")){const t=await(0,A.default)(e,c,i);const r=n;try{return s.timingSafeEqual(r,t)}catch{return false}}const l=(0,r.default)(e);const d=(0,o.default)(e,c);try{return await u(l,i,d,n)}catch{return false}};t["default"]=verify},6852:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isCryptoKey=void 0;const s=n(6113);const i=n(3837);const r=s.webcrypto;t["default"]=r;t.isCryptoKey=i.types.isCryptoKey?e=>i.types.isCryptoKey(e):e=>false},7022:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.deflate=t.inflate=void 0;const s=n(3837);const i=n(9796);const r=(0,s.promisify)(i.inflateRaw);const o=(0,s.promisify)(i.deflateRaw);const inflate=e=>r(e);t.inflate=inflate;const deflate=e=>o(e);t.deflate=deflate},3238:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=void 0;const s=n(518);t.encode=s.encode;t.decode=s.decode},5611:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decodeJwt=void 0;const s=n(3238);const i=n(1691);const r=n(9127);const o=n(4419);function decodeJwt(e){if(typeof e!=="string")throw new o.JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:n}=e.split(".");if(n===5)throw new o.JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");if(n!==3)throw new o.JWTInvalid("Invalid JWT");if(!t)throw new o.JWTInvalid("JWTs must contain a payload");let A;try{A=(0,s.decode)(t)}catch{throw new o.JWTInvalid("Failed to base64url decode the payload")}let a;try{a=JSON.parse(i.decoder.decode(A))}catch{throw new o.JWTInvalid("Failed to parse the decoded payload as JSON")}if(!(0,r.default)(a))throw new o.JWTInvalid("Invalid JWT Claims Set");return a}t.decodeJwt=decodeJwt},3991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decodeProtectedHeader=void 0;const s=n(3238);const i=n(1691);const r=n(9127);function decodeProtectedHeader(e){let t;if(typeof e==="string"){const n=e.split(".");if(n.length===3||n.length===5){[t]=n}}else if(typeof e==="object"&&e){if("protected"in e){t=e.protected}else{throw new TypeError("Token does not contain a Protected Header")}}try{if(typeof t!=="string"||!t){throw new Error}const e=JSON.parse(i.decoder.decode((0,s.decode)(t)));if(!(0,r.default)(e)){throw new Error}return e}catch{throw new TypeError("Invalid Token or Protected Header formatting")}}t.decodeProtectedHeader=decodeProtectedHeader},4419:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JWSSignatureVerificationFailed=t.JWKSTimeout=t.JWKSMultipleMatchingKeys=t.JWKSNoMatchingKey=t.JWKSInvalid=t.JWKInvalid=t.JWTInvalid=t.JWSInvalid=t.JWEInvalid=t.JWEDecryptionFailed=t.JOSENotSupported=t.JOSEAlgNotAllowed=t.JWTExpired=t.JWTClaimValidationFailed=t.JOSEError=void 0;class JOSEError extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e);this.code="ERR_JOSE_GENERIC";this.name=this.constructor.name;(t=Error.captureStackTrace)===null||t===void 0?void 0:t.call(Error,this,this.constructor)}}t.JOSEError=JOSEError;class JWTClaimValidationFailed extends JOSEError{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t="unspecified",n="unspecified"){super(e);this.code="ERR_JWT_CLAIM_VALIDATION_FAILED";this.claim=t;this.reason=n}}t.JWTClaimValidationFailed=JWTClaimValidationFailed;class JWTExpired extends JOSEError{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t="unspecified",n="unspecified"){super(e);this.code="ERR_JWT_EXPIRED";this.claim=t;this.reason=n}}t.JWTExpired=JWTExpired;class JOSEAlgNotAllowed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}t.JOSEAlgNotAllowed=JOSEAlgNotAllowed;class JOSENotSupported extends JOSEError{constructor(){super(...arguments);this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}t.JOSENotSupported=JOSENotSupported;class JWEDecryptionFailed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWE_DECRYPTION_FAILED";this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}t.JWEDecryptionFailed=JWEDecryptionFailed;class JWEInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}t.JWEInvalid=JWEInvalid;class JWSInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}t.JWSInvalid=JWSInvalid;class JWTInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}t.JWTInvalid=JWTInvalid;class JWKInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}t.JWKInvalid=JWKInvalid;class JWKSInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}t.JWKSInvalid=JWKSInvalid;class JWKSNoMatchingKey extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_NO_MATCHING_KEY";this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}t.JWKSNoMatchingKey=JWKSNoMatchingKey;class JWKSMultipleMatchingKeys extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}t.JWKSMultipleMatchingKeys=JWKSMultipleMatchingKeys;Symbol.asyncIterator;class JWKSTimeout extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_TIMEOUT";this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}t.JWKSTimeout=JWKSTimeout;class JWSSignatureVerificationFailed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}t.JWSSignatureVerificationFailed=JWSSignatureVerificationFailed},1173:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(1622);t["default"]=s.default},7426:(e,t,n)=>{ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ +e.exports=n(3765)},3583:(e,t,n)=>{"use strict"; +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */var s=n(7426);var i=n(1017).extname;var r=/^\s*([^;\s]*)(?:;|\s|$)/;var o=/^text\//i;t.charset=charset;t.charsets={lookup:charset};t.contentType=contentType;t.extension=extension;t.extensions=Object.create(null);t.lookup=lookup;t.types=Object.create(null);populateMaps(t.extensions,t.types);function charset(e){if(!e||typeof e!=="string"){return false}var t=r.exec(e);var n=t&&s[t[1].toLowerCase()];if(n&&n.charset){return n.charset}if(t&&o.test(t[1])){return"UTF-8"}return false}function contentType(e){if(!e||typeof e!=="string"){return false}var n=e.indexOf("/")===-1?t.lookup(e):e;if(!n){return false}if(n.indexOf("charset")===-1){var s=t.charset(n);if(s)n+="; charset="+s.toLowerCase()}return n}function extension(e){if(!e||typeof e!=="string"){return false}var n=r.exec(e);var s=n&&t.extensions[n[1].toLowerCase()];if(!s||!s.length){return false}return s[0]}function lookup(e){if(!e||typeof e!=="string"){return false}var n=i("x."+e).toLowerCase().substr(1);if(!n){return false}return t.types[n]||false}function populateMaps(e,t){var n=["nginx","apache",undefined,"iana"];Object.keys(s).forEach((function forEachMimeType(i){var r=s[i];var o=r.extensions;if(!o||!o.length){return}e[i]=o;for(var A=0;Au||c===u&&t[a].substr(0,12)==="application/")){continue}}t[a]=i}}))}},3329:(e,t,n)=>{"use strict";var s=n(7310).parse;var i={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};var r=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function getProxyForUrl(e){var t=typeof e==="string"?s(e):e||{};var n=t.protocol;var r=t.host;var o=t.port;if(typeof r!=="string"||!r||typeof n!=="string"){return""}n=n.split(":",1)[0];r=r.replace(/:\d*$/,"");o=parseInt(o)||i[n]||0;if(!shouldProxy(r,o)){return""}var A=getEnv("npm_config_"+n+"_proxy")||getEnv(n+"_proxy")||getEnv("npm_config_proxy")||getEnv("all_proxy");if(A&&A.indexOf("://")===-1){A=n+"://"+A}return A}function shouldProxy(e,t){var n=(getEnv("npm_config_no_proxy")||getEnv("no_proxy")).toLowerCase();if(!n){return true}if(n==="*"){return false}return n.split(/[,\s]/).every((function(n){if(!n){return true}var s=n.match(/^(.+):(\d+)$/);var i=s?s[1]:n;var o=s?parseInt(s[2]):0;if(o&&o!==t){return true}if(!/^[.*]/.test(i)){return e!==i}if(i.charAt(0)==="*"){i=i.slice(1)}return!r.call(e,i)}))}function getEnv(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}t.getProxyForUrl=getProxyForUrl},4294:(e,t,n)=>{e.exports=n(4219)},4219:(e,t,n)=>{"use strict";var s=n(1808);var i=n(4404);var r=n(3685);var o=n(5687);var A=n(2361);var a=n(9491);var c=n(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=r.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=r.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||r.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,n,s,i){var r=toOptions(n,s,i);for(var o=0,A=t.requests.length;o=this.maxSockets){i.requests.push(r);return}i.createSocket(r,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,r)}function onCloseOrRemove(e){i.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var n=this;var s={};n.sockets.push(s);var i=mergeOptions({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}u("making CONNECT request");var r=n.request(i);r.useChunkedEncodingByDefault=false;r.once("response",onResponse);r.once("upgrade",onUpgrade);r.once("connect",onConnect);r.once("error",onError);r.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,n){process.nextTick((function(){onConnect(e,t,n)}))}function onConnect(i,o,A){r.removeAllListeners();o.removeAllListeners();if(i.statusCode!==200){u("tunneling socket could not be established, statusCode=%d",i.statusCode);o.destroy();var a=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);a.code="ECONNRESET";e.request.emit("error",a);n.removeSocket(s);return}if(A.length>0){u("got illegal response body from proxy");o.destroy();var a=new Error("got illegal response body from proxy");a.code="ECONNRESET";e.request.emit("error",a);n.removeSocket(s);return}u("tunneling connection has established");n.sockets[n.sockets.indexOf(s)]=o;return t(o)}function onError(t){r.removeAllListeners();u("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, "+"cause="+t.message);i.code="ECONNRESET";e.request.emit("error",i);n.removeSocket(s)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var n=this.requests.shift();if(n){this.createSocket(n,(function(e){n.request.onSocket(e)}))}};function createSecureSocket(e,t){var n=this;TunnelingAgent.prototype.createSocket.call(n,e,(function(s){var r=e.request.getHeader("host");var o=mergeOptions({},n.options,{socket:s,servername:r?r.replace(/:.*$/,""):e.host});var A=i.connect(0,o);n.sockets[n.sockets.indexOf(s)]=A;t(A)}))}function toOptions(e,t,n){if(typeof e==="string"){return{host:e,port:t,localAddress:n}}return e}function mergeOptions(e){for(var t=1,n=arguments.length;t{"use strict";const s=n(3598);const i=n(412);const r=n(8045);const o=n(4634);const A=n(7931);const a=n(7890);const c=n(3983);const{InvalidArgumentError:u}=r;const l=n(4059);const d=n(2067);const p=n(8687);const g=n(6771);const h=n(6193);const f=n(888);const E=n(7858);const{getGlobalDispatcher:m,setGlobalDispatcher:C}=n(1892);const Q=n(6930);const I=n(2860);const B=n(8861);let y;try{n(6113);y=true}catch{y=false}Object.assign(i.prototype,l);e.exports.Dispatcher=i;e.exports.Client=s;e.exports.Pool=o;e.exports.BalancedPool=A;e.exports.Agent=a;e.exports.ProxyAgent=E;e.exports.DecoratorHandler=Q;e.exports.RedirectHandler=I;e.exports.createRedirectInterceptor=B;e.exports.buildConnector=d;e.exports.errors=r;function makeDispatcher(e){return(t,n,s)=>{if(typeof n==="function"){s=n;n=null}if(!t||typeof t!=="string"&&typeof t!=="object"&&!(t instanceof URL)){throw new u("invalid url")}if(n!=null&&typeof n!=="object"){throw new u("invalid opts")}if(n&&n.path!=null){if(typeof n.path!=="string"){throw new u("invalid opts.path")}let e=n.path;if(!n.path.startsWith("/")){e=`/${e}`}t=new URL(c.parseOrigin(t).origin+e)}else{if(!n){n=typeof t==="object"?t:{}}t=c.parseURL(t)}const{agent:i,dispatcher:r=m()}=n;if(i){throw new u("unsupported opts.agent. Did you mean opts.client?")}return e.call(r,{...n,origin:t.origin,path:t.search?`${t.pathname}${t.search}`:t.pathname,method:n.method||(n.body?"PUT":"GET")},s)}}e.exports.setGlobalDispatcher=C;e.exports.getGlobalDispatcher=m;if(c.nodeMajor>16||c.nodeMajor===16&&c.nodeMinor>=8){let t=null;e.exports.fetch=async function fetch(e){if(!t){t=n(4881).fetch}try{return await t(...arguments)}catch(e){if(typeof e==="object"){Error.captureStackTrace(e,this)}throw e}};e.exports.Headers=n(554).Headers;e.exports.Response=n(7823).Response;e.exports.Request=n(8359).Request;e.exports.FormData=n(2015).FormData;e.exports.File=n(8511).File;e.exports.FileReader=n(1446).FileReader;const{setGlobalOrigin:s,getGlobalOrigin:i}=n(1246);e.exports.setGlobalOrigin=s;e.exports.getGlobalOrigin=i;const{CacheStorage:r}=n(7907);const{kConstruct:o}=n(9174);e.exports.caches=new r(o)}if(c.nodeMajor>=16){const{deleteCookie:t,getCookies:s,getSetCookies:i,setCookie:r}=n(1724);e.exports.deleteCookie=t;e.exports.getCookies=s;e.exports.getSetCookies=i;e.exports.setCookie=r;const{parseMIMEType:o,serializeAMimeType:A}=n(685);e.exports.parseMIMEType=o;e.exports.serializeAMimeType=A}if(c.nodeMajor>=18&&y){const{WebSocket:t}=n(4284);e.exports.WebSocket=t}e.exports.request=makeDispatcher(l.request);e.exports.stream=makeDispatcher(l.stream);e.exports.pipeline=makeDispatcher(l.pipeline);e.exports.connect=makeDispatcher(l.connect);e.exports.upgrade=makeDispatcher(l.upgrade);e.exports.MockClient=p;e.exports.MockPool=h;e.exports.MockAgent=g;e.exports.mockErrors=f},7890:(e,t,n)=>{"use strict";const{InvalidArgumentError:s}=n(8045);const{kClients:i,kRunning:r,kClose:o,kDestroy:A,kDispatch:a,kInterceptors:c}=n(2785);const u=n(4839);const l=n(4634);const d=n(3598);const p=n(3983);const g=n(8861);const{WeakRef:h,FinalizationRegistry:f}=n(6436)();const E=Symbol("onConnect");const m=Symbol("onDisconnect");const C=Symbol("onConnectionError");const Q=Symbol("maxRedirections");const I=Symbol("onDrain");const B=Symbol("factory");const y=Symbol("finalizer");const b=Symbol("options");function defaultFactory(e,t){return t&&t.connections===1?new d(e,t):new l(e,t)}class Agent extends u{constructor({factory:e=defaultFactory,maxRedirections:t=0,connect:n,...r}={}){super();if(typeof e!=="function"){throw new s("factory must be a function.")}if(n!=null&&typeof n!=="function"&&typeof n!=="object"){throw new s("connect must be a function or an object")}if(!Number.isInteger(t)||t<0){throw new s("maxRedirections must be a positive number")}if(n&&typeof n!=="function"){n={...n}}this[c]=r.interceptors&&r.interceptors.Agent&&Array.isArray(r.interceptors.Agent)?r.interceptors.Agent:[g({maxRedirections:t})];this[b]={...p.deepClone(r),connect:n};this[b].interceptors=r.interceptors?{...r.interceptors}:undefined;this[Q]=t;this[B]=e;this[i]=new Map;this[y]=new f((e=>{const t=this[i].get(e);if(t!==undefined&&t.deref()===undefined){this[i].delete(e)}}));const o=this;this[I]=(e,t)=>{o.emit("drain",e,[o,...t])};this[E]=(e,t)=>{o.emit("connect",e,[o,...t])};this[m]=(e,t,n)=>{o.emit("disconnect",e,[o,...t],n)};this[C]=(e,t,n)=>{o.emit("connectionError",e,[o,...t],n)}}get[r](){let e=0;for(const t of this[i].values()){const n=t.deref();if(n){e+=n[r]}}return e}[a](e,t){let n;if(e.origin&&(typeof e.origin==="string"||e.origin instanceof URL)){n=String(e.origin)}else{throw new s("opts.origin must be a non-empty string or URL.")}const r=this[i].get(n);let o=r?r.deref():null;if(!o){o=this[B](e.origin,this[b]).on("drain",this[I]).on("connect",this[E]).on("disconnect",this[m]).on("connectionError",this[C]);this[i].set(n,new h(o));this[y].register(o,n)}return o.dispatch(e,t)}async[o](){const e=[];for(const t of this[i].values()){const n=t.deref();if(n){e.push(n.close())}}await Promise.all(e)}async[A](e){const t=[];for(const n of this[i].values()){const s=n.deref();if(s){t.push(s.destroy(e))}}await Promise.all(t)}}e.exports=Agent},7032:(e,t,n)=>{const{addAbortListener:s}=n(3983);const{RequestAbortedError:i}=n(8045);const r=Symbol("kListener");const o=Symbol("kSignal");function abort(e){if(e.abort){e.abort()}else{e.onError(new i)}}function addSignal(e,t){e[o]=null;e[r]=null;if(!t){return}if(t.aborted){abort(e);return}e[o]=t;e[r]=()=>{abort(e)};s(e[o],e[r])}function removeSignal(e){if(!e[o]){return}if("removeEventListener"in e[o]){e[o].removeEventListener("abort",e[r])}else{e[o].removeListener("abort",e[r])}e[o]=null;e[r]=null}e.exports={addSignal:addSignal,removeSignal:removeSignal}},9744:(e,t,n)=>{"use strict";const{AsyncResource:s}=n(852);const{InvalidArgumentError:i,RequestAbortedError:r,SocketError:o}=n(8045);const A=n(3983);const{addSignal:a,removeSignal:c}=n(7032);class ConnectHandler extends s{constructor(e,t){if(!e||typeof e!=="object"){throw new i("invalid opts")}if(typeof t!=="function"){throw new i("invalid callback")}const{signal:n,opaque:s,responseHeaders:r}=e;if(n&&typeof n.on!=="function"&&typeof n.addEventListener!=="function"){throw new i("signal must be an EventEmitter or EventTarget")}super("UNDICI_CONNECT");this.opaque=s||null;this.responseHeaders=r||null;this.callback=t;this.abort=null;a(this,n)}onConnect(e,t){if(!this.callback){throw new r}this.abort=e;this.context=t}onHeaders(){throw new o("bad connect",null)}onUpgrade(e,t,n){const{callback:s,opaque:i,context:r}=this;c(this);this.callback=null;let o=t;if(o!=null){o=this.responseHeaders==="raw"?A.parseRawHeaders(t):A.parseHeaders(t)}this.runInAsyncScope(s,null,null,{statusCode:e,headers:o,socket:n,opaque:i,context:r})}onError(e){const{callback:t,opaque:n}=this;c(this);if(t){this.callback=null;queueMicrotask((()=>{this.runInAsyncScope(t,null,e,{opaque:n})}))}}}function connect(e,t){if(t===undefined){return new Promise(((t,n)=>{connect.call(this,e,((e,s)=>e?n(e):t(s)))}))}try{const n=new ConnectHandler(e,t);this.dispatch({...e,method:"CONNECT"},n)}catch(n){if(typeof t!=="function"){throw n}const s=e&&e.opaque;queueMicrotask((()=>t(n,{opaque:s})))}}e.exports=connect},8752:(e,t,n)=>{"use strict";const{Readable:s,Duplex:i,PassThrough:r}=n(2781);const{InvalidArgumentError:o,InvalidReturnValueError:A,RequestAbortedError:a}=n(8045);const c=n(3983);const{AsyncResource:u}=n(852);const{addSignal:l,removeSignal:d}=n(7032);const p=n(9491);const g=Symbol("resume");class PipelineRequest extends s{constructor(){super({autoDestroy:true});this[g]=null}_read(){const{[g]:e}=this;if(e){this[g]=null;e()}}_destroy(e,t){this._read();t(e)}}class PipelineResponse extends s{constructor(e){super({autoDestroy:true});this[g]=e}_read(){this[g]()}_destroy(e,t){if(!e&&!this._readableState.endEmitted){e=new a}t(e)}}class PipelineHandler extends u{constructor(e,t){if(!e||typeof e!=="object"){throw new o("invalid opts")}if(typeof t!=="function"){throw new o("invalid handler")}const{signal:n,method:s,opaque:r,onInfo:A,responseHeaders:u}=e;if(n&&typeof n.on!=="function"&&typeof n.addEventListener!=="function"){throw new o("signal must be an EventEmitter or EventTarget")}if(s==="CONNECT"){throw new o("invalid method")}if(A&&typeof A!=="function"){throw new o("invalid onInfo callback")}super("UNDICI_PIPELINE");this.opaque=r||null;this.responseHeaders=u||null;this.handler=t;this.abort=null;this.context=null;this.onInfo=A||null;this.req=(new PipelineRequest).on("error",c.nop);this.ret=new i({readableObjectMode:e.objectMode,autoDestroy:true,read:()=>{const{body:e}=this;if(e&&e.resume){e.resume()}},write:(e,t,n)=>{const{req:s}=this;if(s.push(e,t)||s._readableState.destroyed){n()}else{s[g]=n}},destroy:(e,t)=>{const{body:n,req:s,res:i,ret:r,abort:o}=this;if(!e&&!r._readableState.endEmitted){e=new a}if(o&&e){o()}c.destroy(n,e);c.destroy(s,e);c.destroy(i,e);d(this);t(e)}}).on("prefinish",(()=>{const{req:e}=this;e.push(null)}));this.res=null;l(this,n)}onConnect(e,t){const{ret:n,res:s}=this;p(!s,"pipeline cannot be retried");if(n.destroyed){throw new a}this.abort=e;this.context=t}onHeaders(e,t,n){const{opaque:s,handler:i,context:r}=this;if(e<200){if(this.onInfo){const n=this.responseHeaders==="raw"?c.parseRawHeaders(t):c.parseHeaders(t);this.onInfo({statusCode:e,headers:n})}return}this.res=new PipelineResponse(n);let o;try{this.handler=null;const n=this.responseHeaders==="raw"?c.parseRawHeaders(t):c.parseHeaders(t);o=this.runInAsyncScope(i,null,{statusCode:e,headers:n,opaque:s,body:this.res,context:r})}catch(e){this.res.on("error",c.nop);throw e}if(!o||typeof o.on!=="function"){throw new A("expected Readable")}o.on("data",(e=>{const{ret:t,body:n}=this;if(!t.push(e)&&n.pause){n.pause()}})).on("error",(e=>{const{ret:t}=this;c.destroy(t,e)})).on("end",(()=>{const{ret:e}=this;e.push(null)})).on("close",(()=>{const{ret:e}=this;if(!e._readableState.ended){c.destroy(e,new a)}}));this.body=o}onData(e){const{res:t}=this;return t.push(e)}onComplete(e){const{res:t}=this;t.push(null)}onError(e){const{ret:t}=this;this.handler=null;c.destroy(t,e)}}function pipeline(e,t){try{const n=new PipelineHandler(e,t);this.dispatch({...e,body:n.req},n);return n.ret}catch(e){return(new r).destroy(e)}}e.exports=pipeline},5448:(e,t,n)=>{"use strict";const s=n(3858);const{InvalidArgumentError:i,RequestAbortedError:r}=n(8045);const o=n(3983);const{getResolveErrorBodyCallback:A}=n(7474);const{AsyncResource:a}=n(852);const{addSignal:c,removeSignal:u}=n(7032);class RequestHandler extends a{constructor(e,t){if(!e||typeof e!=="object"){throw new i("invalid opts")}const{signal:n,method:s,opaque:r,body:A,onInfo:a,responseHeaders:u,throwOnError:l,highWaterMark:d}=e;try{if(typeof t!=="function"){throw new i("invalid callback")}if(d&&(typeof d!=="number"||d<0)){throw new i("invalid highWaterMark")}if(n&&typeof n.on!=="function"&&typeof n.addEventListener!=="function"){throw new i("signal must be an EventEmitter or EventTarget")}if(s==="CONNECT"){throw new i("invalid method")}if(a&&typeof a!=="function"){throw new i("invalid onInfo callback")}super("UNDICI_REQUEST")}catch(e){if(o.isStream(A)){o.destroy(A.on("error",o.nop),e)}throw e}this.responseHeaders=u||null;this.opaque=r||null;this.callback=t;this.res=null;this.abort=null;this.body=A;this.trailers={};this.context=null;this.onInfo=a||null;this.throwOnError=l;this.highWaterMark=d;if(o.isStream(A)){A.on("error",(e=>{this.onError(e)}))}c(this,n)}onConnect(e,t){if(!this.callback){throw new r}this.abort=e;this.context=t}onHeaders(e,t,n,i){const{callback:r,opaque:a,abort:c,context:u,responseHeaders:l,highWaterMark:d}=this;const p=l==="raw"?o.parseRawHeaders(t):o.parseHeaders(t);if(e<200){if(this.onInfo){this.onInfo({statusCode:e,headers:p})}return}const g=l==="raw"?o.parseHeaders(t):p;const h=g["content-type"];const f=new s({resume:n,abort:c,contentType:h,highWaterMark:d});this.callback=null;this.res=f;if(r!==null){if(this.throwOnError&&e>=400){this.runInAsyncScope(A,null,{callback:r,body:f,contentType:h,statusCode:e,statusMessage:i,headers:p})}else{this.runInAsyncScope(r,null,null,{statusCode:e,headers:p,trailers:this.trailers,opaque:a,body:f,context:u})}}}onData(e){const{res:t}=this;return t.push(e)}onComplete(e){const{res:t}=this;u(this);o.parseHeaders(e,this.trailers);t.push(null)}onError(e){const{res:t,callback:n,body:s,opaque:i}=this;u(this);if(n){this.callback=null;queueMicrotask((()=>{this.runInAsyncScope(n,null,e,{opaque:i})}))}if(t){this.res=null;queueMicrotask((()=>{o.destroy(t,e)}))}if(s){this.body=null;o.destroy(s,e)}}}function request(e,t){if(t===undefined){return new Promise(((t,n)=>{request.call(this,e,((e,s)=>e?n(e):t(s)))}))}try{this.dispatch(e,new RequestHandler(e,t))}catch(n){if(typeof t!=="function"){throw n}const s=e&&e.opaque;queueMicrotask((()=>t(n,{opaque:s})))}}e.exports=request},5395:(e,t,n)=>{"use strict";const{finished:s,PassThrough:i}=n(2781);const{InvalidArgumentError:r,InvalidReturnValueError:o,RequestAbortedError:A}=n(8045);const a=n(3983);const{getResolveErrorBodyCallback:c}=n(7474);const{AsyncResource:u}=n(852);const{addSignal:l,removeSignal:d}=n(7032);class StreamHandler extends u{constructor(e,t,n){if(!e||typeof e!=="object"){throw new r("invalid opts")}const{signal:s,method:i,opaque:o,body:A,onInfo:c,responseHeaders:u,throwOnError:d}=e;try{if(typeof n!=="function"){throw new r("invalid callback")}if(typeof t!=="function"){throw new r("invalid factory")}if(s&&typeof s.on!=="function"&&typeof s.addEventListener!=="function"){throw new r("signal must be an EventEmitter or EventTarget")}if(i==="CONNECT"){throw new r("invalid method")}if(c&&typeof c!=="function"){throw new r("invalid onInfo callback")}super("UNDICI_STREAM")}catch(e){if(a.isStream(A)){a.destroy(A.on("error",a.nop),e)}throw e}this.responseHeaders=u||null;this.opaque=o||null;this.factory=t;this.callback=n;this.res=null;this.abort=null;this.context=null;this.trailers=null;this.body=A;this.onInfo=c||null;this.throwOnError=d||false;if(a.isStream(A)){A.on("error",(e=>{this.onError(e)}))}l(this,s)}onConnect(e,t){if(!this.callback){throw new A}this.abort=e;this.context=t}onHeaders(e,t,n,r){const{factory:A,opaque:u,context:l,callback:d,responseHeaders:p}=this;const g=p==="raw"?a.parseRawHeaders(t):a.parseHeaders(t);if(e<200){if(this.onInfo){this.onInfo({statusCode:e,headers:g})}return}this.factory=null;let h;if(this.throwOnError&&e>=400){const n=p==="raw"?a.parseHeaders(t):g;const s=n["content-type"];h=new i;this.callback=null;this.runInAsyncScope(c,null,{callback:d,body:h,contentType:s,statusCode:e,statusMessage:r,headers:g})}else{if(A===null){return}h=this.runInAsyncScope(A,null,{statusCode:e,headers:g,opaque:u,context:l});if(!h||typeof h.write!=="function"||typeof h.end!=="function"||typeof h.on!=="function"){throw new o("expected Writable")}s(h,{readable:false},(e=>{const{callback:t,res:n,opaque:s,trailers:i,abort:r}=this;this.res=null;if(e||!n.readable){a.destroy(n,e)}this.callback=null;this.runInAsyncScope(t,null,e||null,{opaque:s,trailers:i});if(e){r()}}))}h.on("drain",n);this.res=h;const f=h.writableNeedDrain!==undefined?h.writableNeedDrain:h._writableState&&h._writableState.needDrain;return f!==true}onData(e){const{res:t}=this;return t?t.write(e):true}onComplete(e){const{res:t}=this;d(this);if(!t){return}this.trailers=a.parseHeaders(e);t.end()}onError(e){const{res:t,callback:n,opaque:s,body:i}=this;d(this);this.factory=null;if(t){this.res=null;a.destroy(t,e)}else if(n){this.callback=null;queueMicrotask((()=>{this.runInAsyncScope(n,null,e,{opaque:s})}))}if(i){this.body=null;a.destroy(i,e)}}}function stream(e,t,n){if(n===undefined){return new Promise(((n,s)=>{stream.call(this,e,t,((e,t)=>e?s(e):n(t)))}))}try{this.dispatch(e,new StreamHandler(e,t,n))}catch(t){if(typeof n!=="function"){throw t}const s=e&&e.opaque;queueMicrotask((()=>n(t,{opaque:s})))}}e.exports=stream},6923:(e,t,n)=>{"use strict";const{InvalidArgumentError:s,RequestAbortedError:i,SocketError:r}=n(8045);const{AsyncResource:o}=n(852);const A=n(3983);const{addSignal:a,removeSignal:c}=n(7032);const u=n(9491);class UpgradeHandler extends o{constructor(e,t){if(!e||typeof e!=="object"){throw new s("invalid opts")}if(typeof t!=="function"){throw new s("invalid callback")}const{signal:n,opaque:i,responseHeaders:r}=e;if(n&&typeof n.on!=="function"&&typeof n.addEventListener!=="function"){throw new s("signal must be an EventEmitter or EventTarget")}super("UNDICI_UPGRADE");this.responseHeaders=r||null;this.opaque=i||null;this.callback=t;this.abort=null;this.context=null;a(this,n)}onConnect(e,t){if(!this.callback){throw new i}this.abort=e;this.context=null}onHeaders(){throw new r("bad upgrade",null)}onUpgrade(e,t,n){const{callback:s,opaque:i,context:r}=this;u.strictEqual(e,101);c(this);this.callback=null;const o=this.responseHeaders==="raw"?A.parseRawHeaders(t):A.parseHeaders(t);this.runInAsyncScope(s,null,null,{headers:o,socket:n,opaque:i,context:r})}onError(e){const{callback:t,opaque:n}=this;c(this);if(t){this.callback=null;queueMicrotask((()=>{this.runInAsyncScope(t,null,e,{opaque:n})}))}}}function upgrade(e,t){if(t===undefined){return new Promise(((t,n)=>{upgrade.call(this,e,((e,s)=>e?n(e):t(s)))}))}try{const n=new UpgradeHandler(e,t);this.dispatch({...e,method:e.method||"GET",upgrade:e.protocol||"Websocket"},n)}catch(n){if(typeof t!=="function"){throw n}const s=e&&e.opaque;queueMicrotask((()=>t(n,{opaque:s})))}}e.exports=upgrade},4059:(e,t,n)=>{"use strict";e.exports.request=n(5448);e.exports.stream=n(5395);e.exports.pipeline=n(8752);e.exports.upgrade=n(6923);e.exports.connect=n(9744)},3858:(e,t,n)=>{"use strict";const s=n(9491);const{Readable:i}=n(2781);const{RequestAbortedError:r,NotSupportedError:o,InvalidArgumentError:A}=n(8045);const a=n(3983);const{ReadableStreamFrom:c,toUSVString:u}=n(3983);let l;const d=Symbol("kConsume");const p=Symbol("kReading");const g=Symbol("kBody");const h=Symbol("abort");const f=Symbol("kContentType");e.exports=class BodyReadable extends i{constructor({resume:e,abort:t,contentType:n="",highWaterMark:s=64*1024}){super({autoDestroy:true,read:e,highWaterMark:s});this._readableState.dataEmitted=false;this[h]=t;this[d]=null;this[g]=null;this[f]=n;this[p]=false}destroy(e){if(this.destroyed){return this}if(!e&&!this._readableState.endEmitted){e=new r}if(e){this[h]()}return super.destroy(e)}emit(e,...t){if(e==="data"){this._readableState.dataEmitted=true}else if(e==="error"){this._readableState.errorEmitted=true}return super.emit(e,...t)}on(e,...t){if(e==="data"||e==="readable"){this[p]=true}return super.on(e,...t)}addListener(e,...t){return this.on(e,...t)}off(e,...t){const n=super.off(e,...t);if(e==="data"||e==="readable"){this[p]=this.listenerCount("data")>0||this.listenerCount("readable")>0}return n}removeListener(e,...t){return this.off(e,...t)}push(e){if(this[d]&&e!==null&&this.readableLength===0){consumePush(this[d],e);return this[p]?super.push(e):true}return super.push(e)}async text(){return consume(this,"text")}async json(){return consume(this,"json")}async blob(){return consume(this,"blob")}async arrayBuffer(){return consume(this,"arrayBuffer")}async formData(){throw new o}get bodyUsed(){return a.isDisturbed(this)}get body(){if(!this[g]){this[g]=c(this);if(this[d]){this[g].getReader();s(this[g].locked)}}return this[g]}async dump(e){let t=e&&Number.isFinite(e.limit)?e.limit:262144;const n=e&&e.signal;const abortFn=()=>{this.destroy()};let s;if(n){if(typeof n!=="object"||!("aborted"in n)){throw new A("signal must be an AbortSignal")}a.throwIfAborted(n);s=a.addAbortListener(n,abortFn)}try{for await(const e of this){a.throwIfAborted(n);t-=Buffer.byteLength(e);if(t<0){return}}}catch{a.throwIfAborted(n)}finally{if(typeof s==="function"){s()}else if(s){s[Symbol.dispose]()}}}};function isLocked(e){return e[g]&&e[g].locked===true||e[d]}function isUnusable(e){return a.isDisturbed(e)||isLocked(e)}async function consume(e,t){if(isUnusable(e)){throw new TypeError("unusable")}s(!e[d]);return new Promise(((n,s)=>{e[d]={type:t,stream:e,resolve:n,reject:s,length:0,body:[]};e.on("error",(function(e){consumeFinish(this[d],e)})).on("close",(function(){if(this[d].body!==null){consumeFinish(this[d],new r)}}));process.nextTick(consumeStart,e[d])}))}function consumeStart(e){if(e.body===null){return}const{_readableState:t}=e.stream;for(const n of t.buffer){consumePush(e,n)}if(t.endEmitted){consumeEnd(this[d])}else{e.stream.on("end",(function(){consumeEnd(this[d])}))}e.stream.resume();while(e.stream.read()!=null){}}function consumeEnd(e){const{type:t,body:s,resolve:i,stream:r,length:o}=e;try{if(t==="text"){i(u(Buffer.concat(s)))}else if(t==="json"){i(JSON.parse(Buffer.concat(s)))}else if(t==="arrayBuffer"){const e=new Uint8Array(o);let t=0;for(const n of s){e.set(n,t);t+=n.byteLength}i(e.buffer)}else if(t==="blob"){if(!l){l=n(4300).Blob}i(new l(s,{type:r[f]}))}consumeFinish(e)}catch(e){r.destroy(e)}}function consumePush(e,t){e.length+=t.length;e.body.push(t)}function consumeFinish(e,t){if(e.body===null){return}if(t){e.reject(t)}else{e.resolve()}e.type=null;e.stream=null;e.resolve=null;e.reject=null;e.length=0;e.body=null}},7474:(e,t,n)=>{const s=n(9491);const{ResponseStatusCodeError:i}=n(8045);const{toUSVString:r}=n(3983);async function getResolveErrorBodyCallback({callback:e,body:t,contentType:n,statusCode:o,statusMessage:A,headers:a}){s(t);let c=[];let u=0;for await(const e of t){c.push(e);u+=e.length;if(u>128*1024){c=null;break}}if(o===204||!n||!c){process.nextTick(e,new i(`Response status code ${o}${A?`: ${A}`:""}`,o,a));return}try{if(n.startsWith("application/json")){const t=JSON.parse(r(Buffer.concat(c)));process.nextTick(e,new i(`Response status code ${o}${A?`: ${A}`:""}`,o,a,t));return}if(n.startsWith("text/")){const t=r(Buffer.concat(c));process.nextTick(e,new i(`Response status code ${o}${A?`: ${A}`:""}`,o,a,t));return}}catch(e){}process.nextTick(e,new i(`Response status code ${o}${A?`: ${A}`:""}`,o,a))}e.exports={getResolveErrorBodyCallback:getResolveErrorBodyCallback}},7931:(e,t,n)=>{"use strict";const{BalancedPoolMissingUpstreamError:s,InvalidArgumentError:i}=n(8045);const{PoolBase:r,kClients:o,kNeedDrain:A,kAddClient:a,kRemoveClient:c,kGetDispatcher:u}=n(3198);const l=n(4634);const{kUrl:d,kInterceptors:p}=n(2785);const{parseOrigin:g}=n(3983);const h=Symbol("factory");const f=Symbol("options");const E=Symbol("kGreatestCommonDivisor");const m=Symbol("kCurrentWeight");const C=Symbol("kIndex");const Q=Symbol("kWeight");const I=Symbol("kMaxWeightPerServer");const B=Symbol("kErrorPenalty");function getGreatestCommonDivisor(e,t){if(t===0)return e;return getGreatestCommonDivisor(t,e%t)}function defaultFactory(e,t){return new l(e,t)}class BalancedPool extends r{constructor(e=[],{factory:t=defaultFactory,...n}={}){super();this[f]=n;this[C]=-1;this[m]=0;this[I]=this[f].maxWeightPerServer||100;this[B]=this[f].errorPenalty||15;if(!Array.isArray(e)){e=[e]}if(typeof t!=="function"){throw new i("factory must be a function.")}this[p]=n.interceptors&&n.interceptors.BalancedPool&&Array.isArray(n.interceptors.BalancedPool)?n.interceptors.BalancedPool:[];this[h]=t;for(const t of e){this.addUpstream(t)}this._updateBalancedPoolStats()}addUpstream(e){const t=g(e).origin;if(this[o].find((e=>e[d].origin===t&&e.closed!==true&&e.destroyed!==true))){return this}const n=this[h](t,Object.assign({},this[f]));this[a](n);n.on("connect",(()=>{n[Q]=Math.min(this[I],n[Q]+this[B])}));n.on("connectionError",(()=>{n[Q]=Math.max(1,n[Q]-this[B]);this._updateBalancedPoolStats()}));n.on("disconnect",((...e)=>{const t=e[2];if(t&&t.code==="UND_ERR_SOCKET"){n[Q]=Math.max(1,n[Q]-this[B]);this._updateBalancedPoolStats()}}));for(const e of this[o]){e[Q]=this[I]}this._updateBalancedPoolStats();return this}_updateBalancedPoolStats(){this[E]=this[o].map((e=>e[Q])).reduce(getGreatestCommonDivisor,0)}removeUpstream(e){const t=g(e).origin;const n=this[o].find((e=>e[d].origin===t&&e.closed!==true&&e.destroyed!==true));if(n){this[c](n)}return this}get upstreams(){return this[o].filter((e=>e.closed!==true&&e.destroyed!==true)).map((e=>e[d].origin))}[u](){if(this[o].length===0){throw new s}const e=this[o].find((e=>!e[A]&&e.closed!==true&&e.destroyed!==true));if(!e){return}const t=this[o].map((e=>e[A])).reduce(((e,t)=>e&&t),true);if(t){return}let n=0;let i=this[o].findIndex((e=>!e[A]));while(n++this[o][i][Q]&&!e[A]){i=this[C]}if(this[C]===0){this[m]=this[m]-this[E];if(this[m]<=0){this[m]=this[I]}}if(e[Q]>=this[m]&&!e[A]){return e}}this[m]=this[o][i][Q];this[C]=i;return this[o][i]}}e.exports=BalancedPool},6101:(e,t,n)=>{"use strict";const{kConstruct:s}=n(9174);const{urlEquals:i,fieldValues:r}=n(2396);const{kEnumerableProperty:o,isDisturbed:A}=n(3983);const{kHeadersList:a}=n(2785);const{webidl:c}=n(1744);const{Response:u,cloneResponse:l}=n(7823);const{Request:d}=n(8359);const{kState:p,kHeaders:g,kGuard:h,kRealm:f}=n(5861);const{fetching:E}=n(4881);const{urlIsHttpHttpsScheme:m,createDeferredPromise:C,readAllBytes:Q}=n(2538);const I=n(9491);const{getGlobalDispatcher:B}=n(1892);class Cache{#e;constructor(){if(arguments[0]!==s){c.illegalConstructor()}this.#e=arguments[1]}async match(e,t={}){c.brandCheck(this,Cache);c.argumentLengthCheck(arguments,1,{header:"Cache.match"});e=c.converters.RequestInfo(e);t=c.converters.CacheQueryOptions(t);const n=await this.matchAll(e,t);if(n.length===0){return}return n[0]}async matchAll(e=undefined,t={}){c.brandCheck(this,Cache);if(e!==undefined)e=c.converters.RequestInfo(e);t=c.converters.CacheQueryOptions(t);let n=null;if(e!==undefined){if(e instanceof d){n=e[p];if(n.method!=="GET"&&!t.ignoreMethod){return[]}}else if(typeof e==="string"){n=new d(e)[p]}}const s=[];if(e===undefined){for(const e of this.#e){s.push(e[1])}}else{const e=this.#t(n,t);for(const t of e){s.push(t[1])}}const i=[];for(const e of s){const t=new u(e.body?.source??null);const n=t[p].body;t[p]=e;t[p].body=n;t[g][a]=e.headersList;t[g][h]="immutable";i.push(t)}return Object.freeze(i)}async add(e){c.brandCheck(this,Cache);c.argumentLengthCheck(arguments,1,{header:"Cache.add"});e=c.converters.RequestInfo(e);const t=[e];const n=this.addAll(t);return await n}async addAll(e){c.brandCheck(this,Cache);c.argumentLengthCheck(arguments,1,{header:"Cache.addAll"});e=c.converters["sequence"](e);const t=[];const n=[];for(const t of e){if(typeof t==="string"){continue}const e=t[p];if(!m(e.url)||e.method!=="GET"){throw c.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme when method is not GET."})}}const s=[];for(const i of e){const e=new d(i)[p];if(!m(e.url)){throw c.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme."})}e.initiator="fetch";e.destination="subresource";n.push(e);const o=C();s.push(E({request:e,dispatcher:B(),processResponse(e){if(e.type==="error"||e.status===206||e.status<200||e.status>299){o.reject(c.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}))}else if(e.headersList.contains("vary")){const t=r(e.headersList.get("vary"));for(const e of t){if(e==="*"){o.reject(c.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(const e of s){e.abort()}return}}}},processResponseEndOfBody(e){if(e.aborted){o.reject(new DOMException("aborted","AbortError"));return}o.resolve(e)}}));t.push(o.promise)}const i=Promise.all(t);const o=await i;const A=[];let a=0;for(const e of o){const t={type:"put",request:n[a],response:e};A.push(t);a++}const u=C();let l=null;try{this.#n(A)}catch(e){l=e}queueMicrotask((()=>{if(l===null){u.resolve(undefined)}else{u.reject(l)}}));return u.promise}async put(e,t){c.brandCheck(this,Cache);c.argumentLengthCheck(arguments,2,{header:"Cache.put"});e=c.converters.RequestInfo(e);t=c.converters.Response(t);let n=null;if(e instanceof d){n=e[p]}else{n=new d(e)[p]}if(!m(n.url)||n.method!=="GET"){throw c.errors.exception({header:"Cache.put",message:"Expected an http/s scheme when method is not GET"})}const s=t[p];if(s.status===206){throw c.errors.exception({header:"Cache.put",message:"Got 206 status"})}if(s.headersList.contains("vary")){const e=r(s.headersList.get("vary"));for(const t of e){if(t==="*"){throw c.errors.exception({header:"Cache.put",message:"Got * vary field value"})}}}if(s.body&&(A(s.body.stream)||s.body.stream.locked)){throw c.errors.exception({header:"Cache.put",message:"Response body is locked or disturbed"})}const i=l(s);const o=C();if(s.body!=null){const e=s.body.stream;const t=e.getReader();Q(t).then(o.resolve,o.reject)}else{o.resolve(undefined)}const a=[];const u={type:"put",request:n,response:i};a.push(u);const g=await o.promise;if(i.body!=null){i.body.source=g}const h=C();let f=null;try{this.#n(a)}catch(e){f=e}queueMicrotask((()=>{if(f===null){h.resolve()}else{h.reject(f)}}));return h.promise}async delete(e,t={}){c.brandCheck(this,Cache);c.argumentLengthCheck(arguments,1,{header:"Cache.delete"});e=c.converters.RequestInfo(e);t=c.converters.CacheQueryOptions(t);let n=null;if(e instanceof d){n=e[p];if(n.method!=="GET"&&!t.ignoreMethod){return false}}else{I(typeof e==="string");n=new d(e)[p]}const s=[];const i={type:"delete",request:n,options:t};s.push(i);const r=C();let o=null;let A;try{A=this.#n(s)}catch(e){o=e}queueMicrotask((()=>{if(o===null){r.resolve(!!A?.length)}else{r.reject(o)}}));return r.promise}async keys(e=undefined,t={}){c.brandCheck(this,Cache);if(e!==undefined)e=c.converters.RequestInfo(e);t=c.converters.CacheQueryOptions(t);let n=null;if(e!==undefined){if(e instanceof d){n=e[p];if(n.method!=="GET"&&!t.ignoreMethod){return[]}}else if(typeof e==="string"){n=new d(e)[p]}}const s=C();const i=[];if(e===undefined){for(const e of this.#e){i.push(e[0])}}else{const e=this.#t(n,t);for(const t of e){i.push(t[0])}}queueMicrotask((()=>{const e=[];for(const t of i){const n=new d("https://a");n[p]=t;n[g][a]=t.headersList;n[g][h]="immutable";n[f]=t.client;e.push(n)}s.resolve(Object.freeze(e))}));return s.promise}#n(e){const t=this.#e;const n=[...t];const s=[];const i=[];try{for(const n of e){if(n.type!=="delete"&&n.type!=="put"){throw c.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'})}if(n.type==="delete"&&n.response!=null){throw c.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"})}if(this.#t(n.request,n.options,s).length){throw new DOMException("???","InvalidStateError")}let e;if(n.type==="delete"){e=this.#t(n.request,n.options);if(e.length===0){return[]}for(const n of e){const e=t.indexOf(n);I(e!==-1);t.splice(e,1)}}else if(n.type==="put"){if(n.response==null){throw c.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"})}const i=n.request;if(!m(i.url)){throw c.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"})}if(i.method!=="GET"){throw c.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"})}if(n.options!=null){throw c.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"})}e=this.#t(n.request);for(const n of e){const e=t.indexOf(n);I(e!==-1);t.splice(e,1)}t.push([n.request,n.response]);s.push([n.request,n.response])}i.push([n.request,n.response])}return i}catch(e){this.#e.length=0;this.#e=n;throw e}}#t(e,t,n){const s=[];const i=n??this.#e;for(const n of i){const[i,r]=n;if(this.#s(e,i,r,t)){s.push(n)}}return s}#s(e,t,n=null,s){const o=new URL(e.url);const A=new URL(t.url);if(s?.ignoreSearch){A.search="";o.search=""}if(!i(o,A,true)){return false}if(n==null||s?.ignoreVary||!n.headersList.contains("vary")){return true}const a=r(n.headersList.get("vary"));for(const n of a){if(n==="*"){return false}const s=t.headersList.get(n);const i=e.headersList.get(n);if(s!==i){return false}}return true}}Object.defineProperties(Cache.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:true},match:o,matchAll:o,add:o,addAll:o,put:o,delete:o,keys:o});const y=[{key:"ignoreSearch",converter:c.converters.boolean,defaultValue:false},{key:"ignoreMethod",converter:c.converters.boolean,defaultValue:false},{key:"ignoreVary",converter:c.converters.boolean,defaultValue:false}];c.converters.CacheQueryOptions=c.dictionaryConverter(y);c.converters.MultiCacheQueryOptions=c.dictionaryConverter([...y,{key:"cacheName",converter:c.converters.DOMString}]);c.converters.Response=c.interfaceConverter(u);c.converters["sequence"]=c.sequenceConverter(c.converters.RequestInfo);e.exports={Cache:Cache}},7907:(e,t,n)=>{"use strict";const{kConstruct:s}=n(9174);const{Cache:i}=n(6101);const{webidl:r}=n(1744);const{kEnumerableProperty:o}=n(3983);class CacheStorage{#i=new Map;constructor(){if(arguments[0]!==s){r.illegalConstructor()}}async match(e,t={}){r.brandCheck(this,CacheStorage);r.argumentLengthCheck(arguments,1,{header:"CacheStorage.match"});e=r.converters.RequestInfo(e);t=r.converters.MultiCacheQueryOptions(t);if(t.cacheName!=null){if(this.#i.has(t.cacheName)){const n=this.#i.get(t.cacheName);const r=new i(s,n);return await r.match(e,t)}}else{for(const n of this.#i.values()){const r=new i(s,n);const o=await r.match(e,t);if(o!==undefined){return o}}}}async has(e){r.brandCheck(this,CacheStorage);r.argumentLengthCheck(arguments,1,{header:"CacheStorage.has"});e=r.converters.DOMString(e);return this.#i.has(e)}async open(e){r.brandCheck(this,CacheStorage);r.argumentLengthCheck(arguments,1,{header:"CacheStorage.open"});e=r.converters.DOMString(e);if(this.#i.has(e)){const t=this.#i.get(e);return new i(s,t)}const t=[];this.#i.set(e,t);return new i(s,t)}async delete(e){r.brandCheck(this,CacheStorage);r.argumentLengthCheck(arguments,1,{header:"CacheStorage.delete"});e=r.converters.DOMString(e);return this.#i.delete(e)}async keys(){r.brandCheck(this,CacheStorage);const e=this.#i.keys();return[...e]}}Object.defineProperties(CacheStorage.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:true},match:o,has:o,open:o,delete:o,keys:o});e.exports={CacheStorage:CacheStorage}},9174:e=>{"use strict";e.exports={kConstruct:Symbol("constructable")}},2396:(e,t,n)=>{"use strict";const s=n(9491);const{URLSerializer:i}=n(685);const{isValidHeaderName:r}=n(2538);function urlEquals(e,t,n=false){const s=i(e,n);const r=i(t,n);return s===r}function fieldValues(e){s(e!==null);const t=[];for(let n of e.split(",")){n=n.trim();if(!n.length){continue}else if(!r(n)){continue}t.push(n)}return t}e.exports={urlEquals:urlEquals,fieldValues:fieldValues}},3598:(e,t,n)=>{"use strict";const s=n(9491);const i=n(1808);const r=n(3685);const{pipeline:o}=n(2781);const A=n(3983);const a=n(9459);const c=n(2905);const u=n(4839);const{RequestContentLengthMismatchError:l,ResponseContentLengthMismatchError:d,InvalidArgumentError:p,RequestAbortedError:g,HeadersTimeoutError:h,HeadersOverflowError:f,SocketError:E,InformationalError:m,BodyTimeoutError:C,HTTPParserError:Q,ResponseExceededMaxSizeError:I,ClientDestroyedError:B}=n(8045);const y=n(2067);const{kUrl:b,kReset:w,kServerName:R,kClient:v,kBusy:k,kParser:S,kConnect:x,kBlocking:D,kResuming:_,kRunning:N,kPending:F,kSize:U,kWriting:T,kQueue:M,kConnected:L,kConnecting:O,kNeedDrain:P,kNoRef:J,kKeepAliveDefaultTimeout:H,kHostHeader:q,kPendingIdx:G,kRunningIdx:Y,kError:V,kPipelining:j,kSocket:W,kKeepAliveTimeoutValue:K,kMaxHeadersSize:z,kKeepAliveMaxTimeout:Z,kKeepAliveTimeoutThreshold:X,kHeadersTimeout:$,kBodyTimeout:ee,kStrictContentLength:te,kConnector:ne,kMaxRedirections:se,kMaxRequests:ie,kCounter:re,kClose:oe,kDestroy:Ae,kDispatch:ae,kInterceptors:ce,kLocalAddress:ue,kMaxResponseSize:le,kHTTPConnVersion:de,kHost:pe,kHTTP2Session:ge,kHTTP2SessionState:he,kHTTP2BuildRequest:fe,kHTTP2CopyHeaders:Ee,kHTTP1BuildRequest:me}=n(2785);let Ce;try{Ce=n(5158)}catch{Ce={constants:{}}}const{constants:{HTTP2_HEADER_AUTHORITY:Qe,HTTP2_HEADER_METHOD:Ie,HTTP2_HEADER_PATH:Be,HTTP2_HEADER_SCHEME:ye,HTTP2_HEADER_CONTENT_LENGTH:be,HTTP2_HEADER_EXPECT:we,HTTP2_HEADER_STATUS:Re}}=Ce;let ve=false;const ke=Buffer[Symbol.species];const Se=Symbol("kClosedResolve");const xe={};try{const e=n(7643);xe.sendHeaders=e.channel("undici:client:sendHeaders");xe.beforeConnect=e.channel("undici:client:beforeConnect");xe.connectError=e.channel("undici:client:connectError");xe.connected=e.channel("undici:client:connected")}catch{xe.sendHeaders={hasSubscribers:false};xe.beforeConnect={hasSubscribers:false};xe.connectError={hasSubscribers:false};xe.connected={hasSubscribers:false}}class Client extends u{constructor(e,{interceptors:t,maxHeaderSize:n,headersTimeout:s,socketTimeout:o,requestTimeout:a,connectTimeout:c,bodyTimeout:u,idleTimeout:l,keepAlive:d,keepAliveTimeout:g,maxKeepAliveTimeout:h,keepAliveMaxTimeout:f,keepAliveTimeoutThreshold:E,socketPath:m,pipelining:C,tls:Q,strictContentLength:I,maxCachedSessions:B,maxRedirections:w,connect:v,maxRequestsPerClient:k,localAddress:S,maxResponseSize:x,autoSelectFamily:D,autoSelectFamilyAttemptTimeout:N,allowH2:F,maxConcurrentStreams:U}={}){super();if(d!==undefined){throw new p("unsupported keepAlive, use pipelining=0 instead")}if(o!==undefined){throw new p("unsupported socketTimeout, use headersTimeout & bodyTimeout instead")}if(a!==undefined){throw new p("unsupported requestTimeout, use headersTimeout & bodyTimeout instead")}if(l!==undefined){throw new p("unsupported idleTimeout, use keepAliveTimeout instead")}if(h!==undefined){throw new p("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead")}if(n!=null&&!Number.isFinite(n)){throw new p("invalid maxHeaderSize")}if(m!=null&&typeof m!=="string"){throw new p("invalid socketPath")}if(c!=null&&(!Number.isFinite(c)||c<0)){throw new p("invalid connectTimeout")}if(g!=null&&(!Number.isFinite(g)||g<=0)){throw new p("invalid keepAliveTimeout")}if(f!=null&&(!Number.isFinite(f)||f<=0)){throw new p("invalid keepAliveMaxTimeout")}if(E!=null&&!Number.isFinite(E)){throw new p("invalid keepAliveTimeoutThreshold")}if(s!=null&&(!Number.isInteger(s)||s<0)){throw new p("headersTimeout must be a positive integer or zero")}if(u!=null&&(!Number.isInteger(u)||u<0)){throw new p("bodyTimeout must be a positive integer or zero")}if(v!=null&&typeof v!=="function"&&typeof v!=="object"){throw new p("connect must be a function or an object")}if(w!=null&&(!Number.isInteger(w)||w<0)){throw new p("maxRedirections must be a positive number")}if(k!=null&&(!Number.isInteger(k)||k<0)){throw new p("maxRequestsPerClient must be a positive number")}if(S!=null&&(typeof S!=="string"||i.isIP(S)===0)){throw new p("localAddress must be valid string IP address")}if(x!=null&&(!Number.isInteger(x)||x<-1)){throw new p("maxResponseSize must be a positive number")}if(N!=null&&(!Number.isInteger(N)||N<-1)){throw new p("autoSelectFamilyAttemptTimeout must be a positive number")}if(F!=null&&typeof F!=="boolean"){throw new p("allowH2 must be a valid boolean value")}if(U!=null&&(typeof U!=="number"||U<1)){throw new p("maxConcurrentStreams must be a possitive integer, greater than 0")}if(typeof v!=="function"){v=y({...Q,maxCachedSessions:B,allowH2:F,socketPath:m,timeout:c,...A.nodeHasAutoSelectFamily&&D?{autoSelectFamily:D,autoSelectFamilyAttemptTimeout:N}:undefined,...v})}this[ce]=t&&t.Client&&Array.isArray(t.Client)?t.Client:[_e({maxRedirections:w})];this[b]=A.parseOrigin(e);this[ne]=v;this[W]=null;this[j]=C!=null?C:1;this[z]=n||r.maxHeaderSize;this[H]=g==null?4e3:g;this[Z]=f==null?6e5:f;this[X]=E==null?1e3:E;this[K]=this[H];this[R]=null;this[ue]=S!=null?S:null;this[_]=0;this[P]=0;this[q]=`host: ${this[b].hostname}${this[b].port?`:${this[b].port}`:""}\r\n`;this[ee]=u!=null?u:3e5;this[$]=s!=null?s:3e5;this[te]=I==null?true:I;this[se]=w;this[ie]=k;this[Se]=null;this[le]=x>-1?x:-1;this[de]="h1";this[ge]=null;this[he]=!F?null:{openStreams:0,maxConcurrentStreams:U!=null?U:100};this[pe]=`${this[b].hostname}${this[b].port?`:${this[b].port}`:""}`;this[M]=[];this[Y]=0;this[G]=0}get pipelining(){return this[j]}set pipelining(e){this[j]=e;resume(this,true)}get[F](){return this[M].length-this[G]}get[N](){return this[G]-this[Y]}get[U](){return this[M].length-this[Y]}get[L](){return!!this[W]&&!this[O]&&!this[W].destroyed}get[k](){const e=this[W];return e&&(e[w]||e[T]||e[D])||this[U]>=(this[j]||1)||this[F]>0}[x](e){connect(this);this.once("connect",e)}[ae](e,t){const n=e.origin||this[b].origin;const s=this[de]==="h2"?c[fe](n,e,t):c[me](n,e,t);this[M].push(s);if(this[_]){}else if(A.bodyLength(s.body)==null&&A.isIterable(s.body)){this[_]=1;process.nextTick(resume,this)}else{resume(this,true)}if(this[_]&&this[P]!==2&&this[k]){this[P]=2}return this[P]<2}async[oe](){return new Promise((e=>{if(!this[U]){e(null)}else{this[Se]=e}}))}async[Ae](e){return new Promise((t=>{const n=this[M].splice(this[G]);for(let t=0;t{if(this[Se]){this[Se]();this[Se]=null}t()};if(this[ge]!=null){A.destroy(this[ge],e);this[ge]=null;this[he]=null}if(!this[W]){queueMicrotask(callback)}else{A.destroy(this[W].on("close",callback),e)}resume(this)}))}}function onHttp2SessionError(e){s(e.code!=="ERR_TLS_CERT_ALTNAME_INVALID");this[W][V]=e;onError(this[v],e)}function onHttp2FrameError(e,t,n){const s=new m(`HTTP/2: "frameError" received - type ${e}, code ${t}`);if(n===0){this[W][V]=s;onError(this[v],s)}}function onHttp2SessionEnd(){A.destroy(this,new E("other side closed"));A.destroy(this[W],new E("other side closed"))}function onHTTP2GoAway(e){const t=this[v];const n=new m(`HTTP/2: "GOAWAY" frame received with code ${e}`);t[W]=null;t[ge]=null;if(t.destroyed){s(this[F]===0);const e=t[M].splice(t[Y]);for(let t=0;t0){const e=t[M][t[Y]];t[M][t[Y]++]=null;errorRequest(t,e,n)}t[G]=t[Y];s(t[N]===0);t.emit("disconnect",t[b],[t],n);resume(t)}const De=n(953);const _e=n(8861);const Ne=Buffer.alloc(0);async function lazyllhttp(){const e=process.env.JEST_WORKER_ID?n(1145):undefined;let t;try{t=await WebAssembly.compile(Buffer.from(n(5627),"base64"))}catch(s){t=await WebAssembly.compile(Buffer.from(e||n(1145),"base64"))}return await WebAssembly.instantiate(t,{env:{wasm_on_url:(e,t,n)=>0,wasm_on_status:(e,t,n)=>{s.strictEqual(Te.ptr,e);const i=t-Oe+Me.byteOffset;return Te.onStatus(new ke(Me.buffer,i,n))||0},wasm_on_message_begin:e=>{s.strictEqual(Te.ptr,e);return Te.onMessageBegin()||0},wasm_on_header_field:(e,t,n)=>{s.strictEqual(Te.ptr,e);const i=t-Oe+Me.byteOffset;return Te.onHeaderField(new ke(Me.buffer,i,n))||0},wasm_on_header_value:(e,t,n)=>{s.strictEqual(Te.ptr,e);const i=t-Oe+Me.byteOffset;return Te.onHeaderValue(new ke(Me.buffer,i,n))||0},wasm_on_headers_complete:(e,t,n,i)=>{s.strictEqual(Te.ptr,e);return Te.onHeadersComplete(t,Boolean(n),Boolean(i))||0},wasm_on_body:(e,t,n)=>{s.strictEqual(Te.ptr,e);const i=t-Oe+Me.byteOffset;return Te.onBody(new ke(Me.buffer,i,n))||0},wasm_on_message_complete:e=>{s.strictEqual(Te.ptr,e);return Te.onMessageComplete()||0}}})}let Fe=null;let Ue=lazyllhttp();Ue.catch();let Te=null;let Me=null;let Le=0;let Oe=null;const Pe=1;const Je=2;const He=3;class Parser{constructor(e,t,{exports:n}){s(Number.isFinite(e[z])&&e[z]>0);this.llhttp=n;this.ptr=this.llhttp.llhttp_alloc(De.TYPE.RESPONSE);this.client=e;this.socket=t;this.timeout=null;this.timeoutValue=null;this.timeoutType=null;this.statusCode=null;this.statusText="";this.upgrade=false;this.headers=[];this.headersSize=0;this.headersMaxSize=e[z];this.shouldKeepAlive=false;this.paused=false;this.resume=this.resume.bind(this);this.bytesRead=0;this.keepAlive="";this.contentLength="";this.connection="";this.maxResponseSize=e[le]}setTimeout(e,t){this.timeoutType=t;if(e!==this.timeoutValue){a.clearTimeout(this.timeout);if(e){this.timeout=a.setTimeout(onParserTimeout,e,this);if(this.timeout.unref){this.timeout.unref()}}else{this.timeout=null}this.timeoutValue=e}else if(this.timeout){if(this.timeout.refresh){this.timeout.refresh()}}}resume(){if(this.socket.destroyed||!this.paused){return}s(this.ptr!=null);s(Te==null);this.llhttp.llhttp_resume(this.ptr);s(this.timeoutType===Je);if(this.timeout){if(this.timeout.refresh){this.timeout.refresh()}}this.paused=false;this.execute(this.socket.read()||Ne);this.readMore()}readMore(){while(!this.paused&&this.ptr){const e=this.socket.read();if(e===null){break}this.execute(e)}}execute(e){s(this.ptr!=null);s(Te==null);s(!this.paused);const{socket:t,llhttp:n}=this;if(e.length>Le){if(Oe){n.free(Oe)}Le=Math.ceil(e.length/4096)*4096;Oe=n.malloc(Le)}new Uint8Array(n.memory.buffer,Oe,Le).set(e);try{let s;try{Me=e;Te=this;s=n.llhttp_execute(this.ptr,Oe,e.length)}catch(e){throw e}finally{Te=null;Me=null}const i=n.llhttp_get_error_pos(this.ptr)-Oe;if(s===De.ERROR.PAUSED_UPGRADE){this.onUpgrade(e.slice(i))}else if(s===De.ERROR.PAUSED){this.paused=true;t.unshift(e.slice(i))}else if(s!==De.ERROR.OK){const t=n.llhttp_get_error_reason(this.ptr);let r="";if(t){const e=new Uint8Array(n.memory.buffer,t).indexOf(0);r="Response does not match the HTTP/1.1 protocol ("+Buffer.from(n.memory.buffer,t,e).toString()+")"}throw new Q(r,De.ERROR[s],e.slice(i))}}catch(e){A.destroy(t,e)}}destroy(){s(this.ptr!=null);s(Te==null);this.llhttp.llhttp_free(this.ptr);this.ptr=null;a.clearTimeout(this.timeout);this.timeout=null;this.timeoutValue=null;this.timeoutType=null;this.paused=false}onStatus(e){this.statusText=e.toString()}onMessageBegin(){const{socket:e,client:t}=this;if(e.destroyed){return-1}const n=t[M][t[Y]];if(!n){return-1}}onHeaderField(e){const t=this.headers.length;if((t&1)===0){this.headers.push(e)}else{this.headers[t-1]=Buffer.concat([this.headers[t-1],e])}this.trackHeader(e.length)}onHeaderValue(e){let t=this.headers.length;if((t&1)===1){this.headers.push(e);t+=1}else{this.headers[t-1]=Buffer.concat([this.headers[t-1],e])}const n=this.headers[t-2];if(n.length===10&&n.toString().toLowerCase()==="keep-alive"){this.keepAlive+=e.toString()}else if(n.length===10&&n.toString().toLowerCase()==="connection"){this.connection+=e.toString()}else if(n.length===14&&n.toString().toLowerCase()==="content-length"){this.contentLength+=e.toString()}this.trackHeader(e.length)}trackHeader(e){this.headersSize+=e;if(this.headersSize>=this.headersMaxSize){A.destroy(this.socket,new f)}}onUpgrade(e){const{upgrade:t,client:n,socket:i,headers:r,statusCode:o}=this;s(t);const a=n[M][n[Y]];s(a);s(!i.destroyed);s(i===n[W]);s(!this.paused);s(a.upgrade||a.method==="CONNECT");this.statusCode=null;this.statusText="";this.shouldKeepAlive=null;s(this.headers.length%2===0);this.headers=[];this.headersSize=0;i.unshift(e);i[S].destroy();i[S]=null;i[v]=null;i[V]=null;i.removeListener("error",onSocketError).removeListener("readable",onSocketReadable).removeListener("end",onSocketEnd).removeListener("close",onSocketClose);n[W]=null;n[M][n[Y]++]=null;n.emit("disconnect",n[b],[n],new m("upgrade"));try{a.onUpgrade(o,r,i)}catch(e){A.destroy(i,e)}resume(n)}onHeadersComplete(e,t,n){const{client:i,socket:r,headers:o,statusText:a}=this;if(r.destroyed){return-1}const c=i[M][i[Y]];if(!c){return-1}s(!this.upgrade);s(this.statusCode<200);if(e===100){A.destroy(r,new E("bad response",A.getSocketInfo(r)));return-1}if(t&&!c.upgrade){A.destroy(r,new E("bad upgrade",A.getSocketInfo(r)));return-1}s.strictEqual(this.timeoutType,Pe);this.statusCode=e;this.shouldKeepAlive=n||c.method==="HEAD"&&!r[w]&&this.connection.toLowerCase()==="keep-alive";if(this.statusCode>=200){const e=c.bodyTimeout!=null?c.bodyTimeout:i[ee];this.setTimeout(e,Je)}else if(this.timeout){if(this.timeout.refresh){this.timeout.refresh()}}if(c.method==="CONNECT"){s(i[N]===1);this.upgrade=true;return 2}if(t){s(i[N]===1);this.upgrade=true;return 2}s(this.headers.length%2===0);this.headers=[];this.headersSize=0;if(this.shouldKeepAlive&&i[j]){const e=this.keepAlive?A.parseKeepAliveTimeout(this.keepAlive):null;if(e!=null){const t=Math.min(e-i[X],i[Z]);if(t<=0){r[w]=true}else{i[K]=t}}else{i[K]=i[H]}}else{r[w]=true}let u;try{u=c.onHeaders(e,o,this.resume,a)===false}catch(e){A.destroy(r,e);return-1}if(c.method==="HEAD"){return 1}if(e<200){return 1}if(r[D]){r[D]=false;resume(i)}return u?De.ERROR.PAUSED:0}onBody(e){const{client:t,socket:n,statusCode:i,maxResponseSize:r}=this;if(n.destroyed){return-1}const o=t[M][t[Y]];s(o);s.strictEqual(this.timeoutType,Je);if(this.timeout){if(this.timeout.refresh){this.timeout.refresh()}}s(i>=200);if(r>-1&&this.bytesRead+e.length>r){A.destroy(n,new I);return-1}this.bytesRead+=e.length;try{if(o.onData(e)===false){return De.ERROR.PAUSED}}catch(e){A.destroy(n,e);return-1}}onMessageComplete(){const{client:e,socket:t,statusCode:n,upgrade:i,headers:r,contentLength:o,bytesRead:a,shouldKeepAlive:c}=this;if(t.destroyed&&(!n||c)){return-1}if(i){return}const u=e[M][e[Y]];s(u);s(n>=100);this.statusCode=null;this.statusText="";this.bytesRead=0;this.contentLength="";this.keepAlive="";this.connection="";s(this.headers.length%2===0);this.headers=[];this.headersSize=0;if(n<200){return}if(u.method!=="HEAD"&&o&&a!==parseInt(o,10)){A.destroy(t,new d);return-1}try{u.onComplete(r)}catch(t){errorRequest(e,u,t)}e[M][e[Y]++]=null;if(t[T]){s.strictEqual(e[N],0);A.destroy(t,new m("reset"));return De.ERROR.PAUSED}else if(!c){A.destroy(t,new m("reset"));return De.ERROR.PAUSED}else if(t[w]&&e[N]===0){A.destroy(t,new m("reset"));return De.ERROR.PAUSED}else if(e[j]===1){setImmediate(resume,e)}else{resume(e)}}}function onParserTimeout(e){const{socket:t,timeoutType:n,client:i}=e;if(n===Pe){if(!t[T]||t.writableNeedDrain||i[N]>1){s(!e.paused,"cannot be paused while waiting for headers");A.destroy(t,new h)}}else if(n===Je){if(!e.paused){A.destroy(t,new C)}}else if(n===He){s(i[N]===0&&i[K]);A.destroy(t,new m("socket idle timeout"))}}function onSocketReadable(){const{[S]:e}=this;if(e){e.readMore()}}function onSocketError(e){const{[v]:t,[S]:n}=this;s(e.code!=="ERR_TLS_CERT_ALTNAME_INVALID");if(t[de]!=="h2"){if(e.code==="ECONNRESET"&&n.statusCode&&!n.shouldKeepAlive){n.onMessageComplete();return}}this[V]=e;onError(this[v],e)}function onError(e,t){if(e[N]===0&&t.code!=="UND_ERR_INFO"&&t.code!=="UND_ERR_SOCKET"){s(e[G]===e[Y]);const n=e[M].splice(e[Y]);for(let s=0;s0&&n.code!=="UND_ERR_INFO"){const t=e[M][e[Y]];e[M][e[Y]++]=null;errorRequest(e,t,n)}e[G]=e[Y];s(e[N]===0);e.emit("disconnect",e[b],[e],n);resume(e)}async function connect(e){s(!e[O]);s(!e[W]);let{host:t,hostname:n,protocol:r,port:o}=e[b];if(n[0]==="["){const e=n.indexOf("]");s(e!==-1);const t=n.substr(1,e-1);s(i.isIP(t));n=t}e[O]=true;if(xe.beforeConnect.hasSubscribers){xe.beforeConnect.publish({connectParams:{host:t,hostname:n,protocol:r,port:o,servername:e[R],localAddress:e[ue]},connector:e[ne]})}try{const i=await new Promise(((s,i)=>{e[ne]({host:t,hostname:n,protocol:r,port:o,servername:e[R],localAddress:e[ue]},((e,t)=>{if(e){i(e)}else{s(t)}}))}));if(e.destroyed){A.destroy(i.on("error",(()=>{})),new B);return}e[O]=false;s(i);const a=i.alpnProtocol==="h2";if(a){if(!ve){ve=true;process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"})}const t=Ce.connect(e[b],{createConnection:()=>i,peerMaxConcurrentStreams:e[he].maxConcurrentStreams});e[de]="h2";t[v]=e;t[W]=i;t.on("error",onHttp2SessionError);t.on("frameError",onHttp2FrameError);t.on("end",onHttp2SessionEnd);t.on("goaway",onHTTP2GoAway);t.on("close",onSocketClose);t.unref();e[ge]=t;i[ge]=t}else{if(!Fe){Fe=await Ue;Ue=null}i[J]=false;i[T]=false;i[w]=false;i[D]=false;i[S]=new Parser(e,i,Fe)}i[re]=0;i[ie]=e[ie];i[v]=e;i[V]=null;i.on("error",onSocketError).on("readable",onSocketReadable).on("end",onSocketEnd).on("close",onSocketClose);e[W]=i;if(xe.connected.hasSubscribers){xe.connected.publish({connectParams:{host:t,hostname:n,protocol:r,port:o,servername:e[R],localAddress:e[ue]},connector:e[ne],socket:i})}e.emit("connect",e[b],[e])}catch(i){if(e.destroyed){return}e[O]=false;if(xe.connectError.hasSubscribers){xe.connectError.publish({connectParams:{host:t,hostname:n,protocol:r,port:o,servername:e[R],localAddress:e[ue]},connector:e[ne],error:i})}if(i.code==="ERR_TLS_CERT_ALTNAME_INVALID"){s(e[N]===0);while(e[F]>0&&e[M][e[G]].servername===e[R]){const t=e[M][e[G]++];errorRequest(e,t,i)}}else{onError(e,i)}e.emit("connectionError",e[b],[e],i)}resume(e)}function emitDrain(e){e[P]=0;e.emit("drain",e[b],[e])}function resume(e,t){if(e[_]===2){return}e[_]=2;_resume(e,t);e[_]=0;if(e[Y]>256){e[M].splice(0,e[Y]);e[G]-=e[Y];e[Y]=0}}function _resume(e,t){while(true){if(e.destroyed){s(e[F]===0);return}if(e[Se]&&!e[U]){e[Se]();e[Se]=null;return}const n=e[W];if(n&&!n.destroyed&&n.alpnProtocol!=="h2"){if(e[U]===0){if(!n[J]&&n.unref){n.unref();n[J]=true}}else if(n[J]&&n.ref){n.ref();n[J]=false}if(e[U]===0){if(n[S].timeoutType!==He){n[S].setTimeout(e[K],He)}}else if(e[N]>0&&n[S].statusCode<200){if(n[S].timeoutType!==Pe){const t=e[M][e[Y]];const s=t.headersTimeout!=null?t.headersTimeout:e[$];n[S].setTimeout(s,Pe)}}}if(e[k]){e[P]=2}else if(e[P]===2){if(t){e[P]=1;process.nextTick(emitDrain,e)}else{emitDrain(e)}continue}if(e[F]===0){return}if(e[N]>=(e[j]||1)){return}const i=e[M][e[G]];if(e[b].protocol==="https:"&&e[R]!==i.servername){if(e[N]>0){return}e[R]=i.servername;if(n&&n.servername!==i.servername){A.destroy(n,new m("servername changed"));return}}if(e[O]){return}if(!n&&!e[ge]){connect(e);return}if(n.destroyed||n[T]||n[w]||n[D]){return}if(e[N]>0&&!i.idempotent){return}if(e[N]>0&&(i.upgrade||i.method==="CONNECT")){return}if(A.isStream(i.body)&&A.bodyLength(i.body)===0){i.body.on("data",(function(){s(false)})).on("error",(function(t){errorRequest(e,i,t)})).on("end",(function(){A.destroy(this)}));i.body=null}if(e[N]>0&&(A.isStream(i.body)||A.isAsyncIterable(i.body))){return}if(!i.aborted&&write(e,i)){e[G]++}else{e[M].splice(e[G],1)}}}function write(e,t){if(e[de]==="h2"){writeH2(e,e[ge],t);return}const{body:n,method:i,path:r,host:o,upgrade:a,headers:c,blocking:u,reset:d}=t;const p=i==="PUT"||i==="POST"||i==="PATCH";if(n&&typeof n.read==="function"){n.read(0)}let h=A.bodyLength(n);if(h===null){h=t.contentLength}if(h===0&&!p){h=null}if(t.contentLength!==null&&t.contentLength!==h){if(e[te]){errorRequest(e,t,new l);return false}process.emitWarning(new l)}const f=e[W];try{t.onConnect((n=>{if(t.aborted||t.completed){return}errorRequest(e,t,n||new g);A.destroy(f,new m("aborted"))}))}catch(n){errorRequest(e,t,n)}if(t.aborted){return false}if(i==="HEAD"){f[w]=true}if(a||i==="CONNECT"){f[w]=true}if(d!=null){f[w]=d}if(e[ie]&&f[re]++>=e[ie]){f[w]=true}if(u){f[D]=true}let E=`${i} ${r} HTTP/1.1\r\n`;if(typeof o==="string"){E+=`host: ${o}\r\n`}else{E+=e[q]}if(a){E+=`connection: upgrade\r\nupgrade: ${a}\r\n`}else if(e[j]&&!f[w]){E+="connection: keep-alive\r\n"}else{E+="connection: close\r\n"}if(c){E+=c}if(xe.sendHeaders.hasSubscribers){xe.sendHeaders.publish({request:t,headers:E,socket:f})}if(!n){if(h===0){f.write(`${E}content-length: 0\r\n\r\n`,"latin1")}else{s(h===null,"no body must not have content length");f.write(`${E}\r\n`,"latin1")}t.onRequestSent()}else if(A.isBuffer(n)){s(h===n.byteLength,"buffer body must have content length");f.cork();f.write(`${E}content-length: ${h}\r\n\r\n`,"latin1");f.write(n);f.uncork();t.onBodySent(n);t.onRequestSent();if(!p){f[w]=true}}else if(A.isBlobLike(n)){if(typeof n.stream==="function"){writeIterable({body:n.stream(),client:e,request:t,socket:f,contentLength:h,header:E,expectsPayload:p})}else{writeBlob({body:n,client:e,request:t,socket:f,contentLength:h,header:E,expectsPayload:p})}}else if(A.isStream(n)){writeStream({body:n,client:e,request:t,socket:f,contentLength:h,header:E,expectsPayload:p})}else if(A.isIterable(n)){writeIterable({body:n,client:e,request:t,socket:f,contentLength:h,header:E,expectsPayload:p})}else{s(false)}return true}function writeH2(e,t,n){const{body:i,method:r,path:o,host:a,upgrade:u,expectContinue:d,signal:p,headers:h}=n;let f;if(typeof h==="string")f=c[Ee](h.trim());else f=h;if(u){errorRequest(e,n,new Error("Upgrade not supported for H2"));return false}try{n.onConnect((t=>{if(n.aborted||n.completed){return}errorRequest(e,n,t||new g)}))}catch(t){errorRequest(e,n,t)}if(n.aborted){return false}let E;const C=e[he];f[Qe]=a||e[pe];f[Ie]=r;if(r==="CONNECT"){t.ref();E=t.request(f,{endStream:false,signal:p});if(E.id&&!E.pending){n.onUpgrade(null,null,E);++C.openStreams}else{E.once("ready",(()=>{n.onUpgrade(null,null,E);++C.openStreams}))}E.once("close",(()=>{C.openStreams-=1;if(C.openStreams===0)t.unref()}));return true}f[Be]=o;f[ye]="https";const Q=r==="PUT"||r==="POST"||r==="PATCH";if(i&&typeof i.read==="function"){i.read(0)}let I=A.bodyLength(i);if(I==null){I=n.contentLength}if(I===0||!Q){I=null}if(n.contentLength!=null&&n.contentLength!==I){if(e[te]){errorRequest(e,n,new l);return false}process.emitWarning(new l)}if(I!=null){s(i,"no body must not have content length");f[be]=`${I}`}t.ref();const B=r==="GET"||r==="HEAD";if(d){f[we]="100-continue";E=t.request(f,{endStream:B,signal:p});E.once("continue",writeBodyH2)}else{E=t.request(f,{endStream:B,signal:p});writeBodyH2()}++C.openStreams;E.once("response",(e=>{if(n.onHeaders(Number(e[Re]),e,E.resume.bind(E),"")===false){E.pause()}}));E.once("end",(()=>{n.onComplete([])}));E.on("data",(e=>{if(n.onData(e)===false)E.pause()}));E.once("close",(()=>{C.openStreams-=1;if(C.openStreams===0)t.unref()}));E.once("error",(function(t){if(e[ge]&&!e[ge].destroyed&&!this.closed&&!this.destroyed){C.streams-=1;A.destroy(E,t)}}));E.once("frameError",((t,s)=>{const i=new m(`HTTP/2: "frameError" received - type ${t}, code ${s}`);errorRequest(e,n,i);if(e[ge]&&!e[ge].destroyed&&!this.closed&&!this.destroyed){C.streams-=1;A.destroy(E,i)}}));return true;function writeBodyH2(){if(!i){n.onRequestSent()}else if(A.isBuffer(i)){s(I===i.byteLength,"buffer body must have content length");E.cork();E.write(i);E.uncork();E.end();n.onBodySent(i);n.onRequestSent()}else if(A.isBlobLike(i)){if(typeof i.stream==="function"){writeIterable({client:e,request:n,contentLength:I,h2stream:E,expectsPayload:Q,body:i.stream(),socket:e[W],header:""})}else{writeBlob({body:i,client:e,request:n,contentLength:I,expectsPayload:Q,h2stream:E,header:"",socket:e[W]})}}else if(A.isStream(i)){writeStream({body:i,client:e,request:n,contentLength:I,expectsPayload:Q,socket:e[W],h2stream:E,header:""})}else if(A.isIterable(i)){writeIterable({body:i,client:e,request:n,contentLength:I,expectsPayload:Q,header:"",h2stream:E,socket:e[W]})}else{s(false)}}}function writeStream({h2stream:e,body:t,client:n,request:i,socket:r,contentLength:a,header:c,expectsPayload:u}){s(a!==0||n[N]===0,"stream body cannot be pipelined");if(n[de]==="h2"){const n=o(t,e,(n=>{if(n){A.destroy(t,n);A.destroy(e,n)}else{i.onRequestSent()}}));n.on("data",onPipeData);n.once("end",(()=>{n.removeListener("data",onPipeData);A.destroy(n)}));function onPipeData(e){i.onBodySent(e)}return}let l=false;const d=new AsyncWriter({socket:r,request:i,contentLength:a,client:n,expectsPayload:u,header:c});const onData=function(e){if(l){return}try{if(!d.write(e)&&this.pause){this.pause()}}catch(e){A.destroy(this,e)}};const onDrain=function(){if(l){return}if(t.resume){t.resume()}};const onAbort=function(){onFinished(new g)};const onFinished=function(e){if(l){return}l=true;s(r.destroyed||r[T]&&n[N]<=1);r.off("drain",onDrain).off("error",onFinished);t.removeListener("data",onData).removeListener("end",onFinished).removeListener("error",onFinished).removeListener("close",onAbort);if(!e){try{d.end()}catch(t){e=t}}d.destroy(e);if(e&&(e.code!=="UND_ERR_INFO"||e.message!=="reset")){A.destroy(t,e)}else{A.destroy(t)}};t.on("data",onData).on("end",onFinished).on("error",onFinished).on("close",onAbort);if(t.resume){t.resume()}r.on("drain",onDrain).on("error",onFinished)}async function writeBlob({h2stream:e,body:t,client:n,request:i,socket:r,contentLength:o,header:a,expectsPayload:c}){s(o===t.size,"blob body must have content length");const u=n[de]==="h2";try{if(o!=null&&o!==t.size){throw new l}const s=Buffer.from(await t.arrayBuffer());if(u){e.cork();e.write(s);e.uncork()}else{r.cork();r.write(`${a}content-length: ${o}\r\n\r\n`,"latin1");r.write(s);r.uncork()}i.onBodySent(s);i.onRequestSent();if(!c){r[w]=true}resume(n)}catch(t){A.destroy(u?e:r,t)}}async function writeIterable({h2stream:e,body:t,client:n,request:i,socket:r,contentLength:o,header:A,expectsPayload:a}){s(o!==0||n[N]===0,"iterator body cannot be pipelined");let c=null;function onDrain(){if(c){const e=c;c=null;e()}}const waitForDrain=()=>new Promise(((e,t)=>{s(c===null);if(r[V]){t(r[V])}else{c=e}}));if(n[de]==="h2"){e.on("close",onDrain).on("drain",onDrain);try{for await(const n of t){if(r[V]){throw r[V]}const t=e.write(n);i.onBodySent(n);if(!t){await waitForDrain()}}}catch(t){e.destroy(t)}finally{i.onRequestSent();e.end();e.off("close",onDrain).off("drain",onDrain)}return}r.on("close",onDrain).on("drain",onDrain);const u=new AsyncWriter({socket:r,request:i,contentLength:o,client:n,expectsPayload:a,header:A});try{for await(const e of t){if(r[V]){throw r[V]}if(!u.write(e)){await waitForDrain()}}u.end()}catch(e){u.destroy(e)}finally{r.off("close",onDrain).off("drain",onDrain)}}class AsyncWriter{constructor({socket:e,request:t,contentLength:n,client:s,expectsPayload:i,header:r}){this.socket=e;this.request=t;this.contentLength=n;this.client=s;this.bytesWritten=0;this.expectsPayload=i;this.header=r;e[T]=true}write(e){const{socket:t,request:n,contentLength:s,client:i,bytesWritten:r,expectsPayload:o,header:A}=this;if(t[V]){throw t[V]}if(t.destroyed){return false}const a=Buffer.byteLength(e);if(!a){return true}if(s!==null&&r+a>s){if(i[te]){throw new l}process.emitWarning(new l)}t.cork();if(r===0){if(!o){t[w]=true}if(s===null){t.write(`${A}transfer-encoding: chunked\r\n`,"latin1")}else{t.write(`${A}content-length: ${s}\r\n\r\n`,"latin1")}}if(s===null){t.write(`\r\n${a.toString(16)}\r\n`,"latin1")}this.bytesWritten+=a;const c=t.write(e);t.uncork();n.onBodySent(e);if(!c){if(t[S].timeout&&t[S].timeoutType===Pe){if(t[S].timeout.refresh){t[S].timeout.refresh()}}}return c}end(){const{socket:e,contentLength:t,client:n,bytesWritten:s,expectsPayload:i,header:r,request:o}=this;o.onRequestSent();e[T]=false;if(e[V]){throw e[V]}if(e.destroyed){return}if(s===0){if(i){e.write(`${r}content-length: 0\r\n\r\n`,"latin1")}else{e.write(`${r}\r\n`,"latin1")}}else if(t===null){e.write("\r\n0\r\n\r\n","latin1")}if(t!==null&&s!==t){if(n[te]){throw new l}else{process.emitWarning(new l)}}if(e[S].timeout&&e[S].timeoutType===Pe){if(e[S].timeout.refresh){e[S].timeout.refresh()}}resume(n)}destroy(e){const{socket:t,client:n}=this;t[T]=false;if(e){s(n[N]<=1,"pipeline should only contain this request");A.destroy(t,e)}}}function errorRequest(e,t,n){try{t.onError(n);s(t.aborted)}catch(n){e.emit("error",n)}}e.exports=Client},6436:(e,t,n)=>{"use strict";const{kConnected:s,kSize:i}=n(2785);class CompatWeakRef{constructor(e){this.value=e}deref(){return this.value[s]===0&&this.value[i]===0?undefined:this.value}}class CompatFinalizer{constructor(e){this.finalizer=e}register(e,t){if(e.on){e.on("disconnect",(()=>{if(e[s]===0&&e[i]===0){this.finalizer(t)}}))}}}e.exports=function(){if(process.env.NODE_V8_COVERAGE){return{WeakRef:CompatWeakRef,FinalizationRegistry:CompatFinalizer}}return{WeakRef:global.WeakRef||CompatWeakRef,FinalizationRegistry:global.FinalizationRegistry||CompatFinalizer}}},663:e=>{"use strict";const t=1024;const n=4096;e.exports={maxAttributeValueSize:t,maxNameValuePairSize:n}},1724:(e,t,n)=>{"use strict";const{parseSetCookie:s}=n(4408);const{stringify:i,getHeadersList:r}=n(3121);const{webidl:o}=n(1744);const{Headers:A}=n(554);function getCookies(e){o.argumentLengthCheck(arguments,1,{header:"getCookies"});o.brandCheck(e,A,{strict:false});const t=e.get("cookie");const n={};if(!t){return n}for(const e of t.split(";")){const[t,...s]=e.split("=");n[t.trim()]=s.join("=")}return n}function deleteCookie(e,t,n){o.argumentLengthCheck(arguments,2,{header:"deleteCookie"});o.brandCheck(e,A,{strict:false});t=o.converters.DOMString(t);n=o.converters.DeleteCookieAttributes(n);setCookie(e,{name:t,value:"",expires:new Date(0),...n})}function getSetCookies(e){o.argumentLengthCheck(arguments,1,{header:"getSetCookies"});o.brandCheck(e,A,{strict:false});const t=r(e).cookies;if(!t){return[]}return t.map((e=>s(Array.isArray(e)?e[1]:e)))}function setCookie(e,t){o.argumentLengthCheck(arguments,2,{header:"setCookie"});o.brandCheck(e,A,{strict:false});t=o.converters.Cookie(t);const n=i(t);if(n){e.append("Set-Cookie",i(t))}}o.converters.DeleteCookieAttributes=o.dictionaryConverter([{converter:o.nullableConverter(o.converters.DOMString),key:"path",defaultValue:null},{converter:o.nullableConverter(o.converters.DOMString),key:"domain",defaultValue:null}]);o.converters.Cookie=o.dictionaryConverter([{converter:o.converters.DOMString,key:"name"},{converter:o.converters.DOMString,key:"value"},{converter:o.nullableConverter((e=>{if(typeof e==="number"){return o.converters["unsigned long long"](e)}return new Date(e)})),key:"expires",defaultValue:null},{converter:o.nullableConverter(o.converters["long long"]),key:"maxAge",defaultValue:null},{converter:o.nullableConverter(o.converters.DOMString),key:"domain",defaultValue:null},{converter:o.nullableConverter(o.converters.DOMString),key:"path",defaultValue:null},{converter:o.nullableConverter(o.converters.boolean),key:"secure",defaultValue:null},{converter:o.nullableConverter(o.converters.boolean),key:"httpOnly",defaultValue:null},{converter:o.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:o.sequenceConverter(o.converters.DOMString),key:"unparsed",defaultValue:[]}]);e.exports={getCookies:getCookies,deleteCookie:deleteCookie,getSetCookies:getSetCookies,setCookie:setCookie}},4408:(e,t,n)=>{"use strict";const{maxNameValuePairSize:s,maxAttributeValueSize:i}=n(663);const{isCTLExcludingHtab:r}=n(3121);const{collectASequenceOfCodePointsFast:o}=n(685);const A=n(9491);function parseSetCookie(e){if(r(e)){return null}let t="";let n="";let i="";let A="";if(e.includes(";")){const s={position:0};t=o(";",e,s);n=e.slice(s.position)}else{t=e}if(!t.includes("=")){A=t}else{const e={position:0};i=o("=",t,e);A=t.slice(e.position+1)}i=i.trim();A=A.trim();if(i.length+A.length>s){return null}return{name:i,value:A,...parseUnparsedAttributes(n)}}function parseUnparsedAttributes(e,t={}){if(e.length===0){return t}A(e[0]===";");e=e.slice(1);let n="";if(e.includes(";")){n=o(";",e,{position:0});e=e.slice(n.length)}else{n=e;e=""}let s="";let r="";if(n.includes("=")){const e={position:0};s=o("=",n,e);r=n.slice(e.position+1)}else{s=n}s=s.trim();r=r.trim();if(r.length>i){return parseUnparsedAttributes(e,t)}const a=s.toLowerCase();if(a==="expires"){const e=new Date(r);t.expires=e}else if(a==="max-age"){const n=r.charCodeAt(0);if((n<48||n>57)&&r[0]!=="-"){return parseUnparsedAttributes(e,t)}if(!/^\d+$/.test(r)){return parseUnparsedAttributes(e,t)}const s=Number(r);t.maxAge=s}else if(a==="domain"){let e=r;if(e[0]==="."){e=e.slice(1)}e=e.toLowerCase();t.domain=e}else if(a==="path"){let e="";if(r.length===0||r[0]!=="/"){e="/"}else{e=r}t.path=e}else if(a==="secure"){t.secure=true}else if(a==="httponly"){t.httpOnly=true}else if(a==="samesite"){let e="Default";const n=r.toLowerCase();if(n.includes("none")){e="None"}if(n.includes("strict")){e="Strict"}if(n.includes("lax")){e="Lax"}t.sameSite=e}else{t.unparsed??=[];t.unparsed.push(`${s}=${r}`)}return parseUnparsedAttributes(e,t)}e.exports={parseSetCookie:parseSetCookie,parseUnparsedAttributes:parseUnparsedAttributes}},3121:(e,t,n)=>{"use strict";const s=n(9491);const{kHeadersList:i}=n(2785);function isCTLExcludingHtab(e){if(e.length===0){return false}for(const t of e){const e=t.charCodeAt(0);if(e>=0||e<=8||(e>=10||e<=31)||e===127){return false}}}function validateCookieName(e){for(const t of e){const e=t.charCodeAt(0);if(e<=32||e>127||t==="("||t===")"||t===">"||t==="<"||t==="@"||t===","||t===";"||t===":"||t==="\\"||t==='"'||t==="/"||t==="["||t==="]"||t==="?"||t==="="||t==="{"||t==="}"){throw new Error("Invalid cookie name")}}}function validateCookieValue(e){for(const t of e){const e=t.charCodeAt(0);if(e<33||e===34||e===44||e===59||e===92||e>126){throw new Error("Invalid header value")}}}function validateCookiePath(e){for(const t of e){const e=t.charCodeAt(0);if(e<33||t===";"){throw new Error("Invalid cookie path")}}}function validateCookieDomain(e){if(e.startsWith("-")||e.endsWith(".")||e.endsWith("-")){throw new Error("Invalid cookie domain")}}function toIMFDate(e){if(typeof e==="number"){e=new Date(e)}const t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];const n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];const s=t[e.getUTCDay()];const i=e.getUTCDate().toString().padStart(2,"0");const r=n[e.getUTCMonth()];const o=e.getUTCFullYear();const A=e.getUTCHours().toString().padStart(2,"0");const a=e.getUTCMinutes().toString().padStart(2,"0");const c=e.getUTCSeconds().toString().padStart(2,"0");return`${s}, ${i} ${r} ${o} ${A}:${a}:${c} GMT`}function validateCookieMaxAge(e){if(e<0){throw new Error("Invalid cookie max-age")}}function stringify(e){if(e.name.length===0){return null}validateCookieName(e.name);validateCookieValue(e.value);const t=[`${e.name}=${e.value}`];if(e.name.startsWith("__Secure-")){e.secure=true}if(e.name.startsWith("__Host-")){e.secure=true;e.domain=null;e.path="/"}if(e.secure){t.push("Secure")}if(e.httpOnly){t.push("HttpOnly")}if(typeof e.maxAge==="number"){validateCookieMaxAge(e.maxAge);t.push(`Max-Age=${e.maxAge}`)}if(e.domain){validateCookieDomain(e.domain);t.push(`Domain=${e.domain}`)}if(e.path){validateCookiePath(e.path);t.push(`Path=${e.path}`)}if(e.expires&&e.expires.toString()!=="Invalid Date"){t.push(`Expires=${toIMFDate(e.expires)}`)}if(e.sameSite){t.push(`SameSite=${e.sameSite}`)}for(const n of e.unparsed){if(!n.includes("=")){throw new Error("Invalid unparsed")}const[e,...s]=n.split("=");t.push(`${e.trim()}=${s.join("=")}`)}return t.join("; ")}let r;function getHeadersList(e){if(e[i]){return e[i]}if(!r){r=Object.getOwnPropertySymbols(e).find((e=>e.description==="headers list"));s(r,"Headers cannot be parsed")}const t=e[r];s(t);return t}e.exports={isCTLExcludingHtab:isCTLExcludingHtab,stringify:stringify,getHeadersList:getHeadersList}},2067:(e,t,n)=>{"use strict";const s=n(1808);const i=n(9491);const r=n(3983);const{InvalidArgumentError:o,ConnectTimeoutError:A}=n(8045);let a;let c;if(global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE){c=class WeakSessionCache{constructor(e){this._maxCachedSessions=e;this._sessionCache=new Map;this._sessionRegistry=new global.FinalizationRegistry((e=>{if(this._sessionCache.size=this._maxCachedSessions){const{value:e}=this._sessionCache.keys().next();this._sessionCache.delete(e)}this._sessionCache.set(e,t)}}}function buildConnector({allowH2:e,maxCachedSessions:t,socketPath:A,timeout:u,...l}){if(t!=null&&(!Number.isInteger(t)||t<0)){throw new o("maxCachedSessions must be a positive integer or zero")}const d={path:A,...l};const p=new c(t==null?100:t);u=u==null?1e4:u;e=e!=null?e:false;return function connect({hostname:t,host:o,protocol:A,port:c,servername:l,localAddress:g,httpSocket:h},f){let E;if(A==="https:"){if(!a){a=n(4404)}l=l||d.servername||r.getServerName(o)||null;const s=l||t;const A=p.get(s)||null;i(s);E=a.connect({highWaterMark:16384,...d,servername:l,session:A,localAddress:g,ALPNProtocols:e?["http/1.1","h2"]:["http/1.1"],socket:h,port:c||443,host:t});E.on("session",(function(e){p.set(s,e)}))}else{i(!h,"httpSocket can only be sent on TLS update");E=s.connect({highWaterMark:64*1024,...d,localAddress:g,port:c||80,host:t})}if(d.keepAlive==null||d.keepAlive){const e=d.keepAliveInitialDelay===undefined?6e4:d.keepAliveInitialDelay;E.setKeepAlive(true,e)}const m=setupTimeout((()=>onConnectTimeout(E)),u);E.setNoDelay(true).once(A==="https:"?"secureConnect":"connect",(function(){m();if(f){const e=f;f=null;e(null,this)}})).on("error",(function(e){m();if(f){const t=f;f=null;t(e)}}));return E}}function setupTimeout(e,t){if(!t){return()=>{}}let n=null;let s=null;const i=setTimeout((()=>{n=setImmediate((()=>{if(process.platform==="win32"){s=setImmediate((()=>e()))}else{e()}}))}),t);return()=>{clearTimeout(i);clearImmediate(n);clearImmediate(s)}}function onConnectTimeout(e){r.destroy(e,new A)}e.exports=buildConnector},8045:e=>{"use strict";class UndiciError extends Error{constructor(e){super(e);this.name="UndiciError";this.code="UND_ERR"}}class ConnectTimeoutError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,ConnectTimeoutError);this.name="ConnectTimeoutError";this.message=e||"Connect Timeout Error";this.code="UND_ERR_CONNECT_TIMEOUT"}}class HeadersTimeoutError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,HeadersTimeoutError);this.name="HeadersTimeoutError";this.message=e||"Headers Timeout Error";this.code="UND_ERR_HEADERS_TIMEOUT"}}class HeadersOverflowError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,HeadersOverflowError);this.name="HeadersOverflowError";this.message=e||"Headers Overflow Error";this.code="UND_ERR_HEADERS_OVERFLOW"}}class BodyTimeoutError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,BodyTimeoutError);this.name="BodyTimeoutError";this.message=e||"Body Timeout Error";this.code="UND_ERR_BODY_TIMEOUT"}}class ResponseStatusCodeError extends UndiciError{constructor(e,t,n,s){super(e);Error.captureStackTrace(this,ResponseStatusCodeError);this.name="ResponseStatusCodeError";this.message=e||"Response Status Code Error";this.code="UND_ERR_RESPONSE_STATUS_CODE";this.body=s;this.status=t;this.statusCode=t;this.headers=n}}class InvalidArgumentError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,InvalidArgumentError);this.name="InvalidArgumentError";this.message=e||"Invalid Argument Error";this.code="UND_ERR_INVALID_ARG"}}class InvalidReturnValueError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,InvalidReturnValueError);this.name="InvalidReturnValueError";this.message=e||"Invalid Return Value Error";this.code="UND_ERR_INVALID_RETURN_VALUE"}}class RequestAbortedError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,RequestAbortedError);this.name="AbortError";this.message=e||"Request aborted";this.code="UND_ERR_ABORTED"}}class InformationalError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,InformationalError);this.name="InformationalError";this.message=e||"Request information";this.code="UND_ERR_INFO"}}class RequestContentLengthMismatchError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,RequestContentLengthMismatchError);this.name="RequestContentLengthMismatchError";this.message=e||"Request body length does not match content-length header";this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}}class ResponseContentLengthMismatchError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,ResponseContentLengthMismatchError);this.name="ResponseContentLengthMismatchError";this.message=e||"Response body length does not match content-length header";this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}}class ClientDestroyedError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,ClientDestroyedError);this.name="ClientDestroyedError";this.message=e||"The client is destroyed";this.code="UND_ERR_DESTROYED"}}class ClientClosedError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,ClientClosedError);this.name="ClientClosedError";this.message=e||"The client is closed";this.code="UND_ERR_CLOSED"}}class SocketError extends UndiciError{constructor(e,t){super(e);Error.captureStackTrace(this,SocketError);this.name="SocketError";this.message=e||"Socket error";this.code="UND_ERR_SOCKET";this.socket=t}}class NotSupportedError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,NotSupportedError);this.name="NotSupportedError";this.message=e||"Not supported error";this.code="UND_ERR_NOT_SUPPORTED"}}class BalancedPoolMissingUpstreamError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,NotSupportedError);this.name="MissingUpstreamError";this.message=e||"No upstream has been added to the BalancedPool";this.code="UND_ERR_BPL_MISSING_UPSTREAM"}}class HTTPParserError extends Error{constructor(e,t,n){super(e);Error.captureStackTrace(this,HTTPParserError);this.name="HTTPParserError";this.code=t?`HPE_${t}`:undefined;this.data=n?n.toString():undefined}}class ResponseExceededMaxSizeError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,ResponseExceededMaxSizeError);this.name="ResponseExceededMaxSizeError";this.message=e||"Response content exceeded max size";this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}}e.exports={HTTPParserError:HTTPParserError,UndiciError:UndiciError,HeadersTimeoutError:HeadersTimeoutError,HeadersOverflowError:HeadersOverflowError,BodyTimeoutError:BodyTimeoutError,RequestContentLengthMismatchError:RequestContentLengthMismatchError,ConnectTimeoutError:ConnectTimeoutError,ResponseStatusCodeError:ResponseStatusCodeError,InvalidArgumentError:InvalidArgumentError,InvalidReturnValueError:InvalidReturnValueError,RequestAbortedError:RequestAbortedError,ClientDestroyedError:ClientDestroyedError,ClientClosedError:ClientClosedError,InformationalError:InformationalError,SocketError:SocketError,NotSupportedError:NotSupportedError,ResponseContentLengthMismatchError:ResponseContentLengthMismatchError,BalancedPoolMissingUpstreamError:BalancedPoolMissingUpstreamError,ResponseExceededMaxSizeError:ResponseExceededMaxSizeError}},2905:(e,t,n)=>{"use strict";const{InvalidArgumentError:s,NotSupportedError:i}=n(8045);const r=n(9491);const{kHTTP2BuildRequest:o,kHTTP2CopyHeaders:A,kHTTP1BuildRequest:a}=n(2785);const c=n(3983);const u=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;const l=/[^\t\x20-\x7e\x80-\xff]/;const d=/[^\u0021-\u00ff]/;const p=Symbol("handler");const g={};let h;try{const e=n(7643);g.create=e.channel("undici:request:create");g.bodySent=e.channel("undici:request:bodySent");g.headers=e.channel("undici:request:headers");g.trailers=e.channel("undici:request:trailers");g.error=e.channel("undici:request:error")}catch{g.create={hasSubscribers:false};g.bodySent={hasSubscribers:false};g.headers={hasSubscribers:false};g.trailers={hasSubscribers:false};g.error={hasSubscribers:false}}class Request{constructor(e,{path:t,method:i,body:r,headers:o,query:A,idempotent:a,blocking:l,upgrade:f,headersTimeout:E,bodyTimeout:m,reset:C,throwOnError:Q,expectContinue:I},B){if(typeof t!=="string"){throw new s("path must be a string")}else if(t[0]!=="/"&&!(t.startsWith("http://")||t.startsWith("https://"))&&i!=="CONNECT"){throw new s("path must be an absolute URL or start with a slash")}else if(d.exec(t)!==null){throw new s("invalid request path")}if(typeof i!=="string"){throw new s("method must be a string")}else if(u.exec(i)===null){throw new s("invalid request method")}if(f&&typeof f!=="string"){throw new s("upgrade must be a string")}if(E!=null&&(!Number.isFinite(E)||E<0)){throw new s("invalid headersTimeout")}if(m!=null&&(!Number.isFinite(m)||m<0)){throw new s("invalid bodyTimeout")}if(C!=null&&typeof C!=="boolean"){throw new s("invalid reset")}if(I!=null&&typeof I!=="boolean"){throw new s("invalid expectContinue")}this.headersTimeout=E;this.bodyTimeout=m;this.throwOnError=Q===true;this.method=i;if(r==null){this.body=null}else if(c.isStream(r)){this.body=r}else if(c.isBuffer(r)){this.body=r.byteLength?r:null}else if(ArrayBuffer.isView(r)){this.body=r.buffer.byteLength?Buffer.from(r.buffer,r.byteOffset,r.byteLength):null}else if(r instanceof ArrayBuffer){this.body=r.byteLength?Buffer.from(r):null}else if(typeof r==="string"){this.body=r.length?Buffer.from(r):null}else if(c.isFormDataLike(r)||c.isIterable(r)||c.isBlobLike(r)){this.body=r}else{throw new s("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable")}this.completed=false;this.aborted=false;this.upgrade=f||null;this.path=A?c.buildURL(t,A):t;this.origin=e;this.idempotent=a==null?i==="HEAD"||i==="GET":a;this.blocking=l==null?false:l;this.reset=C==null?null:C;this.host=null;this.contentLength=null;this.contentType=null;this.headers="";this.expectContinue=I!=null?I:false;if(Array.isArray(o)){if(o.length%2!==0){throw new s("headers array must be even")}for(let e=0;e{e.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")}},3983:(e,t,n)=>{"use strict";const s=n(9491);const{kDestroyed:i,kBodyUsed:r}=n(2785);const{IncomingMessage:o}=n(3685);const A=n(2781);const a=n(1808);const{InvalidArgumentError:c}=n(8045);const{Blob:u}=n(4300);const l=n(3837);const{stringify:d}=n(3477);const[p,g]=process.versions.node.split(".").map((e=>Number(e)));function nop(){}function isStream(e){return e&&typeof e==="object"&&typeof e.pipe==="function"&&typeof e.on==="function"}function isBlobLike(e){return u&&e instanceof u||e&&typeof e==="object"&&(typeof e.stream==="function"||typeof e.arrayBuffer==="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function buildURL(e,t){if(e.includes("?")||e.includes("#")){throw new Error('Query params cannot be passed when url already contains "?" or "#".')}const n=d(t);if(n){e+="?"+n}return e}function parseURL(e){if(typeof e==="string"){e=new URL(e);if(!/^https?:/.test(e.origin||e.protocol)){throw new c("Invalid URL protocol: the URL must start with `http:` or `https:`.")}return e}if(!e||typeof e!=="object"){throw new c("Invalid URL: The URL argument must be a non-null object.")}if(!/^https?:/.test(e.origin||e.protocol)){throw new c("Invalid URL protocol: the URL must start with `http:` or `https:`.")}if(!(e instanceof URL)){if(e.port!=null&&e.port!==""&&!Number.isFinite(parseInt(e.port))){throw new c("Invalid URL: port must be a valid integer or a string representation of an integer.")}if(e.path!=null&&typeof e.path!=="string"){throw new c("Invalid URL path: the path must be a string or null/undefined.")}if(e.pathname!=null&&typeof e.pathname!=="string"){throw new c("Invalid URL pathname: the pathname must be a string or null/undefined.")}if(e.hostname!=null&&typeof e.hostname!=="string"){throw new c("Invalid URL hostname: the hostname must be a string or null/undefined.")}if(e.origin!=null&&typeof e.origin!=="string"){throw new c("Invalid URL origin: the origin must be a string or null/undefined.")}const t=e.port!=null?e.port:e.protocol==="https:"?443:80;let n=e.origin!=null?e.origin:`${e.protocol}//${e.hostname}:${t}`;let s=e.path!=null?e.path:`${e.pathname||""}${e.search||""}`;if(n.endsWith("/")){n=n.substring(0,n.length-1)}if(s&&!s.startsWith("/")){s=`/${s}`}e=new URL(n+s)}return e}function parseOrigin(e){e=parseURL(e);if(e.pathname!=="/"||e.search||e.hash){throw new c("invalid url")}return e}function getHostname(e){if(e[0]==="["){const t=e.indexOf("]");s(t!==-1);return e.substr(1,t-1)}const t=e.indexOf(":");if(t===-1)return e;return e.substr(0,t)}function getServerName(e){if(!e){return null}s.strictEqual(typeof e,"string");const t=getHostname(e);if(a.isIP(t)){return""}return t}function deepClone(e){return JSON.parse(JSON.stringify(e))}function isAsyncIterable(e){return!!(e!=null&&typeof e[Symbol.asyncIterator]==="function")}function isIterable(e){return!!(e!=null&&(typeof e[Symbol.iterator]==="function"||typeof e[Symbol.asyncIterator]==="function"))}function bodyLength(e){if(e==null){return 0}else if(isStream(e)){const t=e._readableState;return t&&t.objectMode===false&&t.ended===true&&Number.isFinite(t.length)?t.length:null}else if(isBlobLike(e)){return e.size!=null?e.size:null}else if(isBuffer(e)){return e.byteLength}return null}function isDestroyed(e){return!e||!!(e.destroyed||e[i])}function isReadableAborted(e){const t=e&&e._readableState;return isDestroyed(e)&&t&&!t.endEmitted}function destroy(e,t){if(!isStream(e)||isDestroyed(e)){return}if(typeof e.destroy==="function"){if(Object.getPrototypeOf(e).constructor===o){e.socket=null}e.destroy(t)}else if(t){process.nextTick(((e,t)=>{e.emit("error",t)}),e,t)}if(e.destroyed!==true){e[i]=true}}const h=/timeout=(\d+)/;function parseKeepAliveTimeout(e){const t=e.toString().match(h);return t?parseInt(t[1],10)*1e3:null}function parseHeaders(e,t={}){if(!Array.isArray(e))return e;for(let n=0;n{e.close()}))}else{const t=Buffer.isBuffer(s)?s:Buffer.from(s);e.enqueue(new Uint8Array(t))}return e.desiredSize>0},async cancel(e){await t.return()}},0)}function isFormDataLike(e){return e&&typeof e==="object"&&typeof e.append==="function"&&typeof e.delete==="function"&&typeof e.get==="function"&&typeof e.getAll==="function"&&typeof e.has==="function"&&typeof e.set==="function"&&e[Symbol.toStringTag]==="FormData"}function throwIfAborted(e){if(!e){return}if(typeof e.throwIfAborted==="function"){e.throwIfAborted()}else{if(e.aborted){const e=new Error("The operation was aborted");e.name="AbortError";throw e}}}let E;function addAbortListener(e,t){if(typeof Symbol.dispose==="symbol"){if(!E){E=n(2361)}if(typeof E.addAbortListener==="function"&&"aborted"in e){return E.addAbortListener(e,t)}}if("addEventListener"in e){e.addEventListener("abort",t,{once:true});return()=>e.removeEventListener("abort",t)}e.addListener("abort",t);return()=>e.removeListener("abort",t)}const m=!!String.prototype.toWellFormed;function toUSVString(e){if(m){return`${e}`.toWellFormed()}else if(l.toUSVString){return l.toUSVString(e)}return`${e}`}const C=Object.create(null);C.enumerable=true;e.exports={kEnumerableProperty:C,nop:nop,isDisturbed:isDisturbed,isErrored:isErrored,isReadable:isReadable,toUSVString:toUSVString,isReadableAborted:isReadableAborted,isBlobLike:isBlobLike,parseOrigin:parseOrigin,parseURL:parseURL,getServerName:getServerName,isStream:isStream,isIterable:isIterable,isAsyncIterable:isAsyncIterable,isDestroyed:isDestroyed,parseRawHeaders:parseRawHeaders,parseHeaders:parseHeaders,parseKeepAliveTimeout:parseKeepAliveTimeout,destroy:destroy,bodyLength:bodyLength,deepClone:deepClone,ReadableStreamFrom:ReadableStreamFrom,isBuffer:isBuffer,validateHandler:validateHandler,getSocketInfo:getSocketInfo,isFormDataLike:isFormDataLike,buildURL:buildURL,throwIfAborted:throwIfAborted,addAbortListener:addAbortListener,nodeMajor:p,nodeMinor:g,nodeHasAutoSelectFamily:p>18||p===18&&g>=13}},4839:(e,t,n)=>{"use strict";const s=n(412);const{ClientDestroyedError:i,ClientClosedError:r,InvalidArgumentError:o}=n(8045);const{kDestroy:A,kClose:a,kDispatch:c,kInterceptors:u}=n(2785);const l=Symbol("destroyed");const d=Symbol("closed");const p=Symbol("onDestroyed");const g=Symbol("onClosed");const h=Symbol("Intercepted Dispatch");class DispatcherBase extends s{constructor(){super();this[l]=false;this[p]=null;this[d]=false;this[g]=[]}get destroyed(){return this[l]}get closed(){return this[d]}get interceptors(){return this[u]}set interceptors(e){if(e){for(let t=e.length-1;t>=0;t--){const e=this[u][t];if(typeof e!=="function"){throw new o("interceptor must be an function")}}}this[u]=e}close(e){if(e===undefined){return new Promise(((e,t)=>{this.close(((n,s)=>n?t(n):e(s)))}))}if(typeof e!=="function"){throw new o("invalid callback")}if(this[l]){queueMicrotask((()=>e(new i,null)));return}if(this[d]){if(this[g]){this[g].push(e)}else{queueMicrotask((()=>e(null,null)))}return}this[d]=true;this[g].push(e);const onClosed=()=>{const e=this[g];this[g]=null;for(let t=0;tthis.destroy())).then((()=>{queueMicrotask(onClosed)}))}destroy(e,t){if(typeof e==="function"){t=e;e=null}if(t===undefined){return new Promise(((t,n)=>{this.destroy(e,((e,s)=>e?n(e):t(s)))}))}if(typeof t!=="function"){throw new o("invalid callback")}if(this[l]){if(this[p]){this[p].push(t)}else{queueMicrotask((()=>t(null,null)))}return}if(!e){e=new i}this[l]=true;this[p]=this[p]||[];this[p].push(t);const onDestroyed=()=>{const e=this[p];this[p]=null;for(let t=0;t{queueMicrotask(onDestroyed)}))}[h](e,t){if(!this[u]||this[u].length===0){this[h]=this[c];return this[c](e,t)}let n=this[c].bind(this);for(let e=this[u].length-1;e>=0;e--){n=this[u][e](n)}this[h]=n;return n(e,t)}dispatch(e,t){if(!t||typeof t!=="object"){throw new o("handler must be an object")}try{if(!e||typeof e!=="object"){throw new o("opts must be an object.")}if(this[l]||this[p]){throw new i}if(this[d]){throw new r}return this[h](e,t)}catch(e){if(typeof t.onError!=="function"){throw new o("invalid onError method")}t.onError(e);return false}}}e.exports=DispatcherBase},412:(e,t,n)=>{"use strict";const s=n(2361);class Dispatcher extends s{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}}e.exports=Dispatcher},1472:(e,t,n)=>{"use strict";const s=n(3438);const i=n(3983);const{ReadableStreamFrom:r,isBlobLike:o,isReadableStreamLike:A,readableStreamClose:a,createDeferredPromise:c,fullyReadBody:u}=n(2538);const{FormData:l}=n(2015);const{kState:d}=n(5861);const{webidl:p}=n(1744);const{DOMException:g,structuredClone:h}=n(1037);const{Blob:f,File:E}=n(4300);const{kBodyUsed:m}=n(2785);const C=n(9491);const{isErrored:Q}=n(3983);const{isUint8Array:I,isArrayBuffer:B}=n(4978);const{File:y}=n(8511);const{parseMIMEType:b,serializeAMimeType:w}=n(685);let R=globalThis.ReadableStream;const v=E??y;const k=new TextEncoder;const S=new TextDecoder;function extractBody(e,t=false){if(!R){R=n(5356).ReadableStream}let s=null;if(e instanceof R){s=e}else if(o(e)){s=e.stream()}else{s=new R({async pull(e){e.enqueue(typeof u==="string"?k.encode(u):u);queueMicrotask((()=>a(e)))},start(){},type:undefined})}C(A(s));let c=null;let u=null;let l=null;let d=null;if(typeof e==="string"){u=e;d="text/plain;charset=UTF-8"}else if(e instanceof URLSearchParams){u=e.toString();d="application/x-www-form-urlencoded;charset=UTF-8"}else if(B(e)){u=new Uint8Array(e.slice())}else if(ArrayBuffer.isView(e)){u=new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength))}else if(i.isFormDataLike(e)){const t=`----formdata-undici-0${`${Math.floor(Math.random()*1e11)}`.padStart(11,"0")}`;const n=`--${t}\r\nContent-Disposition: form-data` +/*! formdata-polyfill. MIT License. Jimmy Wärting */;const escape=e=>e.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22");const normalizeLinefeeds=e=>e.replace(/\r?\n|\r/g,"\r\n");const s=[];const i=new Uint8Array([13,10]);l=0;let r=false;for(const[t,o]of e){if(typeof o==="string"){const e=k.encode(n+`; name="${escape(normalizeLinefeeds(t))}"`+`\r\n\r\n${normalizeLinefeeds(o)}\r\n`);s.push(e);l+=e.byteLength}else{const e=k.encode(`${n}; name="${escape(normalizeLinefeeds(t))}"`+(o.name?`; filename="${escape(o.name)}"`:"")+"\r\n"+`Content-Type: ${o.type||"application/octet-stream"}\r\n\r\n`);s.push(e,o,i);if(typeof o.size==="number"){l+=e.byteLength+o.size+i.byteLength}else{r=true}}}const o=k.encode(`--${t}--`);s.push(o);l+=o.byteLength;if(r){l=null}u=e;c=async function*(){for(const e of s){if(e.stream){yield*e.stream()}else{yield e}}};d="multipart/form-data; boundary="+t}else if(o(e)){u=e;l=e.size;if(e.type){d=e.type}}else if(typeof e[Symbol.asyncIterator]==="function"){if(t){throw new TypeError("keepalive")}if(i.isDisturbed(e)||e.locked){throw new TypeError("Response body object should not be disturbed or locked")}s=e instanceof R?e:r(e)}if(typeof u==="string"||i.isBuffer(u)){l=Buffer.byteLength(u)}if(c!=null){let t;s=new R({async start(){t=c(e)[Symbol.asyncIterator]()},async pull(e){const{value:n,done:i}=await t.next();if(i){queueMicrotask((()=>{e.close()}))}else{if(!Q(s)){e.enqueue(new Uint8Array(n))}}return e.desiredSize>0},async cancel(e){await t.return()},type:undefined})}const p={stream:s,source:u,length:l};return[p,d]}function safelyExtractBody(e,t=false){if(!R){R=n(5356).ReadableStream}if(e instanceof R){C(!i.isDisturbed(e),"The body has already been consumed.");C(!e.locked,"The stream is locked.")}return extractBody(e,t)}function cloneBody(e){const[t,n]=e.stream.tee();const s=h(n,{transfer:[n]});const[,i]=s.tee();e.stream=t;return{stream:i,length:e.length,source:e.source}}async function*consumeBody(e){if(e){if(I(e)){yield e}else{const t=e.stream;if(i.isDisturbed(t)){throw new TypeError("The body has already been consumed.")}if(t.locked){throw new TypeError("The stream is locked.")}t[m]=true;yield*t}}}function throwIfAborted(e){if(e.aborted){throw new g("The operation was aborted.","AbortError")}}function bodyMixinMethods(e){const t={blob(){return specConsumeBody(this,(e=>{let t=bodyMimeType(this);if(t==="failure"){t=""}else if(t){t=w(t)}return new f([e],{type:t})}),e)},arrayBuffer(){return specConsumeBody(this,(e=>new Uint8Array(e).buffer),e)},text(){return specConsumeBody(this,utf8DecodeBytes,e)},json(){return specConsumeBody(this,parseJSONFromBytes,e)},async formData(){p.brandCheck(this,e);throwIfAborted(this[d]);const t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){const e={};for(const[t,n]of this.headers)e[t.toLowerCase()]=n;const t=new l;let n;try{n=new s({headers:e,preservePath:true})}catch(e){throw new g(`${e}`,"AbortError")}n.on("field",((e,n)=>{t.append(e,n)}));n.on("file",((e,n,s,i,r)=>{const o=[];if(i==="base64"||i.toLowerCase()==="base64"){let i="";n.on("data",(e=>{i+=e.toString().replace(/[\r\n]/gm,"");const t=i.length-i.length%4;o.push(Buffer.from(i.slice(0,t),"base64"));i=i.slice(t)}));n.on("end",(()=>{o.push(Buffer.from(i,"base64"));t.append(e,new v(o,s,{type:r}))}))}else{n.on("data",(e=>{o.push(e)}));n.on("end",(()=>{t.append(e,new v(o,s,{type:r}))}))}}));const i=new Promise(((e,t)=>{n.on("finish",e);n.on("error",(e=>t(new TypeError(e))))}));if(this.body!==null)for await(const e of consumeBody(this[d].body))n.write(e);n.end();await i;return t}else if(/application\/x-www-form-urlencoded/.test(t)){let e;try{let t="";const n=new TextDecoder("utf-8",{ignoreBOM:true});for await(const e of consumeBody(this[d].body)){if(!I(e)){throw new TypeError("Expected Uint8Array chunk")}t+=n.decode(e,{stream:true})}t+=n.decode();e=new URLSearchParams(t)}catch(e){throw Object.assign(new TypeError,{cause:e})}const t=new l;for(const[n,s]of e){t.append(n,s)}return t}else{await Promise.resolve();throwIfAborted(this[d]);throw p.errors.exception({header:`${e.name}.formData`,message:"Could not parse content as FormData."})}}};return t}function mixinBody(e){Object.assign(e.prototype,bodyMixinMethods(e))}async function specConsumeBody(e,t,n){p.brandCheck(e,n);throwIfAborted(e[d]);if(bodyUnusable(e[d].body)){throw new TypeError("Body is unusable")}const s=c();const errorSteps=e=>s.reject(e);const successSteps=e=>{try{s.resolve(t(e))}catch(e){errorSteps(e)}};if(e[d].body==null){successSteps(new Uint8Array);return s.promise}await u(e[d].body,successSteps,errorSteps);return s.promise}function bodyUnusable(e){return e!=null&&(e.stream.locked||i.isDisturbed(e.stream))}function utf8DecodeBytes(e){if(e.length===0){return""}if(e[0]===239&&e[1]===187&&e[2]===191){e=e.subarray(3)}const t=S.decode(e);return t}function parseJSONFromBytes(e){return JSON.parse(utf8DecodeBytes(e))}function bodyMimeType(e){const{headersList:t}=e[d];const n=t.get("content-type");if(n===null){return"failure"}return b(n)}e.exports={extractBody:extractBody,safelyExtractBody:safelyExtractBody,cloneBody:cloneBody,mixinBody:mixinBody}},1037:(e,t,n)=>{"use strict";const{MessageChannel:s,receiveMessageOnPort:i}=n(1267);const r=["GET","HEAD","POST"];const o=new Set(r);const A=[101,204,205,304];const a=[301,302,303,307,308];const c=new Set(a);const u=["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 l=new Set(u);const d=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"];const p=new Set(d);const g=["follow","manual","error"];const h=["GET","HEAD","OPTIONS","TRACE"];const f=new Set(h);const E=["navigate","same-origin","no-cors","cors"];const m=["omit","same-origin","include"];const C=["default","no-store","reload","no-cache","force-cache","only-if-cached"];const Q=["content-encoding","content-language","content-location","content-type","content-length"];const I=["half"];const B=["CONNECT","TRACE","TRACK"];const y=new Set(B);const b=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""];const w=new Set(b);const R=globalThis.DOMException??(()=>{try{atob("~")}catch(e){return Object.getPrototypeOf(e).constructor}})();let v;const k=globalThis.structuredClone??function structuredClone(e,t=undefined){if(arguments.length===0){throw new TypeError("missing argument")}if(!v){v=new s}v.port1.unref();v.port2.unref();v.port1.postMessage(e,t?.transfer);return i(v.port2).message};e.exports={DOMException:R,structuredClone:k,subresource:b,forbiddenMethods:B,requestBodyHeader:Q,referrerPolicy:d,requestRedirect:g,requestMode:E,requestCredentials:m,requestCache:C,redirectStatus:a,corsSafeListedMethods:r,nullBodyStatus:A,safeMethods:h,badPorts:u,requestDuplex:I,subresourceSet:w,badPortsSet:l,redirectStatusSet:c,corsSafeListedMethodsSet:o,safeMethodsSet:f,forbiddenMethodsSet:y,referrerPolicySet:p}},685:(e,t,n)=>{const s=n(9491);const{atob:i}=n(4300);const{isomorphicDecode:r}=n(2538);const o=new TextEncoder;const A=/^[!#$%&'*+-.^_|~A-Za-z0-9]+$/;const a=/(\u000A|\u000D|\u0009|\u0020)/;const c=/[\u0009|\u0020-\u007E|\u0080-\u00FF]/;function dataURLProcessor(e){s(e.protocol==="data:");let t=URLSerializer(e,true);t=t.slice(5);const n={position:0};let i=collectASequenceOfCodePointsFast(",",t,n);const o=i.length;i=removeASCIIWhitespace(i,true,true);if(n.position>=t.length){return"failure"}n.position++;const A=t.slice(o+1);let a=stringPercentDecode(A);if(/;(\u0020){0,}base64$/i.test(i)){const e=r(a);a=forgivingBase64(e);if(a==="failure"){return"failure"}i=i.slice(0,-6);i=i.replace(/(\u0020)+$/,"");i=i.slice(0,-1)}if(i.startsWith(";")){i="text/plain"+i}let c=parseMIMEType(i);if(c==="failure"){c=parseMIMEType("text/plain;charset=US-ASCII")}return{mimeType:c,body:a}}function URLSerializer(e,t=false){const n=e.href;if(!t){return n}const s=n.lastIndexOf("#");if(s===-1){return n}return n.slice(0,s)}function collectASequenceOfCodePoints(e,t,n){let s="";while(n.positione.length){return"failure"}t.position++;let s=collectASequenceOfCodePointsFast(";",e,t);s=removeHTTPWhitespace(s,false,true);if(s.length===0||!A.test(s)){return"failure"}const i=n.toLowerCase();const r=s.toLowerCase();const o={type:i,subtype:r,parameters:new Map,essence:`${i}/${r}`};while(t.positiona.test(e)),e,t);let n=collectASequenceOfCodePoints((e=>e!==";"&&e!=="="),e,t);n=n.toLowerCase();if(t.positione.length){break}let s=null;if(e[t.position]==='"'){s=collectAnHTTPQuotedString(e,t,true);collectASequenceOfCodePointsFast(";",e,t)}else{s=collectASequenceOfCodePointsFast(";",e,t);s=removeHTTPWhitespace(s,false,true);if(s.length===0){continue}}if(n.length!==0&&A.test(n)&&(s.length===0||c.test(s))&&!o.parameters.has(n)){o.parameters.set(n,s)}}return o}function forgivingBase64(e){e=e.replace(/[\u0009\u000A\u000C\u000D\u0020]/g,"");if(e.length%4===0){e=e.replace(/=?=$/,"")}if(e.length%4===1){return"failure"}if(/[^+/0-9A-Za-z]/.test(e)){return"failure"}const t=i(e);const n=new Uint8Array(t.length);for(let e=0;ee!=='"'&&e!=="\\"),e,t);if(t.position>=e.length){break}const n=e[t.position];t.position++;if(n==="\\"){if(t.position>=e.length){r+="\\";break}r+=e[t.position];t.position++}else{s(n==='"');break}}if(n){return r}return e.slice(i,t.position)}function serializeAMimeType(e){s(e!=="failure");const{parameters:t,essence:n}=e;let i=n;for(let[e,n]of t.entries()){i+=";";i+=e;i+="=";if(!A.test(n)){n=n.replace(/(\\|")/g,"\\$1");n='"'+n;n+='"'}i+=n}return i}function isHTTPWhiteSpace(e){return e==="\r"||e==="\n"||e==="\t"||e===" "}function removeHTTPWhitespace(e,t=true,n=true){let s=0;let i=e.length-1;if(t){for(;s0&&isHTTPWhiteSpace(e[i]);i--);}return e.slice(s,i+1)}function isASCIIWhitespace(e){return e==="\r"||e==="\n"||e==="\t"||e==="\f"||e===" "}function removeASCIIWhitespace(e,t=true,n=true){let s=0;let i=e.length-1;if(t){for(;s0&&isASCIIWhitespace(e[i]);i--);}return e.slice(s,i+1)}e.exports={dataURLProcessor:dataURLProcessor,URLSerializer:URLSerializer,collectASequenceOfCodePoints:collectASequenceOfCodePoints,collectASequenceOfCodePointsFast:collectASequenceOfCodePointsFast,stringPercentDecode:stringPercentDecode,parseMIMEType:parseMIMEType,collectAnHTTPQuotedString:collectAnHTTPQuotedString,serializeAMimeType:serializeAMimeType}},8511:(e,t,n)=>{"use strict";const{Blob:s,File:i}=n(4300);const{types:r}=n(3837);const{kState:o}=n(5861);const{isBlobLike:A}=n(2538);const{webidl:a}=n(1744);const{parseMIMEType:c,serializeAMimeType:u}=n(685);const{kEnumerableProperty:l}=n(3983);const d=new TextEncoder;class File extends s{constructor(e,t,n={}){a.argumentLengthCheck(arguments,2,{header:"File constructor"});e=a.converters["sequence"](e);t=a.converters.USVString(t);n=a.converters.FilePropertyBag(n);const s=t;let i=n.type;let r;e:{if(i){i=c(i);if(i==="failure"){i="";break e}i=u(i).toLowerCase()}r=n.lastModified}super(processBlobParts(e,n),{type:i});this[o]={name:s,lastModified:r,type:i}}get name(){a.brandCheck(this,File);return this[o].name}get lastModified(){a.brandCheck(this,File);return this[o].lastModified}get type(){a.brandCheck(this,File);return this[o].type}}class FileLike{constructor(e,t,n={}){const s=t;const i=n.type;const r=n.lastModified??Date.now();this[o]={blobLike:e,name:s,type:i,lastModified:r}}stream(...e){a.brandCheck(this,FileLike);return this[o].blobLike.stream(...e)}arrayBuffer(...e){a.brandCheck(this,FileLike);return this[o].blobLike.arrayBuffer(...e)}slice(...e){a.brandCheck(this,FileLike);return this[o].blobLike.slice(...e)}text(...e){a.brandCheck(this,FileLike);return this[o].blobLike.text(...e)}get size(){a.brandCheck(this,FileLike);return this[o].blobLike.size}get type(){a.brandCheck(this,FileLike);return this[o].blobLike.type}get name(){a.brandCheck(this,FileLike);return this[o].name}get lastModified(){a.brandCheck(this,FileLike);return this[o].lastModified}get[Symbol.toStringTag](){return"File"}}Object.defineProperties(File.prototype,{[Symbol.toStringTag]:{value:"File",configurable:true},name:l,lastModified:l});a.converters.Blob=a.interfaceConverter(s);a.converters.BlobPart=function(e,t){if(a.util.Type(e)==="Object"){if(A(e)){return a.converters.Blob(e,{strict:false})}if(ArrayBuffer.isView(e)||r.isAnyArrayBuffer(e)){return a.converters.BufferSource(e,t)}}return a.converters.USVString(e,t)};a.converters["sequence"]=a.sequenceConverter(a.converters.BlobPart);a.converters.FilePropertyBag=a.dictionaryConverter([{key:"lastModified",converter:a.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:a.converters.DOMString,defaultValue:""},{key:"endings",converter:e=>{e=a.converters.DOMString(e);e=e.toLowerCase();if(e!=="native"){e="transparent"}return e},defaultValue:"transparent"}]);function processBlobParts(e,t){const n=[];for(const s of e){if(typeof s==="string"){let e=s;if(t.endings==="native"){e=convertLineEndingsNative(e)}n.push(d.encode(e))}else if(r.isAnyArrayBuffer(s)||r.isTypedArray(s)){if(!s.buffer){n.push(new Uint8Array(s))}else{n.push(new Uint8Array(s.buffer,s.byteOffset,s.byteLength))}}else if(A(s)){n.push(s)}}return n}function convertLineEndingsNative(e){let t="\n";if(process.platform==="win32"){t="\r\n"}return e.replace(/\r?\n/g,t)}function isFileLike(e){return i&&e instanceof i||e instanceof File||e&&(typeof e.stream==="function"||typeof e.arrayBuffer==="function")&&e[Symbol.toStringTag]==="File"}e.exports={File:File,FileLike:FileLike,isFileLike:isFileLike}},2015:(e,t,n)=>{"use strict";const{isBlobLike:s,toUSVString:i,makeIterator:r}=n(2538);const{kState:o}=n(5861);const{File:A,FileLike:a,isFileLike:c}=n(8511);const{webidl:u}=n(1744);const{Blob:l,File:d}=n(4300);const p=d??A;class FormData{constructor(e){if(e!==undefined){throw u.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]})}this[o]=[]}append(e,t,n=undefined){u.brandCheck(this,FormData);u.argumentLengthCheck(arguments,2,{header:"FormData.append"});if(arguments.length===3&&!s(t)){throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'")}e=u.converters.USVString(e);t=s(t)?u.converters.Blob(t,{strict:false}):u.converters.USVString(t);n=arguments.length===3?u.converters.USVString(n):undefined;const i=makeEntry(e,t,n);this[o].push(i)}delete(e){u.brandCheck(this,FormData);u.argumentLengthCheck(arguments,1,{header:"FormData.delete"});e=u.converters.USVString(e);this[o]=this[o].filter((t=>t.name!==e))}get(e){u.brandCheck(this,FormData);u.argumentLengthCheck(arguments,1,{header:"FormData.get"});e=u.converters.USVString(e);const t=this[o].findIndex((t=>t.name===e));if(t===-1){return null}return this[o][t].value}getAll(e){u.brandCheck(this,FormData);u.argumentLengthCheck(arguments,1,{header:"FormData.getAll"});e=u.converters.USVString(e);return this[o].filter((t=>t.name===e)).map((e=>e.value))}has(e){u.brandCheck(this,FormData);u.argumentLengthCheck(arguments,1,{header:"FormData.has"});e=u.converters.USVString(e);return this[o].findIndex((t=>t.name===e))!==-1}set(e,t,n=undefined){u.brandCheck(this,FormData);u.argumentLengthCheck(arguments,2,{header:"FormData.set"});if(arguments.length===3&&!s(t)){throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'")}e=u.converters.USVString(e);t=s(t)?u.converters.Blob(t,{strict:false}):u.converters.USVString(t);n=arguments.length===3?i(n):undefined;const r=makeEntry(e,t,n);const A=this[o].findIndex((t=>t.name===e));if(A!==-1){this[o]=[...this[o].slice(0,A),r,...this[o].slice(A+1).filter((t=>t.name!==e))]}else{this[o].push(r)}}entries(){u.brandCheck(this,FormData);return r((()=>this[o].map((e=>[e.name,e.value]))),"FormData","key+value")}keys(){u.brandCheck(this,FormData);return r((()=>this[o].map((e=>[e.name,e.value]))),"FormData","key")}values(){u.brandCheck(this,FormData);return r((()=>this[o].map((e=>[e.name,e.value]))),"FormData","value")}forEach(e,t=globalThis){u.brandCheck(this,FormData);u.argumentLengthCheck(arguments,1,{header:"FormData.forEach"});if(typeof e!=="function"){throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.")}for(const[n,s]of this){e.apply(t,[s,n,this])}}}FormData.prototype[Symbol.iterator]=FormData.prototype.entries;Object.defineProperties(FormData.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:true}});function makeEntry(e,t,n){e=Buffer.from(e).toString("utf8");if(typeof t==="string"){t=Buffer.from(t).toString("utf8")}else{if(!c(t)){t=t instanceof l?new p([t],"blob",{type:t.type}):new a(t,"blob",{type:t.type})}if(n!==undefined){const e={type:t.type,lastModified:t.lastModified};t=d&&t instanceof d||t instanceof A?new p([t],n,e):new a(t,n,e)}}return{name:e,value:t}}e.exports={FormData:FormData}},1246:e=>{"use strict";const t=Symbol.for("undici.globalOrigin.1");function getGlobalOrigin(){return globalThis[t]}function setGlobalOrigin(e){if(e===undefined){Object.defineProperty(globalThis,t,{value:undefined,writable:true,enumerable:false,configurable:false});return}const n=new URL(e);if(n.protocol!=="http:"&&n.protocol!=="https:"){throw new TypeError(`Only http & https urls are allowed, received ${n.protocol}`)}Object.defineProperty(globalThis,t,{value:n,writable:true,enumerable:false,configurable:false})}e.exports={getGlobalOrigin:getGlobalOrigin,setGlobalOrigin:setGlobalOrigin}},554:(e,t,n)=>{"use strict";const{kHeadersList:s}=n(2785);const{kGuard:i}=n(5861);const{kEnumerableProperty:r}=n(3983);const{makeIterator:o,isValidHeaderName:A,isValidHeaderValue:a}=n(2538);const{webidl:c}=n(1744);const u=n(9491);const l=Symbol("headers map");const d=Symbol("headers map sorted");function headerValueNormalize(e){let t=e.length;while(/[\r\n\t ]/.test(e.charAt(--t)));return e.slice(0,t+1).replace(/^[\r\n\t ]+/,"")}function fill(e,t){if(Array.isArray(t)){for(const n of t){if(n.length!==2){throw c.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${n.length}.`})}e.append(n[0],n[1])}}else if(typeof t==="object"&&t!==null){for(const[n,s]of Object.entries(t)){e.append(n,s)}}else{throw c.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})}}class HeadersList{cookies=null;constructor(e){if(e instanceof HeadersList){this[l]=new Map(e[l]);this[d]=e[d];this.cookies=e.cookies}else{this[l]=new Map(e);this[d]=null}}contains(e){e=e.toLowerCase();return this[l].has(e)}clear(){this[l].clear();this[d]=null;this.cookies=null}append(e,t){this[d]=null;const n=e.toLowerCase();const s=this[l].get(n);if(s){const e=n==="cookie"?"; ":", ";this[l].set(n,{name:s.name,value:`${s.value}${e}${t}`})}else{this[l].set(n,{name:e,value:t})}if(n==="set-cookie"){this.cookies??=[];this.cookies.push(t)}}set(e,t){this[d]=null;const n=e.toLowerCase();if(n==="set-cookie"){this.cookies=[t]}return this[l].set(n,{name:e,value:t})}delete(e){this[d]=null;e=e.toLowerCase();if(e==="set-cookie"){this.cookies=null}return this[l].delete(e)}get(e){if(!this.contains(e)){return null}return this[l].get(e.toLowerCase())?.value??null}*[Symbol.iterator](){for(const[e,{value:t}]of this[l]){yield[e,t]}}get entries(){const e={};if(this[l].size){for(const{name:t,value:n}of this[l].values()){e[t]=n}}return e}}class Headers{constructor(e=undefined){this[s]=new HeadersList;this[i]="none";if(e!==undefined){e=c.converters.HeadersInit(e);fill(this,e)}}append(e,t){c.brandCheck(this,Headers);c.argumentLengthCheck(arguments,2,{header:"Headers.append"});e=c.converters.ByteString(e);t=c.converters.ByteString(t);t=headerValueNormalize(t);if(!A(e)){throw c.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"})}else if(!a(t)){throw c.errors.invalidArgument({prefix:"Headers.append",value:t,type:"header value"})}if(this[i]==="immutable"){throw new TypeError("immutable")}else if(this[i]==="request-no-cors"){}return this[s].append(e,t)}delete(e){c.brandCheck(this,Headers);c.argumentLengthCheck(arguments,1,{header:"Headers.delete"});e=c.converters.ByteString(e);if(!A(e)){throw c.errors.invalidArgument({prefix:"Headers.delete",value:e,type:"header name"})}if(this[i]==="immutable"){throw new TypeError("immutable")}else if(this[i]==="request-no-cors"){}if(!this[s].contains(e)){return}return this[s].delete(e)}get(e){c.brandCheck(this,Headers);c.argumentLengthCheck(arguments,1,{header:"Headers.get"});e=c.converters.ByteString(e);if(!A(e)){throw c.errors.invalidArgument({prefix:"Headers.get",value:e,type:"header name"})}return this[s].get(e)}has(e){c.brandCheck(this,Headers);c.argumentLengthCheck(arguments,1,{header:"Headers.has"});e=c.converters.ByteString(e);if(!A(e)){throw c.errors.invalidArgument({prefix:"Headers.has",value:e,type:"header name"})}return this[s].contains(e)}set(e,t){c.brandCheck(this,Headers);c.argumentLengthCheck(arguments,2,{header:"Headers.set"});e=c.converters.ByteString(e);t=c.converters.ByteString(t);t=headerValueNormalize(t);if(!A(e)){throw c.errors.invalidArgument({prefix:"Headers.set",value:e,type:"header name"})}else if(!a(t)){throw c.errors.invalidArgument({prefix:"Headers.set",value:t,type:"header value"})}if(this[i]==="immutable"){throw new TypeError("immutable")}else if(this[i]==="request-no-cors"){}return this[s].set(e,t)}getSetCookie(){c.brandCheck(this,Headers);const e=this[s].cookies;if(e){return[...e]}return[]}get[d](){if(this[s][d]){return this[s][d]}const e=[];const t=[...this[s]].sort(((e,t)=>e[0][...this[d].values()]),"Headers","key")}values(){c.brandCheck(this,Headers);return o((()=>[...this[d].values()]),"Headers","value")}entries(){c.brandCheck(this,Headers);return o((()=>[...this[d].values()]),"Headers","key+value")}forEach(e,t=globalThis){c.brandCheck(this,Headers);c.argumentLengthCheck(arguments,1,{header:"Headers.forEach"});if(typeof e!=="function"){throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.")}for(const[n,s]of this){e.apply(t,[s,n,this])}}[Symbol.for("nodejs.util.inspect.custom")](){c.brandCheck(this,Headers);return this[s]}}Headers.prototype[Symbol.iterator]=Headers.prototype.entries;Object.defineProperties(Headers.prototype,{append:r,delete:r,get:r,has:r,set:r,getSetCookie:r,keys:r,values:r,entries:r,forEach:r,[Symbol.iterator]:{enumerable:false},[Symbol.toStringTag]:{value:"Headers",configurable:true}});c.converters.HeadersInit=function(e){if(c.util.Type(e)==="Object"){if(e[Symbol.iterator]){return c.converters["sequence>"](e)}return c.converters["record"](e)}throw c.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};e.exports={fill:fill,Headers:Headers,HeadersList:HeadersList}},4881:(e,t,n)=>{"use strict";const{Response:s,makeNetworkError:i,makeAppropriateNetworkError:r,filterResponse:o,makeResponse:A}=n(7823);const{Headers:a}=n(554);const{Request:c,makeRequest:u}=n(8359);const l=n(9796);const{bytesMatch:d,makePolicyContainer:p,clonePolicyContainer:g,requestBadPort:h,TAOCheck:f,appendRequestOriginHeader:E,responseLocationURL:m,requestCurrentURL:C,setRequestReferrerPolicyOnRedirect:Q,tryUpgradeRequestToAPotentiallyTrustworthyURL:I,createOpaqueTimingInfo:B,appendFetchMetadata:y,corsCheck:b,crossOriginResourcePolicyCheck:w,determineRequestsReferrer:R,coarsenedSharedCurrentTime:v,createDeferredPromise:k,isBlobLike:S,sameOrigin:x,isCancelled:D,isAborted:_,isErrorLike:N,fullyReadBody:F,readableStreamClose:U,isomorphicEncode:T,urlIsLocal:M,urlIsHttpHttpsScheme:L,urlHasHttpsScheme:O}=n(2538);const{kState:P,kHeaders:J,kGuard:H,kRealm:q}=n(5861);const G=n(9491);const{safelyExtractBody:Y}=n(1472);const{redirectStatusSet:V,nullBodyStatus:j,safeMethodsSet:W,requestBodyHeader:K,subresourceSet:z,DOMException:Z}=n(1037);const{kHeadersList:X}=n(2785);const $=n(2361);const{Readable:ee,pipeline:te}=n(2781);const{addAbortListener:ne,isErrored:se,isReadable:ie,nodeMajor:re,nodeMinor:oe}=n(3983);const{dataURLProcessor:Ae,serializeAMimeType:ae}=n(685);const{TransformStream:ce}=n(5356);const{getGlobalDispatcher:ue}=n(1892);const{webidl:le}=n(1744);const{STATUS_CODES:de}=n(3685);const pe=["GET","HEAD"];let ge;let he=globalThis.ReadableStream;class Fetch extends ${constructor(e){super();this.dispatcher=e;this.connection=null;this.dump=false;this.state="ongoing";this.setMaxListeners(21)}terminate(e){if(this.state!=="ongoing"){return}this.state="terminated";this.connection?.destroy(e);this.emit("terminated",e)}abort(e){if(this.state!=="ongoing"){return}this.state="aborted";if(!e){e=new Z("The operation was aborted.","AbortError")}this.serializedAbortReason=e;this.connection?.destroy(e);this.emit("terminated",e)}}function fetch(e,t={}){le.argumentLengthCheck(arguments,1,{header:"globalThis.fetch"});const n=k();let i;try{i=new c(e,t)}catch(e){n.reject(e);return n.promise}const r=i[P];if(i.signal.aborted){abortFetch(n,r,null,i.signal.reason);return n.promise}const o=r.client.globalObject;if(o?.constructor?.name==="ServiceWorkerGlobalScope"){r.serviceWorkers="none"}let A=null;const a=null;let u=false;let l=null;ne(i.signal,(()=>{u=true;G(l!=null);l.abort(i.signal.reason);abortFetch(n,r,A,i.signal.reason)}));const handleFetchDone=e=>finalizeAndReportTiming(e,"fetch");const processResponse=e=>{if(u){return Promise.resolve()}if(e.aborted){abortFetch(n,r,A,l.serializedAbortReason);return Promise.resolve()}if(e.type==="error"){n.reject(Object.assign(new TypeError("fetch failed"),{cause:e.error}));return Promise.resolve()}A=new s;A[P]=e;A[q]=a;A[J][X]=e.headersList;A[J][H]="immutable";A[J][q]=a;n.resolve(A)};l=fetching({request:r,processResponseEndOfBody:handleFetchDone,processResponse:processResponse,dispatcher:t.dispatcher??ue()});return n.promise}function finalizeAndReportTiming(e,t="other"){if(e.type==="error"&&e.aborted){return}if(!e.urlList?.length){return}const n=e.urlList[0];let s=e.timingInfo;let i=e.cacheState;if(!L(n)){return}if(s===null){return}if(!s.timingAllowPassed){s=B({startTime:s.startTime});i=""}s.endTime=v();e.timingInfo=s;markResourceTiming(s,n,t,globalThis,i)}function markResourceTiming(e,t,n,s,i){if(re>18||re===18&&oe>=2){performance.markResourceTiming(e,t.href,n,s,i)}}function abortFetch(e,t,n,s){if(!s){s=new Z("The operation was aborted.","AbortError")}e.reject(s);if(t.body!=null&&ie(t.body?.stream)){t.body.stream.cancel(s).catch((e=>{if(e.code==="ERR_INVALID_STATE"){return}throw e}))}if(n==null){return}const i=n[P];if(i.body!=null&&ie(i.body?.stream)){i.body.stream.cancel(s).catch((e=>{if(e.code==="ERR_INVALID_STATE"){return}throw e}))}}function fetching({request:e,processRequestBodyChunkLength:t,processRequestEndOfBody:n,processResponse:s,processResponseEndOfBody:i,processResponseConsumeBody:r,useParallelQueue:o=false,dispatcher:A}){let a=null;let c=false;if(e.client!=null){a=e.client.globalObject;c=e.client.crossOriginIsolatedCapability}const u=v(c);const l=B({startTime:u});const d={controller:new Fetch(A),request:e,timingInfo:l,processRequestBodyChunkLength:t,processRequestEndOfBody:n,processResponse:s,processResponseConsumeBody:r,processResponseEndOfBody:i,taskDestination:a,crossOriginIsolatedCapability:c};G(!e.body||e.body.stream);if(e.window==="client"){e.window=e.client?.globalObject?.constructor?.name==="Window"?e.client:"no-window"}if(e.origin==="client"){e.origin=e.client?.origin}if(e.policyContainer==="client"){if(e.client!=null){e.policyContainer=g(e.client.policyContainer)}else{e.policyContainer=p()}}if(!e.headersList.contains("accept")){const t="*/*";e.headersList.append("accept",t)}if(!e.headersList.contains("accept-language")){e.headersList.append("accept-language","*")}if(e.priority===null){}if(z.has(e.destination)){}mainFetch(d).catch((e=>{d.controller.terminate(e)}));return d.controller}async function mainFetch(e,t=false){const n=e.request;let s=null;if(n.localURLsOnly&&!M(C(n))){s=i("local URLs only")}I(n);if(h(n)==="blocked"){s=i("bad port")}if(n.referrerPolicy===""){n.referrerPolicy=n.policyContainer.referrerPolicy}if(n.referrer!=="no-referrer"){n.referrer=R(n)}if(s===null){s=await(async()=>{const t=C(n);if(x(t,n.url)&&n.responseTainting==="basic"||t.protocol==="data:"||(n.mode==="navigate"||n.mode==="websocket")){n.responseTainting="basic";return await schemeFetch(e)}if(n.mode==="same-origin"){return i('request mode cannot be "same-origin"')}if(n.mode==="no-cors"){if(n.redirect!=="follow"){return i('redirect mode cannot be "follow" for "no-cors" request')}n.responseTainting="opaque";return await schemeFetch(e)}if(!L(C(n))){return i("URL scheme must be a HTTP(S) scheme")}n.responseTainting="cors";return await httpFetch(e)})()}if(t){return s}if(s.status!==0&&!s.internalResponse){if(n.responseTainting==="cors"){}if(n.responseTainting==="basic"){s=o(s,"basic")}else if(n.responseTainting==="cors"){s=o(s,"cors")}else if(n.responseTainting==="opaque"){s=o(s,"opaque")}else{G(false)}}let r=s.status===0?s:s.internalResponse;if(r.urlList.length===0){r.urlList.push(...n.urlList)}if(!n.timingAllowFailed){s.timingAllowPassed=true}if(s.type==="opaque"&&r.status===206&&r.rangeRequested&&!n.headers.contains("range")){s=r=i()}if(s.status!==0&&(n.method==="HEAD"||n.method==="CONNECT"||j.includes(r.status))){r.body=null;e.controller.dump=true}if(n.integrity){const processBodyError=t=>fetchFinale(e,i(t));if(n.responseTainting==="opaque"||s.body==null){processBodyError(s.error);return}const processBody=t=>{if(!d(t,n.integrity)){processBodyError("integrity mismatch");return}s.body=Y(t)[0];fetchFinale(e,s)};await F(s.body,processBody,processBodyError)}else{fetchFinale(e,s)}}function schemeFetch(e){if(D(e)&&e.request.redirectCount===0){return Promise.resolve(r(e))}const{request:t}=e;const{protocol:s}=C(t);switch(s){case"about:":{return Promise.resolve(i("about scheme is not supported"))}case"blob:":{if(!ge){ge=n(4300).resolveObjectURL}const e=C(t);if(e.search.length!==0){return Promise.resolve(i("NetworkError when attempting to fetch resource."))}const s=ge(e.toString());if(t.method!=="GET"||!S(s)){return Promise.resolve(i("invalid method"))}const r=Y(s);const o=r[0];const a=T(`${o.length}`);const c=r[1]??"";const u=A({statusText:"OK",headersList:[["content-length",{name:"Content-Length",value:a}],["content-type",{name:"Content-Type",value:c}]]});u.body=o;return Promise.resolve(u)}case"data:":{const e=C(t);const n=Ae(e);if(n==="failure"){return Promise.resolve(i("failed to fetch the data URL"))}const s=ae(n.mimeType);return Promise.resolve(A({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:s}]],body:Y(n.body)[0]}))}case"file:":{return Promise.resolve(i("not implemented... yet..."))}case"http:":case"https:":{return httpFetch(e).catch((e=>i(e)))}default:{return Promise.resolve(i("unknown scheme"))}}}function finalizeResponse(e,t){e.request.done=true;if(e.processResponseDone!=null){queueMicrotask((()=>e.processResponseDone(t)))}}function fetchFinale(e,t){if(t.type==="error"){t.urlList=[e.request.urlList[0]];t.timingInfo=B({startTime:e.timingInfo.startTime})}const processResponseEndOfBody=()=>{e.request.done=true;if(e.processResponseEndOfBody!=null){queueMicrotask((()=>e.processResponseEndOfBody(t)))}};if(e.processResponse!=null){queueMicrotask((()=>e.processResponse(t)))}if(t.body==null){processResponseEndOfBody()}else{const identityTransformAlgorithm=(e,t)=>{t.enqueue(e)};const e=new ce({start(){},transform:identityTransformAlgorithm,flush:processResponseEndOfBody},{size(){return 1}},{size(){return 1}});t.body={stream:t.body.stream.pipeThrough(e)}}if(e.processResponseConsumeBody!=null){const processBody=n=>e.processResponseConsumeBody(t,n);const processBodyError=n=>e.processResponseConsumeBody(t,n);if(t.body==null){queueMicrotask((()=>processBody(null)))}else{return F(t.body,processBody,processBodyError)}return Promise.resolve()}}async function httpFetch(e){const t=e.request;let n=null;let s=null;const r=e.timingInfo;if(t.serviceWorkers==="all"){}if(n===null){if(t.redirect==="follow"){t.serviceWorkers="none"}s=n=await httpNetworkOrCacheFetch(e);if(t.responseTainting==="cors"&&b(t,n)==="failure"){return i("cors failure")}if(f(t,n)==="failure"){t.timingAllowFailed=true}}if((t.responseTainting==="opaque"||n.type==="opaque")&&w(t.origin,t.client,t.destination,s)==="blocked"){return i("blocked")}if(V.has(s.status)){if(t.redirect!=="manual"){e.controller.connection.destroy()}if(t.redirect==="error"){n=i("unexpected redirect")}else if(t.redirect==="manual"){n=s}else if(t.redirect==="follow"){n=await httpRedirectFetch(e,n)}else{G(false)}}n.timingInfo=r;return n}function httpRedirectFetch(e,t){const n=e.request;const s=t.internalResponse?t.internalResponse:t;let r;try{r=m(s,C(n).hash);if(r==null){return t}}catch(e){return Promise.resolve(i(e))}if(!L(r)){return Promise.resolve(i("URL scheme must be a HTTP(S) scheme"))}if(n.redirectCount===20){return Promise.resolve(i("redirect count exceeded"))}n.redirectCount+=1;if(n.mode==="cors"&&(r.username||r.password)&&!x(n,r)){return Promise.resolve(i('cross origin not allowed for request mode "cors"'))}if(n.responseTainting==="cors"&&(r.username||r.password)){return Promise.resolve(i('URL cannot contain credentials for request mode "cors"'))}if(s.status!==303&&n.body!=null&&n.body.source==null){return Promise.resolve(i())}if([301,302].includes(s.status)&&n.method==="POST"||s.status===303&&!pe.includes(n.method)){n.method="GET";n.body=null;for(const e of K){n.headersList.delete(e)}}if(!x(C(n),r)){n.headersList.delete("authorization");n.headersList.delete("cookie");n.headersList.delete("host")}if(n.body!=null){G(n.body.source!=null);n.body=Y(n.body.source)[0]}const o=e.timingInfo;o.redirectEndTime=o.postRedirectStartTime=v(e.crossOriginIsolatedCapability);if(o.redirectStartTime===0){o.redirectStartTime=o.startTime}n.urlList.push(r);Q(n,s);return mainFetch(e,true)}async function httpNetworkOrCacheFetch(e,t=false,n=false){const s=e.request;let o=null;let A=null;let a=null;const c=null;const l=false;if(s.window==="no-window"&&s.redirect==="error"){o=e;A=s}else{A=u(s);o={...e};o.request=A}const d=s.credentials==="include"||s.credentials==="same-origin"&&s.responseTainting==="basic";const p=A.body?A.body.length:null;let g=null;if(A.body==null&&["POST","PUT"].includes(A.method)){g="0"}if(p!=null){g=T(`${p}`)}if(g!=null){A.headersList.append("content-length",g)}if(p!=null&&A.keepalive){}if(A.referrer instanceof URL){A.headersList.append("referer",T(A.referrer.href))}E(A);y(A);if(!A.headersList.contains("user-agent")){A.headersList.append("user-agent",typeof esbuildDetection==="undefined"?"undici":"node")}if(A.cache==="default"&&(A.headersList.contains("if-modified-since")||A.headersList.contains("if-none-match")||A.headersList.contains("if-unmodified-since")||A.headersList.contains("if-match")||A.headersList.contains("if-range"))){A.cache="no-store"}if(A.cache==="no-cache"&&!A.preventNoCacheCacheControlHeaderModification&&!A.headersList.contains("cache-control")){A.headersList.append("cache-control","max-age=0")}if(A.cache==="no-store"||A.cache==="reload"){if(!A.headersList.contains("pragma")){A.headersList.append("pragma","no-cache")}if(!A.headersList.contains("cache-control")){A.headersList.append("cache-control","no-cache")}}if(A.headersList.contains("range")){A.headersList.append("accept-encoding","identity")}if(!A.headersList.contains("accept-encoding")){if(O(C(A))){A.headersList.append("accept-encoding","br, gzip, deflate")}else{A.headersList.append("accept-encoding","gzip, deflate")}}A.headersList.delete("host");if(d){}if(c==null){A.cache="no-store"}if(A.mode!=="no-store"&&A.mode!=="reload"){}if(a==null){if(A.mode==="only-if-cached"){return i("only if cached")}const e=await httpNetworkFetch(o,d,n);if(!W.has(A.method)&&e.status>=200&&e.status<=399){}if(l&&e.status===304){}if(a==null){a=e}}a.urlList=[...A.urlList];if(A.headersList.contains("range")){a.rangeRequested=true}a.requestIncludesCredentials=d;if(a.status===407){if(s.window==="no-window"){return i()}if(D(e)){return r(e)}return i("proxy authentication required")}if(a.status===421&&!n&&(s.body==null||s.body.source!=null)){if(D(e)){return r(e)}e.controller.connection.destroy();a=await httpNetworkOrCacheFetch(e,t,true)}if(t){}return a}async function httpNetworkFetch(e,t=false,s=false){G(!e.controller.connection||e.controller.connection.destroyed);e.controller.connection={abort:null,destroyed:false,destroy(e){if(!this.destroyed){this.destroyed=true;this.abort?.(e??new Z("The operation was aborted.","AbortError"))}}};const o=e.request;let c=null;const u=e.timingInfo;const d=null;if(d==null){o.cache="no-store"}const p=s?"yes":"no";if(o.mode==="websocket"){}else{}let g=null;if(o.body==null&&e.processRequestEndOfBody){queueMicrotask((()=>e.processRequestEndOfBody()))}else if(o.body!=null){const processBodyChunk=async function*(t){if(D(e)){return}yield t;e.processRequestBodyChunkLength?.(t.byteLength)};const processEndOfBody=()=>{if(D(e)){return}if(e.processRequestEndOfBody){e.processRequestEndOfBody()}};const processBodyError=t=>{if(D(e)){return}if(t.name==="AbortError"){e.controller.abort()}else{e.controller.terminate(t)}};g=async function*(){try{for await(const e of o.body.stream){yield*processBodyChunk(e)}processEndOfBody()}catch(e){processBodyError(e)}}()}try{const{body:t,status:n,statusText:s,headersList:i,socket:r}=await dispatch({body:g});if(r){c=A({status:n,statusText:s,headersList:i,socket:r})}else{const r=t[Symbol.asyncIterator]();e.controller.next=()=>r.next();c=A({status:n,statusText:s,headersList:i})}}catch(t){if(t.name==="AbortError"){e.controller.connection.destroy();return r(e,t)}return i(t)}const pullAlgorithm=()=>{e.controller.resume()};const cancelAlgorithm=t=>{e.controller.abort(t)};if(!he){he=n(5356).ReadableStream}const h=new he({async start(t){e.controller.controller=t},async pull(e){await pullAlgorithm(e)},async cancel(e){await cancelAlgorithm(e)}},{highWaterMark:0,size(){return 1}});c.body={stream:h};e.controller.on("terminated",onAborted);e.controller.resume=async()=>{while(true){let t;let n;try{const{done:n,value:s}=await e.controller.next();if(_(e)){break}t=n?undefined:s}catch(s){if(e.controller.ended&&!u.encodedBodySize){t=undefined}else{t=s;n=true}}if(t===undefined){U(e.controller.controller);finalizeResponse(e,c);return}u.decodedBodySize+=t?.byteLength??0;if(n){e.controller.terminate(t);return}e.controller.controller.enqueue(new Uint8Array(t));if(se(h)){e.controller.terminate();return}if(!e.controller.controller.desiredSize){return}}};function onAborted(t){if(_(e)){c.aborted=true;if(ie(h)){e.controller.controller.error(e.controller.serializedAbortReason)}}else{if(ie(h)){e.controller.controller.error(new TypeError("terminated",{cause:N(t)?t:undefined}))}}e.controller.connection.destroy()}return c;async function dispatch({body:t}){const n=C(o);const s=e.controller.dispatcher;return new Promise(((i,r)=>s.dispatch({path:n.pathname+n.search,origin:n.origin,method:o.method,body:e.controller.dispatcher.isMockActive?o.body&&o.body.source:t,headers:o.headersList.entries,maxRedirections:0,upgrade:o.mode==="websocket"?"websocket":undefined},{body:null,abort:null,onConnect(t){const{connection:n}=e.controller;if(n.destroyed){t(new Z("The operation was aborted.","AbortError"))}else{e.controller.on("terminated",t);this.abort=n.abort=t}},onHeaders(e,t,n,s){if(e<200){return}let r=[];let A="";const c=new a;if(Array.isArray(t)){for(let e=0;ee.trim()))}else if(n.toLowerCase()==="location"){A=s}c.append(n,s)}}else{const e=Object.keys(t);for(const n of e){const e=t[n];if(n.toLowerCase()==="content-encoding"){r=e.toLowerCase().split(",").map((e=>e.trim())).reverse()}else if(n.toLowerCase()==="location"){A=e}c.append(n,e)}}this.body=new ee({read:n});const u=[];const d=o.redirect==="follow"&&A&&V.has(e);if(o.method!=="HEAD"&&o.method!=="CONNECT"&&!j.includes(e)&&!d){for(const e of r){if(e==="x-gzip"||e==="gzip"){u.push(l.createGunzip({flush:l.constants.Z_SYNC_FLUSH,finishFlush:l.constants.Z_SYNC_FLUSH}))}else if(e==="deflate"){u.push(l.createInflate())}else if(e==="br"){u.push(l.createBrotliDecompress())}else{u.length=0;break}}}i({status:e,statusText:s,headersList:c[X],body:u.length?te(this.body,...u,(()=>{})):this.body.on("error",(()=>{}))});return true},onData(t){if(e.controller.dump){return}const n=t;u.encodedBodySize+=n.byteLength;return this.body.push(n)},onComplete(){if(this.abort){e.controller.off("terminated",this.abort)}e.controller.ended=true;this.body.push(null)},onError(t){if(this.abort){e.controller.off("terminated",this.abort)}this.body?.destroy(t);e.controller.terminate(t);r(t)},onUpgrade(e,t,n){if(e!==101){return}const s=new a;for(let e=0;e{"use strict";const{extractBody:s,mixinBody:i,cloneBody:r}=n(1472);const{Headers:o,fill:A,HeadersList:a}=n(554);const{FinalizationRegistry:c}=n(6436)();const u=n(3983);const{isValidHTTPToken:l,sameOrigin:d,normalizeMethod:p,makePolicyContainer:g}=n(2538);const{forbiddenMethodsSet:h,corsSafeListedMethodsSet:f,referrerPolicy:E,requestRedirect:m,requestMode:C,requestCredentials:Q,requestCache:I,requestDuplex:B}=n(1037);const{kEnumerableProperty:y}=u;const{kHeaders:b,kSignal:w,kState:R,kGuard:v,kRealm:k}=n(5861);const{webidl:S}=n(1744);const{getGlobalOrigin:x}=n(1246);const{URLSerializer:D}=n(685);const{kHeadersList:_}=n(2785);const N=n(9491);const{getMaxListeners:F,setMaxListeners:U,getEventListeners:T,defaultMaxListeners:M}=n(2361);let L=globalThis.TransformStream;const O=Symbol("init");const P=Symbol("abortController");const J=new c((({signal:e,abort:t})=>{e.removeEventListener("abort",t)}));class Request{constructor(e,t={}){if(e===O){return}S.argumentLengthCheck(arguments,1,{header:"Request constructor"});e=S.converters.RequestInfo(e);t=S.converters.RequestInit(t);this[k]={settingsObject:{baseUrl:x(),get origin(){return this.baseUrl?.origin},policyContainer:g()}};let i=null;let r=null;const a=this[k].settingsObject.baseUrl;let c=null;if(typeof e==="string"){let t;try{t=new URL(e,a)}catch(t){throw new TypeError("Failed to parse URL from "+e,{cause:t})}if(t.username||t.password){throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+e)}i=makeRequest({urlList:[t]});r="cors"}else{N(e instanceof Request);i=e[R];c=e[w]}const E=this[k].settingsObject.origin;let m="client";if(i.window?.constructor?.name==="EnvironmentSettingsObject"&&d(i.window,E)){m=i.window}if(t.window!=null){throw new TypeError(`'window' option '${m}' must be null`)}if("window"in t){m="no-window"}i=makeRequest({method:i.method,headersList:i.headersList,unsafeRequest:i.unsafeRequest,client:this[k].settingsObject,window:m,priority:i.priority,origin:i.origin,referrer:i.referrer,referrerPolicy:i.referrerPolicy,mode:i.mode,credentials:i.credentials,cache:i.cache,redirect:i.redirect,integrity:i.integrity,keepalive:i.keepalive,reloadNavigation:i.reloadNavigation,historyNavigation:i.historyNavigation,urlList:[...i.urlList]});if(Object.keys(t).length>0){if(i.mode==="navigate"){i.mode="same-origin"}i.reloadNavigation=false;i.historyNavigation=false;i.origin="client";i.referrer="client";i.referrerPolicy="";i.url=i.urlList[i.urlList.length-1];i.urlList=[i.url]}if(t.referrer!==undefined){const e=t.referrer;if(e===""){i.referrer="no-referrer"}else{let t;try{t=new URL(e,a)}catch(t){throw new TypeError(`Referrer "${e}" is not a valid URL.`,{cause:t})}if(t.protocol==="about:"&&t.hostname==="client"||E&&!d(t,this[k].settingsObject.baseUrl)){i.referrer="client"}else{i.referrer=t}}}if(t.referrerPolicy!==undefined){i.referrerPolicy=t.referrerPolicy}let C;if(t.mode!==undefined){C=t.mode}else{C=r}if(C==="navigate"){throw S.errors.exception({header:"Request constructor",message:"invalid request mode navigate."})}if(C!=null){i.mode=C}if(t.credentials!==undefined){i.credentials=t.credentials}if(t.cache!==undefined){i.cache=t.cache}if(i.cache==="only-if-cached"&&i.mode!=="same-origin"){throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode")}if(t.redirect!==undefined){i.redirect=t.redirect}if(t.integrity!==undefined&&t.integrity!=null){i.integrity=String(t.integrity)}if(t.keepalive!==undefined){i.keepalive=Boolean(t.keepalive)}if(t.method!==undefined){let e=t.method;if(!l(t.method)){throw TypeError(`'${t.method}' is not a valid HTTP method.`)}if(h.has(e.toUpperCase())){throw TypeError(`'${t.method}' HTTP method is unsupported.`)}e=p(t.method);i.method=e}if(t.signal!==undefined){c=t.signal}this[R]=i;const Q=new AbortController;this[w]=Q.signal;this[w][k]=this[k];if(c!=null){if(!c||typeof c.aborted!=="boolean"||typeof c.addEventListener!=="function"){throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal.")}if(c.aborted){Q.abort(c.reason)}else{this[P]=Q;const e=new WeakRef(Q);const abort=function(){const t=e.deref();if(t!==undefined){t.abort(this.reason)}};try{if(typeof F==="function"&&F(c)===M){U(100,c)}else if(T(c,"abort").length>=M){U(100,c)}}catch{}u.addAbortListener(c,abort);J.register(Q,{signal:c,abort:abort})}}this[b]=new o;this[b][_]=i.headersList;this[b][v]="request";this[b][k]=this[k];if(C==="no-cors"){if(!f.has(i.method)){throw new TypeError(`'${i.method} is unsupported in no-cors mode.`)}this[b][v]="request-no-cors"}if(Object.keys(t).length!==0){let e=new o(this[b]);if(t.headers!==undefined){e=t.headers}this[b][_].clear();if(e.constructor.name==="Headers"){for(const[t,n]of e){this[b].append(t,n)}}else{A(this[b],e)}}const I=e instanceof Request?e[R].body:null;if((t.body!=null||I!=null)&&(i.method==="GET"||i.method==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body.")}let B=null;if(t.body!=null){const[e,n]=s(t.body,i.keepalive);B=e;if(n&&!this[b][_].contains("content-type")){this[b].append("content-type",n)}}const y=B??I;if(y!=null&&y.source==null){if(B!=null&&t.duplex==null){throw new TypeError("RequestInit: duplex option is required when sending a body.")}if(i.mode!=="same-origin"&&i.mode!=="cors"){throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"')}i.useCORSPreflightFlag=true}let D=y;if(B==null&&I!=null){if(u.isDisturbed(I.stream)||I.stream.locked){throw new TypeError("Cannot construct a Request with a Request object that has already been used.")}if(!L){L=n(5356).TransformStream}const e=new L;I.stream.pipeThrough(e);D={source:I.source,length:I.length,stream:e.readable}}this[R].body=D}get method(){S.brandCheck(this,Request);return this[R].method}get url(){S.brandCheck(this,Request);return D(this[R].url)}get headers(){S.brandCheck(this,Request);return this[b]}get destination(){S.brandCheck(this,Request);return this[R].destination}get referrer(){S.brandCheck(this,Request);if(this[R].referrer==="no-referrer"){return""}if(this[R].referrer==="client"){return"about:client"}return this[R].referrer.toString()}get referrerPolicy(){S.brandCheck(this,Request);return this[R].referrerPolicy}get mode(){S.brandCheck(this,Request);return this[R].mode}get credentials(){return this[R].credentials}get cache(){S.brandCheck(this,Request);return this[R].cache}get redirect(){S.brandCheck(this,Request);return this[R].redirect}get integrity(){S.brandCheck(this,Request);return this[R].integrity}get keepalive(){S.brandCheck(this,Request);return this[R].keepalive}get isReloadNavigation(){S.brandCheck(this,Request);return this[R].reloadNavigation}get isHistoryNavigation(){S.brandCheck(this,Request);return this[R].historyNavigation}get signal(){S.brandCheck(this,Request);return this[w]}get body(){S.brandCheck(this,Request);return this[R].body?this[R].body.stream:null}get bodyUsed(){S.brandCheck(this,Request);return!!this[R].body&&u.isDisturbed(this[R].body.stream)}get duplex(){S.brandCheck(this,Request);return"half"}clone(){S.brandCheck(this,Request);if(this.bodyUsed||this.body?.locked){throw new TypeError("unusable")}const e=cloneRequest(this[R]);const t=new Request(O);t[R]=e;t[k]=this[k];t[b]=new o;t[b][_]=e.headersList;t[b][v]=this[b][v];t[b][k]=this[b][k];const n=new AbortController;if(this.signal.aborted){n.abort(this.signal.reason)}else{u.addAbortListener(this.signal,(()=>{n.abort(this.signal.reason)}))}t[w]=n.signal;return t}}i(Request);function makeRequest(e){const t={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,...e,headersList:e.headersList?new a(e.headersList):new a};t.url=t.urlList[0];return t}function cloneRequest(e){const t=makeRequest({...e,body:null});if(e.body!=null){t.body=r(e.body)}return t}Object.defineProperties(Request.prototype,{method:y,url:y,headers:y,redirect:y,clone:y,signal:y,duplex:y,destination:y,body:y,bodyUsed:y,isHistoryNavigation:y,isReloadNavigation:y,keepalive:y,integrity:y,cache:y,credentials:y,attribute:y,referrerPolicy:y,referrer:y,mode:y,[Symbol.toStringTag]:{value:"Request",configurable:true}});S.converters.Request=S.interfaceConverter(Request);S.converters.RequestInfo=function(e){if(typeof e==="string"){return S.converters.USVString(e)}if(e instanceof Request){return S.converters.Request(e)}return S.converters.USVString(e)};S.converters.AbortSignal=S.interfaceConverter(AbortSignal);S.converters.RequestInit=S.dictionaryConverter([{key:"method",converter:S.converters.ByteString},{key:"headers",converter:S.converters.HeadersInit},{key:"body",converter:S.nullableConverter(S.converters.BodyInit)},{key:"referrer",converter:S.converters.USVString},{key:"referrerPolicy",converter:S.converters.DOMString,allowedValues:E},{key:"mode",converter:S.converters.DOMString,allowedValues:C},{key:"credentials",converter:S.converters.DOMString,allowedValues:Q},{key:"cache",converter:S.converters.DOMString,allowedValues:I},{key:"redirect",converter:S.converters.DOMString,allowedValues:m},{key:"integrity",converter:S.converters.DOMString},{key:"keepalive",converter:S.converters.boolean},{key:"signal",converter:S.nullableConverter((e=>S.converters.AbortSignal(e,{strict:false})))},{key:"window",converter:S.converters.any},{key:"duplex",converter:S.converters.DOMString,allowedValues:B}]);e.exports={Request:Request,makeRequest:makeRequest}},7823:(e,t,n)=>{"use strict";const{Headers:s,HeadersList:i,fill:r}=n(554);const{extractBody:o,cloneBody:A,mixinBody:a}=n(1472);const c=n(3983);const{kEnumerableProperty:u}=c;const{isValidReasonPhrase:l,isCancelled:d,isAborted:p,isBlobLike:g,serializeJavascriptValueToJSONString:h,isErrorLike:f,isomorphicEncode:E}=n(2538);const{redirectStatusSet:m,nullBodyStatus:C,DOMException:Q}=n(1037);const{kState:I,kHeaders:B,kGuard:y,kRealm:b}=n(5861);const{webidl:w}=n(1744);const{FormData:R}=n(2015);const{getGlobalOrigin:v}=n(1246);const{URLSerializer:k}=n(685);const{kHeadersList:S}=n(2785);const x=n(9491);const{types:D}=n(3837);const _=globalThis.ReadableStream||n(5356).ReadableStream;const N=new TextEncoder("utf-8");class Response{static error(){const e={settingsObject:{}};const t=new Response;t[I]=makeNetworkError();t[b]=e;t[B][S]=t[I].headersList;t[B][y]="immutable";t[B][b]=e;return t}static json(e,t={}){w.argumentLengthCheck(arguments,1,{header:"Response.json"});if(t!==null){t=w.converters.ResponseInit(t)}const n=N.encode(h(e));const s=o(n);const i={settingsObject:{}};const r=new Response;r[b]=i;r[B][y]="response";r[B][b]=i;initializeResponse(r,t,{body:s[0],type:"application/json"});return r}static redirect(e,t=302){const n={settingsObject:{}};w.argumentLengthCheck(arguments,1,{header:"Response.redirect"});e=w.converters.USVString(e);t=w.converters["unsigned short"](t);let s;try{s=new URL(e,v())}catch(t){throw Object.assign(new TypeError("Failed to parse URL from "+e),{cause:t})}if(!m.has(t)){throw new RangeError("Invalid status code "+t)}const i=new Response;i[b]=n;i[B][y]="immutable";i[B][b]=n;i[I].status=t;const r=E(k(s));i[I].headersList.append("location",r);return i}constructor(e=null,t={}){if(e!==null){e=w.converters.BodyInit(e)}t=w.converters.ResponseInit(t);this[b]={settingsObject:{}};this[I]=makeResponse({});this[B]=new s;this[B][y]="response";this[B][S]=this[I].headersList;this[B][b]=this[b];let n=null;if(e!=null){const[t,s]=o(e);n={body:t,type:s}}initializeResponse(this,t,n)}get type(){w.brandCheck(this,Response);return this[I].type}get url(){w.brandCheck(this,Response);const e=this[I].urlList;const t=e[e.length-1]??null;if(t===null){return""}return k(t,true)}get redirected(){w.brandCheck(this,Response);return this[I].urlList.length>1}get status(){w.brandCheck(this,Response);return this[I].status}get ok(){w.brandCheck(this,Response);return this[I].status>=200&&this[I].status<=299}get statusText(){w.brandCheck(this,Response);return this[I].statusText}get headers(){w.brandCheck(this,Response);return this[B]}get body(){w.brandCheck(this,Response);return this[I].body?this[I].body.stream:null}get bodyUsed(){w.brandCheck(this,Response);return!!this[I].body&&c.isDisturbed(this[I].body.stream)}clone(){w.brandCheck(this,Response);if(this.bodyUsed||this.body&&this.body.locked){throw w.errors.exception({header:"Response.clone",message:"Body has already been consumed."})}const e=cloneResponse(this[I]);const t=new Response;t[I]=e;t[b]=this[b];t[B][S]=e.headersList;t[B][y]=this[B][y];t[B][b]=this[B][b];return t}}a(Response);Object.defineProperties(Response.prototype,{type:u,url:u,status:u,ok:u,redirected:u,statusText:u,headers:u,clone:u,body:u,bodyUsed:u,[Symbol.toStringTag]:{value:"Response",configurable:true}});Object.defineProperties(Response,{json:u,redirect:u,error:u});function cloneResponse(e){if(e.internalResponse){return filterResponse(cloneResponse(e.internalResponse),e.type)}const t=makeResponse({...e,body:null});if(e.body!=null){t.body=A(e.body)}return t}function makeResponse(e){return{aborted:false,rangeRequested:false,timingAllowPassed:false,requestIncludesCredentials:false,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...e,headersList:e.headersList?new i(e.headersList):new i,urlList:e.urlList?[...e.urlList]:[]}}function makeNetworkError(e){const t=f(e);return makeResponse({type:"error",status:0,error:t?e:new Error(e?String(e):e),aborted:e&&e.name==="AbortError"})}function makeFilteredResponse(e,t){t={internalResponse:e,...t};return new Proxy(e,{get(e,n){return n in t?t[n]:e[n]},set(e,n,s){x(!(n in t));e[n]=s;return true}})}function filterResponse(e,t){if(t==="basic"){return makeFilteredResponse(e,{type:"basic",headersList:e.headersList})}else if(t==="cors"){return makeFilteredResponse(e,{type:"cors",headersList:e.headersList})}else if(t==="opaque"){return makeFilteredResponse(e,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null})}else if(t==="opaqueredirect"){return makeFilteredResponse(e,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null})}else{x(false)}}function makeAppropriateNetworkError(e,t=null){x(d(e));return p(e)?makeNetworkError(Object.assign(new Q("The operation was aborted.","AbortError"),{cause:t})):makeNetworkError(Object.assign(new Q("Request was cancelled."),{cause:t}))}function initializeResponse(e,t,n){if(t.status!==null&&(t.status<200||t.status>599)){throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.')}if("statusText"in t&&t.statusText!=null){if(!l(String(t.statusText))){throw new TypeError("Invalid statusText")}}if("status"in t&&t.status!=null){e[I].status=t.status}if("statusText"in t&&t.statusText!=null){e[I].statusText=t.statusText}if("headers"in t&&t.headers!=null){r(e[B],t.headers)}if(n){if(C.includes(e.status)){throw w.errors.exception({header:"Response constructor",message:"Invalid response status code "+e.status})}e[I].body=n.body;if(n.type!=null&&!e[I].headersList.contains("Content-Type")){e[I].headersList.append("content-type",n.type)}}}w.converters.ReadableStream=w.interfaceConverter(_);w.converters.FormData=w.interfaceConverter(R);w.converters.URLSearchParams=w.interfaceConverter(URLSearchParams);w.converters.XMLHttpRequestBodyInit=function(e){if(typeof e==="string"){return w.converters.USVString(e)}if(g(e)){return w.converters.Blob(e,{strict:false})}if(D.isAnyArrayBuffer(e)||D.isTypedArray(e)||D.isDataView(e)){return w.converters.BufferSource(e)}if(c.isFormDataLike(e)){return w.converters.FormData(e,{strict:false})}if(e instanceof URLSearchParams){return w.converters.URLSearchParams(e)}return w.converters.DOMString(e)};w.converters.BodyInit=function(e){if(e instanceof _){return w.converters.ReadableStream(e)}if(e?.[Symbol.asyncIterator]){return e}return w.converters.XMLHttpRequestBodyInit(e)};w.converters.ResponseInit=w.dictionaryConverter([{key:"status",converter:w.converters["unsigned short"],defaultValue:200},{key:"statusText",converter:w.converters.ByteString,defaultValue:""},{key:"headers",converter:w.converters.HeadersInit}]);e.exports={makeNetworkError:makeNetworkError,makeResponse:makeResponse,makeAppropriateNetworkError:makeAppropriateNetworkError,filterResponse:filterResponse,Response:Response,cloneResponse:cloneResponse}},5861:e=>{"use strict";e.exports={kUrl:Symbol("url"),kHeaders:Symbol("headers"),kSignal:Symbol("signal"),kState:Symbol("state"),kGuard:Symbol("guard"),kRealm:Symbol("realm")}},2538:(e,t,n)=>{"use strict";const{redirectStatusSet:s,referrerPolicySet:i,badPortsSet:r}=n(1037);const{getGlobalOrigin:o}=n(1246);const{performance:A}=n(4074);const{isBlobLike:a,toUSVString:c,ReadableStreamFrom:u}=n(3983);const l=n(9491);const{isUint8Array:d}=n(4978);let p;try{p=n(6113)}catch{}function responseURL(e){const t=e.urlList;const n=t.length;return n===0?null:t[n-1].toString()}function responseLocationURL(e,t){if(!s.has(e.status)){return null}let n=e.headersList.get("location");if(n!==null&&isValidHeaderValue(n)){n=new URL(n,responseURL(e))}if(n&&!n.hash){n.hash=t}return n}function requestCurrentURL(e){return e.urlList[e.urlList.length-1]}function requestBadPort(e){const t=requestCurrentURL(e);if(urlIsHttpHttpsScheme(t)&&r.has(t.port)){return"blocked"}return"allowed"}function isErrorLike(e){return e instanceof Error||(e?.constructor?.name==="Error"||e?.constructor?.name==="DOMException")}function isValidReasonPhrase(e){for(let t=0;t=32&&n<=126||n>=128&&n<=255)){return false}}return true}function isTokenChar(e){return!(e>=127||e<=32||e==="("||e===")"||e==="<"||e===">"||e==="@"||e===","||e===";"||e===":"||e==="\\"||e==='"'||e==="/"||e==="["||e==="]"||e==="?"||e==="="||e==="{"||e==="}")}function isValidHTTPToken(e){if(!e||typeof e!=="string"){return false}for(let t=0;t127||!isTokenChar(n)){return false}}return true}function isValidHeaderName(e){if(e.length===0){return false}return isValidHTTPToken(e)}function isValidHeaderValue(e){if(e.startsWith("\t")||e.startsWith(" ")||e.endsWith("\t")||e.endsWith(" ")){return false}if(e.includes("\0")||e.includes("\r")||e.includes("\n")){return false}return true}function setRequestReferrerPolicyOnRedirect(e,t){const{headersList:n}=t;const s=(n.get("referrer-policy")??"").split(",");let r="";if(s.length>0){for(let e=s.length;e!==0;e--){const t=s[e-1].trim();if(i.has(t)){r=t;break}}}if(r!==""){e.referrerPolicy=r}}function crossOriginResourcePolicyCheck(){return"allowed"}function corsCheck(){return"success"}function TAOCheck(){return"success"}function appendFetchMetadata(e){let t=null;t=e.mode;e.headersList.set("sec-fetch-mode",t)}function appendRequestOriginHeader(e){let t=e.origin;if(e.responseTainting==="cors"||e.mode==="websocket"){if(t){e.headersList.append("origin",t)}}else if(e.method!=="GET"&&e.method!=="HEAD"){switch(e.referrerPolicy){case"no-referrer":t=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":if(e.origin&&urlHasHttpsScheme(e.origin)&&!urlHasHttpsScheme(requestCurrentURL(e))){t=null}break;case"same-origin":if(!sameOrigin(e,requestCurrentURL(e))){t=null}break;default:}if(t){e.headersList.append("origin",t)}}}function coarsenedSharedCurrentTime(e){return A.now()}function createOpaqueTimingInfo(e){return{startTime:e.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:e.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function makePolicyContainer(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function clonePolicyContainer(e){return{referrerPolicy:e.referrerPolicy}}function determineRequestsReferrer(e){const t=e.referrerPolicy;l(t);let n=null;if(e.referrer==="client"){const e=o();if(!e||e.origin==="null"){return"no-referrer"}n=new URL(e)}else if(e.referrer instanceof URL){n=e.referrer}let s=stripURLForReferrer(n);const i=stripURLForReferrer(n,true);if(s.toString().length>4096){s=i}const r=sameOrigin(e,s);const A=isURLPotentiallyTrustworthy(s)&&!isURLPotentiallyTrustworthy(e.url);switch(t){case"origin":return i!=null?i:stripURLForReferrer(n,true);case"unsafe-url":return s;case"same-origin":return r?i:"no-referrer";case"origin-when-cross-origin":return r?s:i;case"strict-origin-when-cross-origin":{const t=requestCurrentURL(e);if(sameOrigin(s,t)){return s}if(isURLPotentiallyTrustworthy(s)&&!isURLPotentiallyTrustworthy(t)){return"no-referrer"}return i}case"strict-origin":case"no-referrer-when-downgrade":default:return A?"no-referrer":i}}function stripURLForReferrer(e,t){l(e instanceof URL);if(e.protocol==="file:"||e.protocol==="about:"||e.protocol==="blank:"){return"no-referrer"}e.username="";e.password="";e.hash="";if(t){e.pathname="";e.search=""}return e}function isURLPotentiallyTrustworthy(e){if(!(e instanceof URL)){return false}if(e.href==="about:blank"||e.href==="about:srcdoc"){return true}if(e.protocol==="data:")return true;if(e.protocol==="file:")return true;return isOriginPotentiallyTrustworthy(e.origin);function isOriginPotentiallyTrustworthy(e){if(e==null||e==="null")return false;const t=new URL(e);if(t.protocol==="https:"||t.protocol==="wss:"){return true}if(/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(t.hostname)||(t.hostname==="localhost"||t.hostname.includes("localhost."))||t.hostname.endsWith(".localhost")){return true}return false}}function bytesMatch(e,t){if(p===undefined){return true}const n=parseMetadata(t);if(n==="no metadata"){return true}if(n.length===0){return true}const s=n.sort(((e,t)=>t.algo.localeCompare(e.algo)));const i=s[0].algo;const r=s.filter((e=>e.algo===i));for(const t of r){const n=t.algo;let s=t.hash;if(s.endsWith("==")){s=s.slice(0,-2)}let i=p.createHash(n).update(e).digest("base64");if(i.endsWith("==")){i=i.slice(0,-2)}if(i===s){return true}let r=p.createHash(n).update(e).digest("base64url");if(r.endsWith("==")){r=r.slice(0,-2)}if(r===s){return true}}return false}const g=/((?sha256|sha384|sha512)-(?[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;function parseMetadata(e){const t=[];let n=true;const s=p.getHashes();for(const i of e.split(" ")){n=false;const e=g.exec(i);if(e===null||e.groups===undefined){continue}const r=e.groups.algo;if(s.includes(r.toLowerCase())){t.push(e.groups)}}if(n===true){return"no metadata"}return t}function tryUpgradeRequestToAPotentiallyTrustworthyURL(e){}function sameOrigin(e,t){if(e.origin===t.origin&&e.origin==="null"){return true}if(e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port){return true}return false}function createDeferredPromise(){let e;let t;const n=new Promise(((n,s)=>{e=n;t=s}));return{promise:n,resolve:e,reject:t}}function isAborted(e){return e.controller.state==="aborted"}function isCancelled(e){return e.controller.state==="aborted"||e.controller.state==="terminated"}function normalizeMethod(e){return/^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(e)?e.toUpperCase():e}function serializeJavascriptValueToJSONString(e){const t=JSON.stringify(e);if(t===undefined){throw new TypeError("Value is not JSON serializable")}l(typeof t==="string");return t}const h=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function makeIterator(e,t,n){const s={index:0,kind:n,target:e};const i={next(){if(Object.getPrototypeOf(this)!==i){throw new TypeError(`'next' called on an object that does not implement interface ${t} Iterator.`)}const{index:e,kind:n,target:r}=s;const o=r();const A=o.length;if(e>=A){return{value:undefined,done:true}}const a=o[e];s.index=e+1;return iteratorResult(a,n)},[Symbol.toStringTag]:`${t} Iterator`};Object.setPrototypeOf(i,h);return Object.setPrototypeOf({},i)}function iteratorResult(e,t){let n;switch(t){case"key":{n=e[0];break}case"value":{n=e[1];break}case"key+value":{n=e;break}}return{value:n,done:false}}async function fullyReadBody(e,t,n){const s=t;const i=n;let r;try{r=e.stream.getReader()}catch(e){i(e);return}try{const e=await readAllBytes(r);s(e)}catch(e){i(e)}}let f=globalThis.ReadableStream;function isReadableStreamLike(e){if(!f){f=n(5356).ReadableStream}return e instanceof f||e[Symbol.toStringTag]==="ReadableStream"&&typeof e.tee==="function"}const E=65535;function isomorphicDecode(e){if(e.lengthe+String.fromCharCode(t)),"")}function readableStreamClose(e){try{e.close()}catch(e){if(!e.message.includes("Controller is already closed")){throw e}}}function isomorphicEncode(e){for(let t=0;tObject.prototype.hasOwnProperty.call(e,t));e.exports={isAborted:isAborted,isCancelled:isCancelled,createDeferredPromise:createDeferredPromise,ReadableStreamFrom:u,toUSVString:c,tryUpgradeRequestToAPotentiallyTrustworthyURL:tryUpgradeRequestToAPotentiallyTrustworthyURL,coarsenedSharedCurrentTime:coarsenedSharedCurrentTime,determineRequestsReferrer:determineRequestsReferrer,makePolicyContainer:makePolicyContainer,clonePolicyContainer:clonePolicyContainer,appendFetchMetadata:appendFetchMetadata,appendRequestOriginHeader:appendRequestOriginHeader,TAOCheck:TAOCheck,corsCheck:corsCheck,crossOriginResourcePolicyCheck:crossOriginResourcePolicyCheck,createOpaqueTimingInfo:createOpaqueTimingInfo,setRequestReferrerPolicyOnRedirect:setRequestReferrerPolicyOnRedirect,isValidHTTPToken:isValidHTTPToken,requestBadPort:requestBadPort,requestCurrentURL:requestCurrentURL,responseURL:responseURL,responseLocationURL:responseLocationURL,isBlobLike:a,isURLPotentiallyTrustworthy:isURLPotentiallyTrustworthy,isValidReasonPhrase:isValidReasonPhrase,sameOrigin:sameOrigin,normalizeMethod:normalizeMethod,serializeJavascriptValueToJSONString:serializeJavascriptValueToJSONString,makeIterator:makeIterator,isValidHeaderName:isValidHeaderName,isValidHeaderValue:isValidHeaderValue,hasOwn:m,isErrorLike:isErrorLike,fullyReadBody:fullyReadBody,bytesMatch:bytesMatch,isReadableStreamLike:isReadableStreamLike,readableStreamClose:readableStreamClose,isomorphicEncode:isomorphicEncode,isomorphicDecode:isomorphicDecode,urlIsLocal:urlIsLocal,urlHasHttpsScheme:urlHasHttpsScheme,urlIsHttpHttpsScheme:urlIsHttpHttpsScheme,readAllBytes:readAllBytes}},1744:(e,t,n)=>{"use strict";const{types:s}=n(3837);const{hasOwn:i,toUSVString:r}=n(2538);const o={};o.converters={};o.util={};o.errors={};o.errors.exception=function(e){return new TypeError(`${e.header}: ${e.message}`)};o.errors.conversionFailed=function(e){const t=e.types.length===1?"":" one of";const n=`${e.argument} could not be converted to`+`${t}: ${e.types.join(", ")}.`;return o.errors.exception({header:e.prefix,message:n})};o.errors.invalidArgument=function(e){return o.errors.exception({header:e.prefix,message:`"${e.value}" is an invalid ${e.type}.`})};o.brandCheck=function(e,t,n=undefined){if(n?.strict!==false&&!(e instanceof t)){throw new TypeError("Illegal invocation")}else{return e?.[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}};o.argumentLengthCheck=function({length:e},t,n){if(ei){throw o.errors.exception({header:"Integer conversion",message:`Value must be between ${r}-${i}, got ${A}.`})}return A}if(!Number.isNaN(A)&&s.clamp===true){A=Math.min(Math.max(A,r),i);if(Math.floor(A)%2===0){A=Math.floor(A)}else{A=Math.ceil(A)}return A}if(Number.isNaN(A)||A===0&&Object.is(0,A)||A===Number.POSITIVE_INFINITY||A===Number.NEGATIVE_INFINITY){return 0}A=o.util.IntegerPart(A);A=A%Math.pow(2,t);if(n==="signed"&&A>=Math.pow(2,t)-1){return A-Math.pow(2,t)}return A};o.util.IntegerPart=function(e){const t=Math.floor(Math.abs(e));if(e<0){return-1*t}return t};o.sequenceConverter=function(e){return t=>{if(o.util.Type(t)!=="Object"){throw o.errors.exception({header:"Sequence",message:`Value of type ${o.util.Type(t)} is not an Object.`})}const n=t?.[Symbol.iterator]?.();const s=[];if(n===undefined||typeof n.next!=="function"){throw o.errors.exception({header:"Sequence",message:"Object is not an iterator."})}while(true){const{done:t,value:i}=n.next();if(t){break}s.push(e(i))}return s}};o.recordConverter=function(e,t){return n=>{if(o.util.Type(n)!=="Object"){throw o.errors.exception({header:"Record",message:`Value of type ${o.util.Type(n)} is not an Object.`})}const i={};if(!s.isProxy(n)){const s=Object.keys(n);for(const r of s){const s=e(r);const o=t(n[r]);i[s]=o}return i}const r=Reflect.ownKeys(n);for(const s of r){const r=Reflect.getOwnPropertyDescriptor(n,s);if(r?.enumerable){const r=e(s);const o=t(n[s]);i[r]=o}}return i}};o.interfaceConverter=function(e){return(t,n={})=>{if(n.strict!==false&&!(t instanceof e)){throw o.errors.exception({header:e.name,message:`Expected ${t} to be an instance of ${e.name}.`})}return t}};o.dictionaryConverter=function(e){return t=>{const n=o.util.Type(t);const s={};if(n==="Null"||n==="Undefined"){return s}else if(n!=="Object"){throw o.errors.exception({header:"Dictionary",message:`Expected ${t} to be one of: Null, Undefined, Object.`})}for(const n of e){const{key:e,defaultValue:r,required:A,converter:a}=n;if(A===true){if(!i(t,e)){throw o.errors.exception({header:"Dictionary",message:`Missing required key "${e}".`})}}let c=t[e];const u=i(n,"defaultValue");if(u&&c!==null){c=c??r}if(A||u||c!==undefined){c=a(c);if(n.allowedValues&&!n.allowedValues.includes(c)){throw o.errors.exception({header:"Dictionary",message:`${c} is not an accepted type. Expected one of ${n.allowedValues.join(", ")}.`})}s[e]=c}}return s}};o.nullableConverter=function(e){return t=>{if(t===null){return t}return e(t)}};o.converters.DOMString=function(e,t={}){if(e===null&&t.legacyNullToEmptyString){return""}if(typeof e==="symbol"){throw new TypeError("Could not convert argument of type symbol to string.")}return String(e)};o.converters.ByteString=function(e){const t=o.converters.DOMString(e);for(let e=0;e255){throw new TypeError("Cannot convert argument to a ByteString because the character at "+`index ${e} has a value of ${n} which is greater than 255.`)}}return t};o.converters.USVString=r;o.converters.boolean=function(e){const t=Boolean(e);return t};o.converters.any=function(e){return e};o.converters["long long"]=function(e){const t=o.util.ConvertToInt(e,64,"signed");return t};o.converters["unsigned long long"]=function(e){const t=o.util.ConvertToInt(e,64,"unsigned");return t};o.converters["unsigned long"]=function(e){const t=o.util.ConvertToInt(e,32,"unsigned");return t};o.converters["unsigned short"]=function(e,t){const n=o.util.ConvertToInt(e,16,"unsigned",t);return n};o.converters.ArrayBuffer=function(e,t={}){if(o.util.Type(e)!=="Object"||!s.isAnyArrayBuffer(e)){throw o.errors.conversionFailed({prefix:`${e}`,argument:`${e}`,types:["ArrayBuffer"]})}if(t.allowShared===false&&s.isSharedArrayBuffer(e)){throw o.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."})}return e};o.converters.TypedArray=function(e,t,n={}){if(o.util.Type(e)!=="Object"||!s.isTypedArray(e)||e.constructor.name!==t.name){throw o.errors.conversionFailed({prefix:`${t.name}`,argument:`${e}`,types:[t.name]})}if(n.allowShared===false&&s.isSharedArrayBuffer(e.buffer)){throw o.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."})}return e};o.converters.DataView=function(e,t={}){if(o.util.Type(e)!=="Object"||!s.isDataView(e)){throw o.errors.exception({header:"DataView",message:"Object is not a DataView."})}if(t.allowShared===false&&s.isSharedArrayBuffer(e.buffer)){throw o.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."})}return e};o.converters.BufferSource=function(e,t={}){if(s.isAnyArrayBuffer(e)){return o.converters.ArrayBuffer(e,t)}if(s.isTypedArray(e)){return o.converters.TypedArray(e,e.constructor)}if(s.isDataView(e)){return o.converters.DataView(e,t)}throw new TypeError(`Could not convert ${e} to a BufferSource.`)};o.converters["sequence"]=o.sequenceConverter(o.converters.ByteString);o.converters["sequence>"]=o.sequenceConverter(o.converters["sequence"]);o.converters["record"]=o.recordConverter(o.converters.ByteString,o.converters.ByteString);e.exports={webidl:o}},4854:e=>{"use strict";function getEncoding(e){if(!e){return"failure"}switch(e.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"}}e.exports={getEncoding:getEncoding}},1446:(e,t,n)=>{"use strict";const{staticPropertyDescriptors:s,readOperation:i,fireAProgressEvent:r}=n(7530);const{kState:o,kError:A,kResult:a,kEvents:c,kAborted:u}=n(9054);const{webidl:l}=n(1744);const{kEnumerableProperty:d}=n(3983);class FileReader extends EventTarget{constructor(){super();this[o]="empty";this[a]=null;this[A]=null;this[c]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(e){l.brandCheck(this,FileReader);l.argumentLengthCheck(arguments,1,{header:"FileReader.readAsArrayBuffer"});e=l.converters.Blob(e,{strict:false});i(this,e,"ArrayBuffer")}readAsBinaryString(e){l.brandCheck(this,FileReader);l.argumentLengthCheck(arguments,1,{header:"FileReader.readAsBinaryString"});e=l.converters.Blob(e,{strict:false});i(this,e,"BinaryString")}readAsText(e,t=undefined){l.brandCheck(this,FileReader);l.argumentLengthCheck(arguments,1,{header:"FileReader.readAsText"});e=l.converters.Blob(e,{strict:false});if(t!==undefined){t=l.converters.DOMString(t)}i(this,e,"Text",t)}readAsDataURL(e){l.brandCheck(this,FileReader);l.argumentLengthCheck(arguments,1,{header:"FileReader.readAsDataURL"});e=l.converters.Blob(e,{strict:false});i(this,e,"DataURL")}abort(){if(this[o]==="empty"||this[o]==="done"){this[a]=null;return}if(this[o]==="loading"){this[o]="done";this[a]=null}this[u]=true;r("abort",this);if(this[o]!=="loading"){r("loadend",this)}}get readyState(){l.brandCheck(this,FileReader);switch(this[o]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){l.brandCheck(this,FileReader);return this[a]}get error(){l.brandCheck(this,FileReader);return this[A]}get onloadend(){l.brandCheck(this,FileReader);return this[c].loadend}set onloadend(e){l.brandCheck(this,FileReader);if(this[c].loadend){this.removeEventListener("loadend",this[c].loadend)}if(typeof e==="function"){this[c].loadend=e;this.addEventListener("loadend",e)}else{this[c].loadend=null}}get onerror(){l.brandCheck(this,FileReader);return this[c].error}set onerror(e){l.brandCheck(this,FileReader);if(this[c].error){this.removeEventListener("error",this[c].error)}if(typeof e==="function"){this[c].error=e;this.addEventListener("error",e)}else{this[c].error=null}}get onloadstart(){l.brandCheck(this,FileReader);return this[c].loadstart}set onloadstart(e){l.brandCheck(this,FileReader);if(this[c].loadstart){this.removeEventListener("loadstart",this[c].loadstart)}if(typeof e==="function"){this[c].loadstart=e;this.addEventListener("loadstart",e)}else{this[c].loadstart=null}}get onprogress(){l.brandCheck(this,FileReader);return this[c].progress}set onprogress(e){l.brandCheck(this,FileReader);if(this[c].progress){this.removeEventListener("progress",this[c].progress)}if(typeof e==="function"){this[c].progress=e;this.addEventListener("progress",e)}else{this[c].progress=null}}get onload(){l.brandCheck(this,FileReader);return this[c].load}set onload(e){l.brandCheck(this,FileReader);if(this[c].load){this.removeEventListener("load",this[c].load)}if(typeof e==="function"){this[c].load=e;this.addEventListener("load",e)}else{this[c].load=null}}get onabort(){l.brandCheck(this,FileReader);return this[c].abort}set onabort(e){l.brandCheck(this,FileReader);if(this[c].abort){this.removeEventListener("abort",this[c].abort)}if(typeof e==="function"){this[c].abort=e;this.addEventListener("abort",e)}else{this[c].abort=null}}}FileReader.EMPTY=FileReader.prototype.EMPTY=0;FileReader.LOADING=FileReader.prototype.LOADING=1;FileReader.DONE=FileReader.prototype.DONE=2;Object.defineProperties(FileReader.prototype,{EMPTY:s,LOADING:s,DONE:s,readAsArrayBuffer:d,readAsBinaryString:d,readAsText:d,readAsDataURL:d,abort:d,readyState:d,result:d,error:d,onloadstart:d,onprogress:d,onload:d,onabort:d,onerror:d,onloadend:d,[Symbol.toStringTag]:{value:"FileReader",writable:false,enumerable:false,configurable:true}});Object.defineProperties(FileReader,{EMPTY:s,LOADING:s,DONE:s});e.exports={FileReader:FileReader}},5504:(e,t,n)=>{"use strict";const{webidl:s}=n(1744);const i=Symbol("ProgressEvent state");class ProgressEvent extends Event{constructor(e,t={}){e=s.converters.DOMString(e);t=s.converters.ProgressEventInit(t??{});super(e,t);this[i]={lengthComputable:t.lengthComputable,loaded:t.loaded,total:t.total}}get lengthComputable(){s.brandCheck(this,ProgressEvent);return this[i].lengthComputable}get loaded(){s.brandCheck(this,ProgressEvent);return this[i].loaded}get total(){s.brandCheck(this,ProgressEvent);return this[i].total}}s.converters.ProgressEventInit=s.dictionaryConverter([{key:"lengthComputable",converter:s.converters.boolean,defaultValue:false},{key:"loaded",converter:s.converters["unsigned long long"],defaultValue:0},{key:"total",converter:s.converters["unsigned long long"],defaultValue:0},{key:"bubbles",converter:s.converters.boolean,defaultValue:false},{key:"cancelable",converter:s.converters.boolean,defaultValue:false},{key:"composed",converter:s.converters.boolean,defaultValue:false}]);e.exports={ProgressEvent:ProgressEvent}},9054:e=>{"use strict";e.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")}},7530:(e,t,n)=>{"use strict";const{kState:s,kError:i,kResult:r,kAborted:o,kLastProgressEventFired:A}=n(9054);const{ProgressEvent:a}=n(5504);const{getEncoding:c}=n(4854);const{DOMException:u}=n(1037);const{serializeAMimeType:l,parseMIMEType:d}=n(685);const{types:p}=n(3837);const{StringDecoder:g}=n(1576);const{btoa:h}=n(4300);const f={enumerable:true,writable:false,configurable:false};function readOperation(e,t,n,a){if(e[s]==="loading"){throw new u("Invalid state","InvalidStateError")}e[s]="loading";e[r]=null;e[i]=null;const c=t.stream();const l=c.getReader();const d=[];let g=l.read();let h=true;(async()=>{while(!e[o]){try{const{done:c,value:u}=await g;if(h&&!e[o]){queueMicrotask((()=>{fireAProgressEvent("loadstart",e)}))}h=false;if(!c&&p.isUint8Array(u)){d.push(u);if((e[A]===undefined||Date.now()-e[A]>=50)&&!e[o]){e[A]=Date.now();queueMicrotask((()=>{fireAProgressEvent("progress",e)}))}g=l.read()}else if(c){queueMicrotask((()=>{e[s]="done";try{const s=packageData(d,n,t.type,a);if(e[o]){return}e[r]=s;fireAProgressEvent("load",e)}catch(t){e[i]=t;fireAProgressEvent("error",e)}if(e[s]!=="loading"){fireAProgressEvent("loadend",e)}}));break}}catch(t){if(e[o]){return}queueMicrotask((()=>{e[s]="done";e[i]=t;fireAProgressEvent("error",e);if(e[s]!=="loading"){fireAProgressEvent("loadend",e)}}));break}}})()}function fireAProgressEvent(e,t){const n=new a(e,{bubbles:false,cancelable:false});t.dispatchEvent(n)}function packageData(e,t,n,s){switch(t){case"DataURL":{let t="data:";const s=d(n||"application/octet-stream");if(s!=="failure"){t+=l(s)}t+=";base64,";const i=new g("latin1");for(const n of e){t+=h(i.write(n))}t+=h(i.end());return t}case"Text":{let t="failure";if(s){t=c(s)}if(t==="failure"&&n){const e=d(n);if(e!=="failure"){t=c(e.parameters.get("charset"))}}if(t==="failure"){t="UTF-8"}return decode(e,t)}case"ArrayBuffer":{const t=combineByteSequences(e);return t.buffer}case"BinaryString":{let t="";const n=new g("latin1");for(const s of e){t+=n.write(s)}t+=n.end();return t}}}function decode(e,t){const n=combineByteSequences(e);const s=BOMSniffing(n);let i=0;if(s!==null){t=s;i=s==="UTF-8"?3:2}const r=n.slice(i);return new TextDecoder(t).decode(r)}function BOMSniffing(e){const[t,n,s]=e;if(t===239&&n===187&&s===191){return"UTF-8"}else if(t===254&&n===255){return"UTF-16BE"}else if(t===255&&n===254){return"UTF-16LE"}return null}function combineByteSequences(e){const t=e.reduce(((e,t)=>e+t.byteLength),0);let n=0;return e.reduce(((e,t)=>{e.set(t,n);n+=t.byteLength;return e}),new Uint8Array(t))}e.exports={staticPropertyDescriptors:f,readOperation:readOperation,fireAProgressEvent:fireAProgressEvent}},1892:(e,t,n)=>{"use strict";const s=Symbol.for("undici.globalDispatcher.1");const{InvalidArgumentError:i}=n(8045);const r=n(7890);if(getGlobalDispatcher()===undefined){setGlobalDispatcher(new r)}function setGlobalDispatcher(e){if(!e||typeof e.dispatch!=="function"){throw new i("Argument agent must implement Agent")}Object.defineProperty(globalThis,s,{value:e,writable:true,enumerable:false,configurable:false})}function getGlobalDispatcher(){return globalThis[s]}e.exports={setGlobalDispatcher:setGlobalDispatcher,getGlobalDispatcher:getGlobalDispatcher}},6930:e=>{"use strict";e.exports=class DecoratorHandler{constructor(e){this.handler=e}onConnect(...e){return this.handler.onConnect(...e)}onError(...e){return this.handler.onError(...e)}onUpgrade(...e){return this.handler.onUpgrade(...e)}onHeaders(...e){return this.handler.onHeaders(...e)}onData(...e){return this.handler.onData(...e)}onComplete(...e){return this.handler.onComplete(...e)}onBodySent(...e){return this.handler.onBodySent(...e)}}},2860:(e,t,n)=>{"use strict";const s=n(3983);const{kBodyUsed:i}=n(2785);const r=n(9491);const{InvalidArgumentError:o}=n(8045);const A=n(2361);const a=[300,301,302,303,307,308];const c=Symbol("body");class BodyAsyncIterable{constructor(e){this[c]=e;this[i]=false}async*[Symbol.asyncIterator](){r(!this[i],"disturbed");this[i]=true;yield*this[c]}}class RedirectHandler{constructor(e,t,n,a){if(t!=null&&(!Number.isInteger(t)||t<0)){throw new o("maxRedirections must be a positive number")}s.validateHandler(a,n.method,n.upgrade);this.dispatch=e;this.location=null;this.abort=null;this.opts={...n,maxRedirections:0};this.maxRedirections=t;this.handler=a;this.history=[];if(s.isStream(this.opts.body)){if(s.bodyLength(this.opts.body)===0){this.opts.body.on("data",(function(){r(false)}))}if(typeof this.opts.body.readableDidRead!=="boolean"){this.opts.body[i]=false;A.prototype.on.call(this.opts.body,"data",(function(){this[i]=true}))}}else if(this.opts.body&&typeof this.opts.body.pipeTo==="function"){this.opts.body=new BodyAsyncIterable(this.opts.body)}else if(this.opts.body&&typeof this.opts.body!=="string"&&!ArrayBuffer.isView(this.opts.body)&&s.isIterable(this.opts.body)){this.opts.body=new BodyAsyncIterable(this.opts.body)}}onConnect(e){this.abort=e;this.handler.onConnect(e,{history:this.history})}onUpgrade(e,t,n){this.handler.onUpgrade(e,t,n)}onError(e){this.handler.onError(e)}onHeaders(e,t,n,i){this.location=this.history.length>=this.maxRedirections||s.isDisturbed(this.opts.body)?null:parseLocation(e,t);if(this.opts.origin){this.history.push(new URL(this.opts.path,this.opts.origin))}if(!this.location){return this.handler.onHeaders(e,t,n,i)}const{origin:r,pathname:o,search:A}=s.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin)));const a=A?`${o}${A}`:o;this.opts.headers=cleanRequestHeaders(this.opts.headers,e===303,this.opts.origin!==r);this.opts.path=a;this.opts.origin=r;this.opts.maxRedirections=0;this.opts.query=null;if(e===303&&this.opts.method!=="HEAD"){this.opts.method="GET";this.opts.body=null}}onData(e){if(this.location){}else{return this.handler.onData(e)}}onComplete(e){if(this.location){this.location=null;this.abort=null;this.dispatch(this.opts,this)}else{this.handler.onComplete(e)}}onBodySent(e){if(this.handler.onBodySent){this.handler.onBodySent(e)}}}function parseLocation(e,t){if(a.indexOf(e)===-1){return null}for(let e=0;e{"use strict";const s=n(2860);function createRedirectInterceptor({maxRedirections:e}){return t=>function Intercept(n,i){const{maxRedirections:r=e}=n;if(!r){return t(n,i)}const o=new s(t,r,n,i);n={...n,maxRedirections:0};return t(n,o)}}e.exports=createRedirectInterceptor},953:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SPECIAL_HEADERS=t.HEADER_STATE=t.MINOR=t.MAJOR=t.CONNECTION_TOKEN_CHARS=t.HEADER_CHARS=t.TOKEN=t.STRICT_TOKEN=t.HEX=t.URL_CHAR=t.STRICT_URL_CHAR=t.USERINFO_CHARS=t.MARK=t.ALPHANUM=t.NUM=t.HEX_MAP=t.NUM_MAP=t.ALPHA=t.FINISH=t.H_METHOD_MAP=t.METHOD_MAP=t.METHODS_RTSP=t.METHODS_ICE=t.METHODS_HTTP=t.METHODS=t.LENIENT_FLAGS=t.FLAGS=t.TYPE=t.ERROR=void 0;const s=n(1891);var i;(function(e){e[e["OK"]=0]="OK";e[e["INTERNAL"]=1]="INTERNAL";e[e["STRICT"]=2]="STRICT";e[e["LF_EXPECTED"]=3]="LF_EXPECTED";e[e["UNEXPECTED_CONTENT_LENGTH"]=4]="UNEXPECTED_CONTENT_LENGTH";e[e["CLOSED_CONNECTION"]=5]="CLOSED_CONNECTION";e[e["INVALID_METHOD"]=6]="INVALID_METHOD";e[e["INVALID_URL"]=7]="INVALID_URL";e[e["INVALID_CONSTANT"]=8]="INVALID_CONSTANT";e[e["INVALID_VERSION"]=9]="INVALID_VERSION";e[e["INVALID_HEADER_TOKEN"]=10]="INVALID_HEADER_TOKEN";e[e["INVALID_CONTENT_LENGTH"]=11]="INVALID_CONTENT_LENGTH";e[e["INVALID_CHUNK_SIZE"]=12]="INVALID_CHUNK_SIZE";e[e["INVALID_STATUS"]=13]="INVALID_STATUS";e[e["INVALID_EOF_STATE"]=14]="INVALID_EOF_STATE";e[e["INVALID_TRANSFER_ENCODING"]=15]="INVALID_TRANSFER_ENCODING";e[e["CB_MESSAGE_BEGIN"]=16]="CB_MESSAGE_BEGIN";e[e["CB_HEADERS_COMPLETE"]=17]="CB_HEADERS_COMPLETE";e[e["CB_MESSAGE_COMPLETE"]=18]="CB_MESSAGE_COMPLETE";e[e["CB_CHUNK_HEADER"]=19]="CB_CHUNK_HEADER";e[e["CB_CHUNK_COMPLETE"]=20]="CB_CHUNK_COMPLETE";e[e["PAUSED"]=21]="PAUSED";e[e["PAUSED_UPGRADE"]=22]="PAUSED_UPGRADE";e[e["PAUSED_H2_UPGRADE"]=23]="PAUSED_H2_UPGRADE";e[e["USER"]=24]="USER"})(i=t.ERROR||(t.ERROR={}));var r;(function(e){e[e["BOTH"]=0]="BOTH";e[e["REQUEST"]=1]="REQUEST";e[e["RESPONSE"]=2]="RESPONSE"})(r=t.TYPE||(t.TYPE={}));var o;(function(e){e[e["CONNECTION_KEEP_ALIVE"]=1]="CONNECTION_KEEP_ALIVE";e[e["CONNECTION_CLOSE"]=2]="CONNECTION_CLOSE";e[e["CONNECTION_UPGRADE"]=4]="CONNECTION_UPGRADE";e[e["CHUNKED"]=8]="CHUNKED";e[e["UPGRADE"]=16]="UPGRADE";e[e["CONTENT_LENGTH"]=32]="CONTENT_LENGTH";e[e["SKIPBODY"]=64]="SKIPBODY";e[e["TRAILING"]=128]="TRAILING";e[e["TRANSFER_ENCODING"]=512]="TRANSFER_ENCODING"})(o=t.FLAGS||(t.FLAGS={}));var A;(function(e){e[e["HEADERS"]=1]="HEADERS";e[e["CHUNKED_LENGTH"]=2]="CHUNKED_LENGTH";e[e["KEEP_ALIVE"]=4]="KEEP_ALIVE"})(A=t.LENIENT_FLAGS||(t.LENIENT_FLAGS={}));var a;(function(e){e[e["DELETE"]=0]="DELETE";e[e["GET"]=1]="GET";e[e["HEAD"]=2]="HEAD";e[e["POST"]=3]="POST";e[e["PUT"]=4]="PUT";e[e["CONNECT"]=5]="CONNECT";e[e["OPTIONS"]=6]="OPTIONS";e[e["TRACE"]=7]="TRACE";e[e["COPY"]=8]="COPY";e[e["LOCK"]=9]="LOCK";e[e["MKCOL"]=10]="MKCOL";e[e["MOVE"]=11]="MOVE";e[e["PROPFIND"]=12]="PROPFIND";e[e["PROPPATCH"]=13]="PROPPATCH";e[e["SEARCH"]=14]="SEARCH";e[e["UNLOCK"]=15]="UNLOCK";e[e["BIND"]=16]="BIND";e[e["REBIND"]=17]="REBIND";e[e["UNBIND"]=18]="UNBIND";e[e["ACL"]=19]="ACL";e[e["REPORT"]=20]="REPORT";e[e["MKACTIVITY"]=21]="MKACTIVITY";e[e["CHECKOUT"]=22]="CHECKOUT";e[e["MERGE"]=23]="MERGE";e[e["M-SEARCH"]=24]="M-SEARCH";e[e["NOTIFY"]=25]="NOTIFY";e[e["SUBSCRIBE"]=26]="SUBSCRIBE";e[e["UNSUBSCRIBE"]=27]="UNSUBSCRIBE";e[e["PATCH"]=28]="PATCH";e[e["PURGE"]=29]="PURGE";e[e["MKCALENDAR"]=30]="MKCALENDAR";e[e["LINK"]=31]="LINK";e[e["UNLINK"]=32]="UNLINK";e[e["SOURCE"]=33]="SOURCE";e[e["PRI"]=34]="PRI";e[e["DESCRIBE"]=35]="DESCRIBE";e[e["ANNOUNCE"]=36]="ANNOUNCE";e[e["SETUP"]=37]="SETUP";e[e["PLAY"]=38]="PLAY";e[e["PAUSE"]=39]="PAUSE";e[e["TEARDOWN"]=40]="TEARDOWN";e[e["GET_PARAMETER"]=41]="GET_PARAMETER";e[e["SET_PARAMETER"]=42]="SET_PARAMETER";e[e["REDIRECT"]=43]="REDIRECT";e[e["RECORD"]=44]="RECORD";e[e["FLUSH"]=45]="FLUSH"})(a=t.METHODS||(t.METHODS={}));t.METHODS_HTTP=[a.DELETE,a.GET,a.HEAD,a.POST,a.PUT,a.CONNECT,a.OPTIONS,a.TRACE,a.COPY,a.LOCK,a.MKCOL,a.MOVE,a.PROPFIND,a.PROPPATCH,a.SEARCH,a.UNLOCK,a.BIND,a.REBIND,a.UNBIND,a.ACL,a.REPORT,a.MKACTIVITY,a.CHECKOUT,a.MERGE,a["M-SEARCH"],a.NOTIFY,a.SUBSCRIBE,a.UNSUBSCRIBE,a.PATCH,a.PURGE,a.MKCALENDAR,a.LINK,a.UNLINK,a.PRI,a.SOURCE];t.METHODS_ICE=[a.SOURCE];t.METHODS_RTSP=[a.OPTIONS,a.DESCRIBE,a.ANNOUNCE,a.SETUP,a.PLAY,a.PAUSE,a.TEARDOWN,a.GET_PARAMETER,a.SET_PARAMETER,a.REDIRECT,a.RECORD,a.FLUSH,a.GET,a.POST];t.METHOD_MAP=s.enumToMap(a);t.H_METHOD_MAP={};Object.keys(t.METHOD_MAP).forEach((e=>{if(/^H/.test(e)){t.H_METHOD_MAP[e]=t.METHOD_MAP[e]}}));var c;(function(e){e[e["SAFE"]=0]="SAFE";e[e["SAFE_WITH_CB"]=1]="SAFE_WITH_CB";e[e["UNSAFE"]=2]="UNSAFE"})(c=t.FINISH||(t.FINISH={}));t.ALPHA=[];for(let e="A".charCodeAt(0);e<="Z".charCodeAt(0);e++){t.ALPHA.push(String.fromCharCode(e));t.ALPHA.push(String.fromCharCode(e+32))}t.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};t.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};t.NUM=["0","1","2","3","4","5","6","7","8","9"];t.ALPHANUM=t.ALPHA.concat(t.NUM);t.MARK=["-","_",".","!","~","*","'","(",")"];t.USERINFO_CHARS=t.ALPHANUM.concat(t.MARK).concat(["%",";",":","&","=","+","$",","]);t.STRICT_URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(t.ALPHANUM);t.URL_CHAR=t.STRICT_URL_CHAR.concat(["\t","\f"]);for(let e=128;e<=255;e++){t.URL_CHAR.push(e)}t.HEX=t.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);t.STRICT_TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(t.ALPHANUM);t.TOKEN=t.STRICT_TOKEN.concat([" "]);t.HEADER_CHARS=["\t"];for(let e=32;e<=255;e++){if(e!==127){t.HEADER_CHARS.push(e)}}t.CONNECTION_TOKEN_CHARS=t.HEADER_CHARS.filter((e=>e!==44));t.MAJOR=t.NUM_MAP;t.MINOR=t.MAJOR;var u;(function(e){e[e["GENERAL"]=0]="GENERAL";e[e["CONNECTION"]=1]="CONNECTION";e[e["CONTENT_LENGTH"]=2]="CONTENT_LENGTH";e[e["TRANSFER_ENCODING"]=3]="TRANSFER_ENCODING";e[e["UPGRADE"]=4]="UPGRADE";e[e["CONNECTION_KEEP_ALIVE"]=5]="CONNECTION_KEEP_ALIVE";e[e["CONNECTION_CLOSE"]=6]="CONNECTION_CLOSE";e[e["CONNECTION_UPGRADE"]=7]="CONNECTION_UPGRADE";e[e["TRANSFER_ENCODING_CHUNKED"]=8]="TRANSFER_ENCODING_CHUNKED"})(u=t.HEADER_STATE||(t.HEADER_STATE={}));t.SPECIAL_HEADERS={connection:u.CONNECTION,"content-length":u.CONTENT_LENGTH,"proxy-connection":u.CONNECTION,"transfer-encoding":u.TRANSFER_ENCODING,upgrade:u.UPGRADE}},1145:e=>{e.exports="AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1b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ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQ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AgAAiBEEBIABBA3Z0IgBxDQBBACAEIAByNgKI0ICAACACIQAMAQsgAigCCCEACyAAIAE2AgwgAiABNgIIIAEgAjYCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQS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uY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCrLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IA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qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQ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kACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dnd4eXp7fH1+gAGCAYUBhgGHAYkBiwGMAY0BjgGPAZABkQGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHgAeEB4gHjAeQB5QHmAecB6AHpAeoB6wHsAe0B7gHvAfAB8QHyAfMBmQKkArAC/gL+AgsgASIEIAJHDfMBQd0BIRAM/wMLIAEiECACRw3dAUHDASEQDP4DCyABIgEgAkcNkAFB9wAhEAz9AwsgASIBIAJHDYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASAB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RAMvAELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKkBCyAAQdwANgIcIAAgATYCFCAAIAQ2AgxBACEQDLsBCwJAIAEtAABBUGoiEEH/AXFBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQD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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=="},1891:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.enumToMap=void 0;function enumToMap(e){const t={};Object.keys(e).forEach((n=>{const s=e[n];if(typeof s==="number"){t[n]=s}}));return t}t.enumToMap=enumToMap},6771:(e,t,n)=>{"use strict";const{kClients:s}=n(2785);const i=n(7890);const{kAgent:r,kMockAgentSet:o,kMockAgentGet:A,kDispatches:a,kIsMockActive:c,kNetConnect:u,kGetNetConnect:l,kOptions:d,kFactory:p}=n(4347);const g=n(8687);const h=n(6193);const{matchValue:f,buildMockOptions:E}=n(9323);const{InvalidArgumentError:m,UndiciError:C}=n(8045);const Q=n(412);const I=n(8891);const B=n(6823);class FakeWeakRef{constructor(e){this.value=e}deref(){return this.value}}class MockAgent extends Q{constructor(e){super(e);this[u]=true;this[c]=true;if(e&&e.agent&&typeof e.agent.dispatch!=="function"){throw new m("Argument opts.agent must implement Agent")}const t=e&&e.agent?e.agent:new i(e);this[r]=t;this[s]=t[s];this[d]=E(e)}get(e){let t=this[A](e);if(!t){t=this[p](e);this[o](e,t)}return t}dispatch(e,t){this.get(e.origin);return this[r].dispatch(e,t)}async close(){await this[r].close();this[s].clear()}deactivate(){this[c]=false}activate(){this[c]=true}enableNetConnect(e){if(typeof e==="string"||typeof e==="function"||e instanceof RegExp){if(Array.isArray(this[u])){this[u].push(e)}else{this[u]=[e]}}else if(typeof e==="undefined"){this[u]=true}else{throw new m("Unsupported matcher. Must be one of String|Function|RegExp.")}}disableNetConnect(){this[u]=false}get isMockActive(){return this[c]}[o](e,t){this[s].set(e,new FakeWeakRef(t))}[p](e){const t=Object.assign({agent:this},this[d]);return this[d]&&this[d].connections===1?new g(e,t):new h(e,t)}[A](e){const t=this[s].get(e);if(t){return t.deref()}if(typeof e!=="string"){const t=this[p]("http://localhost:9999");this[o](e,t);return t}for(const[t,n]of Array.from(this[s])){const s=n.deref();if(s&&typeof t!=="string"&&f(t,e)){const t=this[p](e);this[o](e,t);t[a]=s[a];return t}}}[l](){return this[u]}pendingInterceptors(){const e=this[s];return Array.from(e.entries()).flatMap((([e,t])=>t.deref()[a].map((t=>({...t,origin:e}))))).filter((({pending:e})=>e))}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new B}={}){const t=this.pendingInterceptors();if(t.length===0){return}const n=new I("interceptor","interceptors").pluralize(t.length);throw new C(`\n${n.count} ${n.noun} ${n.is} pending:\n\n${e.format(t)}\n`.trim())}}e.exports=MockAgent},8687:(e,t,n)=>{"use strict";const{promisify:s}=n(3837);const i=n(3598);const{buildMockDispatch:r}=n(9323);const{kDispatches:o,kMockAgent:A,kClose:a,kOriginalClose:c,kOrigin:u,kOriginalDispatch:l,kConnected:d}=n(4347);const{MockInterceptor:p}=n(410);const g=n(2785);const{InvalidArgumentError:h}=n(8045);class MockClient extends i{constructor(e,t){super(e,t);if(!t||!t.agent||typeof t.agent.dispatch!=="function"){throw new h("Argument opts.agent must implement Agent")}this[A]=t.agent;this[u]=e;this[o]=[];this[d]=1;this[l]=this.dispatch;this[c]=this.close.bind(this);this.dispatch=r.call(this);this.close=this[a]}get[g.kConnected](){return this[d]}intercept(e){return new p(e,this[o])}async[a](){await s(this[c])();this[d]=0;this[A][g.kClients].delete(this[u])}}e.exports=MockClient},888:(e,t,n)=>{"use strict";const{UndiciError:s}=n(8045);class MockNotMatchedError extends s{constructor(e){super(e);Error.captureStackTrace(this,MockNotMatchedError);this.name="MockNotMatchedError";this.message=e||"The request does not match any registered mock dispatches";this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}}e.exports={MockNotMatchedError:MockNotMatchedError}},410:(e,t,n)=>{"use strict";const{getResponseData:s,buildKey:i,addMockDispatch:r}=n(9323);const{kDispatches:o,kDispatchKey:A,kDefaultHeaders:a,kDefaultTrailers:c,kContentLength:u,kMockDispatch:l}=n(4347);const{InvalidArgumentError:d}=n(8045);const{buildURL:p}=n(3983);class MockScope{constructor(e){this[l]=e}delay(e){if(typeof e!=="number"||!Number.isInteger(e)||e<=0){throw new d("waitInMs must be a valid integer > 0")}this[l].delay=e;return this}persist(){this[l].persist=true;return this}times(e){if(typeof e!=="number"||!Number.isInteger(e)||e<=0){throw new d("repeatTimes must be a valid integer > 0")}this[l].times=e;return this}}class MockInterceptor{constructor(e,t){if(typeof e!=="object"){throw new d("opts must be an object")}if(typeof e.path==="undefined"){throw new d("opts.path must be defined")}if(typeof e.method==="undefined"){e.method="GET"}if(typeof e.path==="string"){if(e.query){e.path=p(e.path,e.query)}else{const t=new URL(e.path,"data://");e.path=t.pathname+t.search}}if(typeof e.method==="string"){e.method=e.method.toUpperCase()}this[A]=i(e);this[o]=t;this[a]={};this[c]={};this[u]=false}createMockScopeDispatchData(e,t,n={}){const i=s(t);const r=this[u]?{"content-length":i.length}:{};const o={...this[a],...r,...n.headers};const A={...this[c],...n.trailers};return{statusCode:e,data:t,headers:o,trailers:A}}validateReplyParameters(e,t,n){if(typeof e==="undefined"){throw new d("statusCode must be defined")}if(typeof t==="undefined"){throw new d("data must be defined")}if(typeof n!=="object"){throw new d("responseOptions must be an object")}}reply(e){if(typeof e==="function"){const wrappedDefaultsCallback=t=>{const n=e(t);if(typeof n!=="object"){throw new d("reply options callback must return an object")}const{statusCode:s,data:i="",responseOptions:r={}}=n;this.validateReplyParameters(s,i,r);return{...this.createMockScopeDispatchData(s,i,r)}};const t=r(this[o],this[A],wrappedDefaultsCallback);return new MockScope(t)}const[t,n="",s={}]=[...arguments];this.validateReplyParameters(t,n,s);const i=this.createMockScopeDispatchData(t,n,s);const a=r(this[o],this[A],i);return new MockScope(a)}replyWithError(e){if(typeof e==="undefined"){throw new d("error must be defined")}const t=r(this[o],this[A],{error:e});return new MockScope(t)}defaultReplyHeaders(e){if(typeof e==="undefined"){throw new d("headers must be defined")}this[a]=e;return this}defaultReplyTrailers(e){if(typeof e==="undefined"){throw new d("trailers must be defined")}this[c]=e;return this}replyContentLength(){this[u]=true;return this}}e.exports.MockInterceptor=MockInterceptor;e.exports.MockScope=MockScope},6193:(e,t,n)=>{"use strict";const{promisify:s}=n(3837);const i=n(4634);const{buildMockDispatch:r}=n(9323);const{kDispatches:o,kMockAgent:A,kClose:a,kOriginalClose:c,kOrigin:u,kOriginalDispatch:l,kConnected:d}=n(4347);const{MockInterceptor:p}=n(410);const g=n(2785);const{InvalidArgumentError:h}=n(8045);class MockPool extends i{constructor(e,t){super(e,t);if(!t||!t.agent||typeof t.agent.dispatch!=="function"){throw new h("Argument opts.agent must implement Agent")}this[A]=t.agent;this[u]=e;this[o]=[];this[d]=1;this[l]=this.dispatch;this[c]=this.close.bind(this);this.dispatch=r.call(this);this.close=this[a]}get[g.kConnected](){return this[d]}intercept(e){return new p(e,this[o])}async[a](){await s(this[c])();this[d]=0;this[A][g.kClients].delete(this[u])}}e.exports=MockPool},4347:e=>{"use strict";e.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")}},9323:(e,t,n)=>{"use strict";const{MockNotMatchedError:s}=n(888);const{kDispatches:i,kMockAgent:r,kOriginalDispatch:o,kOrigin:A,kGetNetConnect:a}=n(4347);const{buildURL:c,nop:u}=n(3983);const{STATUS_CODES:l}=n(3685);const{types:{isPromise:d}}=n(3837);function matchValue(e,t){if(typeof e==="string"){return e===t}if(e instanceof RegExp){return e.test(t)}if(typeof e==="function"){return e(t)===true}return false}function lowerCaseEntries(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e.toLocaleLowerCase(),t])))}function getHeaderByName(e,t){if(Array.isArray(e)){for(let n=0;n!e)).filter((({path:e})=>matchValue(safeUrl(e),i)));if(r.length===0){throw new s(`Mock dispatch not matched for path '${i}'`)}r=r.filter((({method:e})=>matchValue(e,t.method)));if(r.length===0){throw new s(`Mock dispatch not matched for method '${t.method}'`)}r=r.filter((({body:e})=>typeof e!=="undefined"?matchValue(e,t.body):true));if(r.length===0){throw new s(`Mock dispatch not matched for body '${t.body}'`)}r=r.filter((e=>matchHeaders(e,t.headers)));if(r.length===0){throw new s(`Mock dispatch not matched for headers '${typeof t.headers==="object"?JSON.stringify(t.headers):t.headers}'`)}return r[0]}function addMockDispatch(e,t,n){const s={timesInvoked:0,times:1,persist:false,consumed:false};const i=typeof n==="function"?{callback:n}:{...n};const r={...s,...t,pending:true,data:{error:null,...i}};e.push(r);return r}function deleteMockDispatch(e,t){const n=e.findIndex((e=>{if(!e.consumed){return false}return matchKey(e,t)}));if(n!==-1){e.splice(n,1)}}function buildKey(e){const{path:t,method:n,body:s,headers:i,query:r}=e;return{path:t,method:n,body:s,headers:i,query:r}}function generateKeyValues(e){return Object.entries(e).reduce(((e,[t,n])=>[...e,Buffer.from(`${t}`),Array.isArray(n)?n.map((e=>Buffer.from(`${e}`))):Buffer.from(`${n}`)]),[])}function getStatusText(e){return l[e]||"unknown"}async function getResponse(e){const t=[];for await(const n of e){t.push(n)}return Buffer.concat(t).toString("utf8")}function mockDispatch(e,t){const n=buildKey(e);const s=getMockDispatch(this[i],n);s.timesInvoked++;if(s.data.callback){s.data={...s.data,...s.data.callback(e)}}const{data:{statusCode:r,data:o,headers:A,trailers:a,error:c},delay:l,persist:p}=s;const{timesInvoked:g,times:h}=s;s.consumed=!p&&g>=h;s.pending=g0){setTimeout((()=>{handleReply(this[i])}),l)}else{handleReply(this[i])}function handleReply(s,i=o){const c=Array.isArray(e.headers)?buildHeadersFromArray(e.headers):e.headers;const l=typeof i==="function"?i({...e,headers:c}):i;if(d(l)){l.then((e=>handleReply(s,e)));return}const p=getResponseData(l);const g=generateKeyValues(A);const h=generateKeyValues(a);t.abort=u;t.onHeaders(r,g,resume,getStatusText(r));t.onData(Buffer.from(p));t.onComplete(h);deleteMockDispatch(s,n)}function resume(){}return true}function buildMockDispatch(){const e=this[r];const t=this[A];const n=this[o];return function dispatch(i,r){if(e.isMockActive){try{mockDispatch.call(this,i,r)}catch(o){if(o instanceof s){const A=e[a]();if(A===false){throw new s(`${o.message}: subsequent request to origin ${t} was not allowed (net.connect disabled)`)}if(checkNetConnect(A,t)){n.call(this,i,r)}else{throw new s(`${o.message}: subsequent request to origin ${t} was not allowed (net.connect is not enabled for this origin)`)}}else{throw o}}}else{n.call(this,i,r)}}}function checkNetConnect(e,t){const n=new URL(t);if(e===true){return true}else if(Array.isArray(e)&&e.some((e=>matchValue(e,n.host)))){return true}return false}function buildMockOptions(e){if(e){const{agent:t,...n}=e;return n}}e.exports={getResponseData:getResponseData,getMockDispatch:getMockDispatch,addMockDispatch:addMockDispatch,deleteMockDispatch:deleteMockDispatch,buildKey:buildKey,generateKeyValues:generateKeyValues,matchValue:matchValue,getResponse:getResponse,getStatusText:getStatusText,mockDispatch:mockDispatch,buildMockDispatch:buildMockDispatch,checkNetConnect:checkNetConnect,buildMockOptions:buildMockOptions,getHeaderByName:getHeaderByName}},6823:(e,t,n)=>{"use strict";const{Transform:s}=n(2781);const{Console:i}=n(6206);e.exports=class PendingInterceptorsFormatter{constructor({disableColors:e}={}){this.transform=new s({transform(e,t,n){n(null,e)}});this.logger=new i({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){const t=e.map((({method:e,path:t,data:{statusCode:n},persist:s,times:i,timesInvoked:r,origin:o})=>({Method:e,Origin:o,Path:t,"Status code":n,Persistent:s?"✅":"❌",Invocations:r,Remaining:s?Infinity:i-r})));this.logger.table(t);return this.transform.read().toString()}}},8891:e=>{"use strict";const t={pronoun:"it",is:"is",was:"was",this:"this"};const n={pronoun:"they",is:"are",was:"were",this:"these"};e.exports=class Pluralizer{constructor(e,t){this.singular=e;this.plural=t}pluralize(e){const s=e===1;const i=s?t:n;const r=s?this.singular:this.plural;return{...i,count:e,noun:r}}}},8266:e=>{"use strict";const t=2048;const n=t-1;class FixedCircularBuffer{constructor(){this.bottom=0;this.top=0;this.list=new Array(t);this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&n)===this.bottom}push(e){this.list[this.top]=e;this.top=this.top+1&n}shift(){const e=this.list[this.bottom];if(e===undefined)return null;this.list[this.bottom]=undefined;this.bottom=this.bottom+1&n;return e}}e.exports=class FixedQueue{constructor(){this.head=this.tail=new FixedCircularBuffer}isEmpty(){return this.head.isEmpty()}push(e){if(this.head.isFull()){this.head=this.head.next=new FixedCircularBuffer}this.head.push(e)}shift(){const e=this.tail;const t=e.shift();if(e.isEmpty()&&e.next!==null){this.tail=e.next}return t}}},3198:(e,t,n)=>{"use strict";const s=n(4839);const i=n(8266);const{kConnected:r,kSize:o,kRunning:A,kPending:a,kQueued:c,kBusy:u,kFree:l,kUrl:d,kClose:p,kDestroy:g,kDispatch:h}=n(2785);const f=n(9689);const E=Symbol("clients");const m=Symbol("needDrain");const C=Symbol("queue");const Q=Symbol("closed resolve");const I=Symbol("onDrain");const B=Symbol("onConnect");const y=Symbol("onDisconnect");const b=Symbol("onConnectionError");const w=Symbol("get dispatcher");const R=Symbol("add client");const v=Symbol("remove client");const k=Symbol("stats");class PoolBase extends s{constructor(){super();this[C]=new i;this[E]=[];this[c]=0;const e=this;this[I]=function onDrain(t,n){const s=e[C];let i=false;while(!i){const t=s.shift();if(!t){break}e[c]--;i=!this.dispatch(t.opts,t.handler)}this[m]=i;if(!this[m]&&e[m]){e[m]=false;e.emit("drain",t,[e,...n])}if(e[Q]&&s.isEmpty()){Promise.all(e[E].map((e=>e.close()))).then(e[Q])}};this[B]=(t,n)=>{e.emit("connect",t,[e,...n])};this[y]=(t,n,s)=>{e.emit("disconnect",t,[e,...n],s)};this[b]=(t,n,s)=>{e.emit("connectionError",t,[e,...n],s)};this[k]=new f(this)}get[u](){return this[m]}get[r](){return this[E].filter((e=>e[r])).length}get[l](){return this[E].filter((e=>e[r]&&!e[m])).length}get[a](){let e=this[c];for(const{[a]:t}of this[E]){e+=t}return e}get[A](){let e=0;for(const{[A]:t}of this[E]){e+=t}return e}get[o](){let e=this[c];for(const{[o]:t}of this[E]){e+=t}return e}get stats(){return this[k]}async[p](){if(this[C].isEmpty()){return Promise.all(this[E].map((e=>e.close())))}else{return new Promise((e=>{this[Q]=e}))}}async[g](e){while(true){const t=this[C].shift();if(!t){break}t.handler.onError(e)}return Promise.all(this[E].map((t=>t.destroy(e))))}[h](e,t){const n=this[w]();if(!n){this[m]=true;this[C].push({opts:e,handler:t});this[c]++}else if(!n.dispatch(e,t)){n[m]=true;this[m]=!this[w]()}return!this[m]}[R](e){e.on("drain",this[I]).on("connect",this[B]).on("disconnect",this[y]).on("connectionError",this[b]);this[E].push(e);if(this[m]){process.nextTick((()=>{if(this[m]){this[I](e[d],[this,e])}}))}return this}[v](e){e.close((()=>{const t=this[E].indexOf(e);if(t!==-1){this[E].splice(t,1)}}));this[m]=this[E].some((e=>!e[m]&&e.closed!==true&&e.destroyed!==true))}}e.exports={PoolBase:PoolBase,kClients:E,kNeedDrain:m,kAddClient:R,kRemoveClient:v,kGetDispatcher:w}},9689:(e,t,n)=>{const{kFree:s,kConnected:i,kPending:r,kQueued:o,kRunning:A,kSize:a}=n(2785);const c=Symbol("pool");class PoolStats{constructor(e){this[c]=e}get connected(){return this[c][i]}get free(){return this[c][s]}get pending(){return this[c][r]}get queued(){return this[c][o]}get running(){return this[c][A]}get size(){return this[c][a]}}e.exports=PoolStats},4634:(e,t,n)=>{"use strict";const{PoolBase:s,kClients:i,kNeedDrain:r,kAddClient:o,kGetDispatcher:A}=n(3198);const a=n(3598);const{InvalidArgumentError:c}=n(8045);const u=n(3983);const{kUrl:l,kInterceptors:d}=n(2785);const p=n(2067);const g=Symbol("options");const h=Symbol("connections");const f=Symbol("factory");function defaultFactory(e,t){return new a(e,t)}class Pool extends s{constructor(e,{connections:t,factory:n=defaultFactory,connect:s,connectTimeout:i,tls:r,maxCachedSessions:o,socketPath:A,autoSelectFamily:a,autoSelectFamilyAttemptTimeout:E,allowH2:m,...C}={}){super();if(t!=null&&(!Number.isFinite(t)||t<0)){throw new c("invalid connections")}if(typeof n!=="function"){throw new c("factory must be a function.")}if(s!=null&&typeof s!=="function"&&typeof s!=="object"){throw new c("connect must be a function or an object")}if(typeof s!=="function"){s=p({...r,maxCachedSessions:o,allowH2:m,socketPath:A,timeout:i==null?1e4:i,...u.nodeHasAutoSelectFamily&&a?{autoSelectFamily:a,autoSelectFamilyAttemptTimeout:E}:undefined,...s})}this[d]=C.interceptors&&C.interceptors.Pool&&Array.isArray(C.interceptors.Pool)?C.interceptors.Pool:[];this[h]=t||null;this[l]=u.parseOrigin(e);this[g]={...u.deepClone(C),connect:s,allowH2:m};this[g].interceptors=C.interceptors?{...C.interceptors}:undefined;this[f]=n}[A](){let e=this[i].find((e=>!e[r]));if(e){return e}if(!this[h]||this[i].length{"use strict";const{kProxy:s,kClose:i,kDestroy:r,kInterceptors:o}=n(2785);const{URL:A}=n(7310);const a=n(7890);const c=n(4634);const u=n(4839);const{InvalidArgumentError:l,RequestAbortedError:d}=n(8045);const p=n(2067);const g=Symbol("proxy agent");const h=Symbol("proxy client");const f=Symbol("proxy headers");const E=Symbol("request tls settings");const m=Symbol("proxy tls settings");const C=Symbol("connect endpoint function");function defaultProtocolPort(e){return e==="https:"?443:80}function buildProxyOptions(e){if(typeof e==="string"){e={uri:e}}if(!e||!e.uri){throw new l("Proxy opts.uri is mandatory")}return{uri:e.uri,protocol:e.protocol||"https"}}function defaultFactory(e,t){return new c(e,t)}class ProxyAgent extends u{constructor(e){super(e);this[s]=buildProxyOptions(e);this[g]=new a(e);this[o]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[];if(typeof e==="string"){e={uri:e}}if(!e||!e.uri){throw new l("Proxy opts.uri is mandatory")}const{clientFactory:t=defaultFactory}=e;if(typeof t!=="function"){throw new l("Proxy opts.clientFactory must be a function.")}this[E]=e.requestTls;this[m]=e.proxyTls;this[f]=e.headers||{};if(e.auth&&e.token){throw new l("opts.auth cannot be used in combination with opts.token")}else if(e.auth){this[f]["proxy-authorization"]=`Basic ${e.auth}`}else if(e.token){this[f]["proxy-authorization"]=e.token}const n=new A(e.uri);const{origin:i,port:r,host:c}=n;const u=p({...e.proxyTls});this[C]=p({...e.requestTls});this[h]=t(n,{connect:u});this[g]=new a({...e,connect:async(e,t)=>{let n=e.host;if(!e.port){n+=`:${defaultProtocolPort(e.protocol)}`}try{const{socket:s,statusCode:o}=await this[h].connect({origin:i,port:r,path:n,signal:e.signal,headers:{...this[f],host:c}});if(o!==200){s.on("error",(()=>{})).destroy();t(new d("Proxy response !== 200 when HTTP Tunneling"))}if(e.protocol!=="https:"){t(null,s);return}let A;if(this[E]){A=this[E].servername}else{A=e.servername}this[C]({...e,servername:A,httpSocket:s},t)}catch(e){t(e)}}})}dispatch(e,t){const{host:n}=new A(e.origin);const s=buildHeaders(e.headers);throwIfProxyAuthIsSent(s);return this[g].dispatch({...e,headers:{...s,host:n}},t)}async[i](){await this[g].close();await this[h].close()}async[r](){await this[g].destroy();await this[h].destroy()}}function buildHeaders(e){if(Array.isArray(e)){const t={};for(let n=0;ne.toLowerCase()==="proxy-authorization"));if(t){throw new l("Proxy-Authorization should be sent in ProxyAgent constructor")}}e.exports=ProxyAgent},9459:e=>{"use strict";let t=Date.now();let n;const s=[];function onTimeout(){t=Date.now();let e=s.length;let n=0;while(n0&&t>=i.state){i.state=-1;i.callback(i.opaque)}if(i.state===-1){i.state=-2;if(n!==e-1){s[n]=s.pop()}else{s.pop()}e-=1}else{n+=1}}if(s.length>0){refreshTimeout()}}function refreshTimeout(){if(n&&n.refresh){n.refresh()}else{clearTimeout(n);n=setTimeout(onTimeout,1e3);if(n.unref){n.unref()}}}class Timeout{constructor(e,t,n){this.callback=e;this.delay=t;this.opaque=n;this.state=-2;this.refresh()}refresh(){if(this.state===-2){s.push(this);if(!n||s.length===1){refreshTimeout()}}this.state=0}clear(){this.state=-1}}e.exports={setTimeout(e,t,n){return t<1e3?setTimeout(e,t,n):new Timeout(e,t,n)},clearTimeout(e){if(e instanceof Timeout){e.clear()}else{clearTimeout(e)}}}},5354:(e,t,n)=>{"use strict";const s=n(7643);const{uid:i,states:r}=n(9188);const{kReadyState:o,kSentClose:A,kByteParser:a,kReceivedClose:c}=n(7578);const{fireEvent:u,failWebsocketConnection:l}=n(5515);const{CloseEvent:d}=n(2611);const{makeRequest:p}=n(8359);const{fetching:g}=n(4881);const{Headers:h}=n(554);const{getGlobalDispatcher:f}=n(1892);const{kHeadersList:E}=n(2785);const m={};m.open=s.channel("undici:websocket:open");m.close=s.channel("undici:websocket:close");m.socketError=s.channel("undici:websocket:socket_error");let C;try{C=n(6113)}catch{}function establishWebSocketConnection(e,t,n,s,r){const o=e;o.protocol=e.protocol==="ws:"?"http:":"https:";const A=p({urlList:[o],serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(r.headers){const e=new h(r.headers)[E];A.headersList=e}const a=C.randomBytes(16).toString("base64");A.headersList.append("sec-websocket-key",a);A.headersList.append("sec-websocket-version","13");for(const e of t){A.headersList.append("sec-websocket-protocol",e)}const c="";const u=g({request:A,useParallelQueue:true,dispatcher:r.dispatcher??f(),processResponse(e){if(e.type==="error"||e.status!==101){l(n,"Received network error or non-101 status code.");return}if(t.length!==0&&!e.headersList.get("Sec-WebSocket-Protocol")){l(n,"Server did not respond with sent protocols.");return}if(e.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){l(n,'Server did not set Upgrade header to "websocket".');return}if(e.headersList.get("Connection")?.toLowerCase()!=="upgrade"){l(n,'Server did not set Connection header to "upgrade".');return}const r=e.headersList.get("Sec-WebSocket-Accept");const o=C.createHash("sha1").update(a+i).digest("base64");if(r!==o){l(n,"Incorrect hash received in Sec-WebSocket-Accept header.");return}const u=e.headersList.get("Sec-WebSocket-Extensions");if(u!==null&&u!==c){l(n,"Received different permessage-deflate than the one set.");return}const d=e.headersList.get("Sec-WebSocket-Protocol");if(d!==null&&d!==A.headersList.get("Sec-WebSocket-Protocol")){l(n,"Protocol was not set in the opening handshake.");return}e.socket.on("data",onSocketData);e.socket.on("close",onSocketClose);e.socket.on("error",onSocketError);if(m.open.hasSubscribers){m.open.publish({address:e.socket.address(),protocol:d,extensions:u})}s(e)}});return u}function onSocketData(e){if(!this.ws[a].write(e)){this.pause()}}function onSocketClose(){const{ws:e}=this;const t=e[A]&&e[c];let n=1005;let s="";const i=e[a].closingInfo;if(i){n=i.code??1005;s=i.reason}else if(!e[A]){n=1006}e[o]=r.CLOSED;u("close",e,d,{wasClean:t,code:n,reason:s});if(m.close.hasSubscribers){m.close.publish({websocket:e,code:n,reason:s})}}function onSocketError(e){const{ws:t}=this;t[o]=r.CLOSING;if(m.socketError.hasSubscribers){m.socketError.publish(e)}this.destroy()}e.exports={establishWebSocketConnection:establishWebSocketConnection}},9188:e=>{"use strict";const t="258EAFA5-E914-47DA-95CA-C5AB0DC85B11";const n={enumerable:true,writable:false,configurable:false};const s={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3};const i={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10};const r=2**16-1;const o={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4};const A=Buffer.allocUnsafe(0);e.exports={uid:t,staticPropertyDescriptors:n,states:s,opcodes:i,maxUnsigned16Bit:r,parserStates:o,emptyBuffer:A}},2611:(e,t,n)=>{"use strict";const{webidl:s}=n(1744);const{kEnumerableProperty:i}=n(3983);const{MessagePort:r}=n(1267);class MessageEvent extends Event{#r;constructor(e,t={}){s.argumentLengthCheck(arguments,1,{header:"MessageEvent constructor"});e=s.converters.DOMString(e);t=s.converters.MessageEventInit(t);super(e,t);this.#r=t}get data(){s.brandCheck(this,MessageEvent);return this.#r.data}get origin(){s.brandCheck(this,MessageEvent);return this.#r.origin}get lastEventId(){s.brandCheck(this,MessageEvent);return this.#r.lastEventId}get source(){s.brandCheck(this,MessageEvent);return this.#r.source}get ports(){s.brandCheck(this,MessageEvent);if(!Object.isFrozen(this.#r.ports)){Object.freeze(this.#r.ports)}return this.#r.ports}initMessageEvent(e,t=false,n=false,i=null,r="",o="",A=null,a=[]){s.brandCheck(this,MessageEvent);s.argumentLengthCheck(arguments,1,{header:"MessageEvent.initMessageEvent"});return new MessageEvent(e,{bubbles:t,cancelable:n,data:i,origin:r,lastEventId:o,source:A,ports:a})}}class CloseEvent extends Event{#r;constructor(e,t={}){s.argumentLengthCheck(arguments,1,{header:"CloseEvent constructor"});e=s.converters.DOMString(e);t=s.converters.CloseEventInit(t);super(e,t);this.#r=t}get wasClean(){s.brandCheck(this,CloseEvent);return this.#r.wasClean}get code(){s.brandCheck(this,CloseEvent);return this.#r.code}get reason(){s.brandCheck(this,CloseEvent);return this.#r.reason}}class ErrorEvent extends Event{#r;constructor(e,t){s.argumentLengthCheck(arguments,1,{header:"ErrorEvent constructor"});super(e,t);e=s.converters.DOMString(e);t=s.converters.ErrorEventInit(t??{});this.#r=t}get message(){s.brandCheck(this,ErrorEvent);return this.#r.message}get filename(){s.brandCheck(this,ErrorEvent);return this.#r.filename}get lineno(){s.brandCheck(this,ErrorEvent);return this.#r.lineno}get colno(){s.brandCheck(this,ErrorEvent);return this.#r.colno}get error(){s.brandCheck(this,ErrorEvent);return this.#r.error}}Object.defineProperties(MessageEvent.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:true},data:i,origin:i,lastEventId:i,source:i,ports:i,initMessageEvent:i});Object.defineProperties(CloseEvent.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:true},reason:i,code:i,wasClean:i});Object.defineProperties(ErrorEvent.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:true},message:i,filename:i,lineno:i,colno:i,error:i});s.converters.MessagePort=s.interfaceConverter(r);s.converters["sequence"]=s.sequenceConverter(s.converters.MessagePort);const o=[{key:"bubbles",converter:s.converters.boolean,defaultValue:false},{key:"cancelable",converter:s.converters.boolean,defaultValue:false},{key:"composed",converter:s.converters.boolean,defaultValue:false}];s.converters.MessageEventInit=s.dictionaryConverter([...o,{key:"data",converter:s.converters.any,defaultValue:null},{key:"origin",converter:s.converters.USVString,defaultValue:""},{key:"lastEventId",converter:s.converters.DOMString,defaultValue:""},{key:"source",converter:s.nullableConverter(s.converters.MessagePort),defaultValue:null},{key:"ports",converter:s.converters["sequence"],get defaultValue(){return[]}}]);s.converters.CloseEventInit=s.dictionaryConverter([...o,{key:"wasClean",converter:s.converters.boolean,defaultValue:false},{key:"code",converter:s.converters["unsigned short"],defaultValue:0},{key:"reason",converter:s.converters.USVString,defaultValue:""}]);s.converters.ErrorEventInit=s.dictionaryConverter([...o,{key:"message",converter:s.converters.DOMString,defaultValue:""},{key:"filename",converter:s.converters.USVString,defaultValue:""},{key:"lineno",converter:s.converters["unsigned long"],defaultValue:0},{key:"colno",converter:s.converters["unsigned long"],defaultValue:0},{key:"error",converter:s.converters.any}]);e.exports={MessageEvent:MessageEvent,CloseEvent:CloseEvent,ErrorEvent:ErrorEvent}},5444:(e,t,n)=>{"use strict";const{maxUnsigned16Bit:s}=n(9188);let i;try{i=n(6113)}catch{}class WebsocketFrameSend{constructor(e){this.frameData=e;this.maskKey=i.randomBytes(4)}createFrame(e){const t=this.frameData?.byteLength??0;let n=t;let i=6;if(t>s){i+=8;n=127}else if(t>125){i+=2;n=126}const r=Buffer.allocUnsafe(t+i);r[0]=r[1]=0;r[0]|=128;r[0]=(r[0]&240)+e; +/*! ws. MIT License. Einar Otto Stangvik */r[i-4]=this.maskKey[0];r[i-3]=this.maskKey[1];r[i-2]=this.maskKey[2];r[i-1]=this.maskKey[3];r[1]=n;if(n===126){r.writeUInt16BE(t,2)}else if(n===127){r[2]=r[3]=0;r.writeUIntBE(t,4,6)}r[1]|=128;for(let e=0;e{"use strict";const{Writable:s}=n(2781);const i=n(7643);const{parserStates:r,opcodes:o,states:A,emptyBuffer:a}=n(9188);const{kReadyState:c,kSentClose:u,kResponse:l,kReceivedClose:d}=n(7578);const{isValidStatusCode:p,failWebsocketConnection:g,websocketMessageReceived:h}=n(5515);const{WebsocketFrameSend:f}=n(5444);const E={};E.ping=i.channel("undici:websocket:ping");E.pong=i.channel("undici:websocket:pong");class ByteParser extends s{#o=[];#A=0;#a=r.INFO;#c={};#u=[];constructor(e){super();this.ws=e}_write(e,t,n){this.#o.push(e);this.#A+=e.length;this.run(n)}run(e){while(true){if(this.#a===r.INFO){if(this.#A<2){return e()}const t=this.consume(2);this.#c.fin=(t[0]&128)!==0;this.#c.opcode=t[0]&15;this.#c.originalOpcode??=this.#c.opcode;this.#c.fragmented=!this.#c.fin&&this.#c.opcode!==o.CONTINUATION;if(this.#c.fragmented&&this.#c.opcode!==o.BINARY&&this.#c.opcode!==o.TEXT){g(this.ws,"Invalid frame type was fragmented.");return}const n=t[1]&127;if(n<=125){this.#c.payloadLength=n;this.#a=r.READ_DATA}else if(n===126){this.#a=r.PAYLOADLENGTH_16}else if(n===127){this.#a=r.PAYLOADLENGTH_64}if(this.#c.fragmented&&n>125){g(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#c.opcode===o.PING||this.#c.opcode===o.PONG||this.#c.opcode===o.CLOSE)&&n>125){g(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#c.opcode===o.CLOSE){if(n===1){g(this.ws,"Received close frame with a 1-byte body.");return}const e=this.consume(n);this.#c.closeInfo=this.parseCloseBody(false,e);if(!this.ws[u]){const e=Buffer.allocUnsafe(2);e.writeUInt16BE(this.#c.closeInfo.code,0);const t=new f(e);this.ws[l].socket.write(t.createFrame(o.CLOSE),(e=>{if(!e){this.ws[u]=true}}))}this.ws[c]=A.CLOSING;this.ws[d]=true;this.end();return}else if(this.#c.opcode===o.PING){const t=this.consume(n);if(!this.ws[d]){const e=new f(t);this.ws[l].socket.write(e.createFrame(o.PONG));if(E.ping.hasSubscribers){E.ping.publish({payload:t})}}this.#a=r.INFO;if(this.#A>0){continue}else{e();return}}else if(this.#c.opcode===o.PONG){const t=this.consume(n);if(E.pong.hasSubscribers){E.pong.publish({payload:t})}if(this.#A>0){continue}else{e();return}}}else if(this.#a===r.PAYLOADLENGTH_16){if(this.#A<2){return e()}const t=this.consume(2);this.#c.payloadLength=t.readUInt16BE(0);this.#a=r.READ_DATA}else if(this.#a===r.PAYLOADLENGTH_64){if(this.#A<8){return e()}const t=this.consume(8);const n=t.readUInt32BE(0);if(n>2**31-1){g(this.ws,"Received payload length > 2^31 bytes.");return}const s=t.readUInt32BE(4);this.#c.payloadLength=(n<<8)+s;this.#a=r.READ_DATA}else if(this.#a===r.READ_DATA){if(this.#A=this.#c.payloadLength){const e=this.consume(this.#c.payloadLength);this.#u.push(e);if(!this.#c.fragmented||this.#c.fin&&this.#c.opcode===o.CONTINUATION){const e=Buffer.concat(this.#u);h(this.ws,this.#c.originalOpcode,e);this.#c={};this.#u.length=0}this.#a=r.INFO}}if(this.#A>0){continue}else{e();break}}}consume(e){if(e>this.#A){return null}else if(e===0){return a}if(this.#o[0].length===e){this.#A-=this.#o[0].length;return this.#o.shift()}const t=Buffer.allocUnsafe(e);let n=0;while(n!==e){const s=this.#o[0];const{length:i}=s;if(i+n===e){t.set(this.#o.shift(),n);break}else if(i+n>e){t.set(s.subarray(0,e-n),n);this.#o[0]=s.subarray(e-n);break}else{t.set(this.#o.shift(),n);n+=s.length}}this.#A-=e;return t}parseCloseBody(e,t){let n;if(t.length>=2){n=t.readUInt16BE(0)}if(e){if(!p(n)){return null}return{code:n}}let s=t.subarray(2);if(s[0]===239&&s[1]===187&&s[2]===191){s=s.subarray(3)}if(n!==undefined&&!p(n)){return null}try{s=new TextDecoder("utf-8",{fatal:true}).decode(s)}catch{return null}return{code:n,reason:s}}get closingInfo(){return this.#c.closeInfo}}e.exports={ByteParser:ByteParser}},7578:e=>{"use strict";e.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")}},5515:(e,t,n)=>{"use strict";const{kReadyState:s,kController:i,kResponse:r,kBinaryType:o,kWebSocketURL:A}=n(7578);const{states:a,opcodes:c}=n(9188);const{MessageEvent:u,ErrorEvent:l}=n(2611);function isEstablished(e){return e[s]===a.OPEN}function isClosing(e){return e[s]===a.CLOSING}function isClosed(e){return e[s]===a.CLOSED}function fireEvent(e,t,n=Event,s){const i=new n(e,s);t.dispatchEvent(i)}function websocketMessageReceived(e,t,n){if(e[s]!==a.OPEN){return}let i;if(t===c.TEXT){try{i=new TextDecoder("utf-8",{fatal:true}).decode(n)}catch{failWebsocketConnection(e,"Received invalid UTF-8 in text frame.");return}}else if(t===c.BINARY){if(e[o]==="blob"){i=new Blob([n])}else{i=new Uint8Array(n).buffer}}fireEvent("message",e,u,{origin:e[A].origin,data:i})}function isValidSubprotocol(e){if(e.length===0){return false}for(const t of e){const e=t.charCodeAt(0);if(e<33||e>126||t==="("||t===")"||t==="<"||t===">"||t==="@"||t===","||t===";"||t===":"||t==="\\"||t==='"'||t==="/"||t==="["||t==="]"||t==="?"||t==="="||t==="{"||t==="}"||e===32||e===9){return false}}return true}function isValidStatusCode(e){if(e>=1e3&&e<1015){return e!==1004&&e!==1005&&e!==1006}return e>=3e3&&e<=4999}function failWebsocketConnection(e,t){const{[i]:n,[r]:s}=e;n.abort();if(s?.socket&&!s.socket.destroyed){s.socket.destroy()}if(t){fireEvent("error",e,l,{error:new Error(t)})}}e.exports={isEstablished:isEstablished,isClosing:isClosing,isClosed:isClosed,fireEvent:fireEvent,isValidSubprotocol:isValidSubprotocol,isValidStatusCode:isValidStatusCode,failWebsocketConnection:failWebsocketConnection,websocketMessageReceived:websocketMessageReceived}},4284:(e,t,n)=>{"use strict";const{webidl:s}=n(1744);const{DOMException:i}=n(1037);const{URLSerializer:r}=n(685);const{getGlobalOrigin:o}=n(1246);const{staticPropertyDescriptors:A,states:a,opcodes:c,emptyBuffer:u}=n(9188);const{kWebSocketURL:l,kReadyState:d,kController:p,kBinaryType:g,kResponse:h,kSentClose:f,kByteParser:E}=n(7578);const{isEstablished:m,isClosing:C,isValidSubprotocol:Q,failWebsocketConnection:I,fireEvent:B}=n(5515);const{establishWebSocketConnection:y}=n(5354);const{WebsocketFrameSend:b}=n(5444);const{ByteParser:w}=n(1688);const{kEnumerableProperty:R,isBlobLike:v}=n(3983);const{getGlobalDispatcher:k}=n(1892);const{types:S}=n(3837);let x=false;class WebSocket extends EventTarget{#l={open:null,error:null,close:null,message:null};#d=0;#p="";#g="";constructor(e,t=[]){super();s.argumentLengthCheck(arguments,1,{header:"WebSocket constructor"});if(!x){x=true;process.emitWarning("WebSockets are experimental, expect them to change at any time.",{code:"UNDICI-WS"})}const n=s.converters["DOMString or sequence or WebSocketInit"](t);e=s.converters.USVString(e);t=n.protocols;const r=o();let A;try{A=new URL(e,r)}catch(e){throw new i(e,"SyntaxError")}if(A.protocol==="http:"){A.protocol="ws:"}else if(A.protocol==="https:"){A.protocol="wss:"}if(A.protocol!=="ws:"&&A.protocol!=="wss:"){throw new i(`Expected a ws: or wss: protocol, got ${A.protocol}`,"SyntaxError")}if(A.hash||A.href.endsWith("#")){throw new i("Got fragment","SyntaxError")}if(typeof t==="string"){t=[t]}if(t.length!==new Set(t.map((e=>e.toLowerCase()))).size){throw new i("Invalid Sec-WebSocket-Protocol value","SyntaxError")}if(t.length>0&&!t.every((e=>Q(e)))){throw new i("Invalid Sec-WebSocket-Protocol value","SyntaxError")}this[l]=new URL(A.href);this[p]=y(A,t,this,(e=>this.#h(e)),n);this[d]=WebSocket.CONNECTING;this[g]="blob"}close(e=undefined,t=undefined){s.brandCheck(this,WebSocket);if(e!==undefined){e=s.converters["unsigned short"](e,{clamp:true})}if(t!==undefined){t=s.converters.USVString(t)}if(e!==undefined){if(e!==1e3&&(e<3e3||e>4999)){throw new i("invalid code","InvalidAccessError")}}let n=0;if(t!==undefined){n=Buffer.byteLength(t);if(n>123){throw new i(`Reason must be less than 123 bytes; received ${n}`,"SyntaxError")}}if(this[d]===WebSocket.CLOSING||this[d]===WebSocket.CLOSED){}else if(!m(this)){I(this,"Connection was closed before it was established.");this[d]=WebSocket.CLOSING}else if(!C(this)){const s=new b;if(e!==undefined&&t===undefined){s.frameData=Buffer.allocUnsafe(2);s.frameData.writeUInt16BE(e,0)}else if(e!==undefined&&t!==undefined){s.frameData=Buffer.allocUnsafe(2+n);s.frameData.writeUInt16BE(e,0);s.frameData.write(t,2,"utf-8")}else{s.frameData=u}const i=this[h].socket;i.write(s.createFrame(c.CLOSE),(e=>{if(!e){this[f]=true}}));this[d]=a.CLOSING}else{this[d]=WebSocket.CLOSING}}send(e){s.brandCheck(this,WebSocket);s.argumentLengthCheck(arguments,1,{header:"WebSocket.send"});e=s.converters.WebSocketSendData(e);if(this[d]===WebSocket.CONNECTING){throw new i("Sent before connected.","InvalidStateError")}if(!m(this)||C(this)){return}const t=this[h].socket;if(typeof e==="string"){const n=Buffer.from(e);const s=new b(n);const i=s.createFrame(c.TEXT);this.#d+=n.byteLength;t.write(i,(()=>{this.#d-=n.byteLength}))}else if(S.isArrayBuffer(e)){const n=Buffer.from(e);const s=new b(n);const i=s.createFrame(c.BINARY);this.#d+=n.byteLength;t.write(i,(()=>{this.#d-=n.byteLength}))}else if(ArrayBuffer.isView(e)){const n=Buffer.from(e,e.byteOffset,e.byteLength);const s=new b(n);const i=s.createFrame(c.BINARY);this.#d+=n.byteLength;t.write(i,(()=>{this.#d-=n.byteLength}))}else if(v(e)){const n=new b;e.arrayBuffer().then((e=>{const s=Buffer.from(e);n.frameData=s;const i=n.createFrame(c.BINARY);this.#d+=s.byteLength;t.write(i,(()=>{this.#d-=s.byteLength}))}))}}get readyState(){s.brandCheck(this,WebSocket);return this[d]}get bufferedAmount(){s.brandCheck(this,WebSocket);return this.#d}get url(){s.brandCheck(this,WebSocket);return r(this[l])}get extensions(){s.brandCheck(this,WebSocket);return this.#g}get protocol(){s.brandCheck(this,WebSocket);return this.#p}get onopen(){s.brandCheck(this,WebSocket);return this.#l.open}set onopen(e){s.brandCheck(this,WebSocket);if(this.#l.open){this.removeEventListener("open",this.#l.open)}if(typeof e==="function"){this.#l.open=e;this.addEventListener("open",e)}else{this.#l.open=null}}get onerror(){s.brandCheck(this,WebSocket);return this.#l.error}set onerror(e){s.brandCheck(this,WebSocket);if(this.#l.error){this.removeEventListener("error",this.#l.error)}if(typeof e==="function"){this.#l.error=e;this.addEventListener("error",e)}else{this.#l.error=null}}get onclose(){s.brandCheck(this,WebSocket);return this.#l.close}set onclose(e){s.brandCheck(this,WebSocket);if(this.#l.close){this.removeEventListener("close",this.#l.close)}if(typeof e==="function"){this.#l.close=e;this.addEventListener("close",e)}else{this.#l.close=null}}get onmessage(){s.brandCheck(this,WebSocket);return this.#l.message}set onmessage(e){s.brandCheck(this,WebSocket);if(this.#l.message){this.removeEventListener("message",this.#l.message)}if(typeof e==="function"){this.#l.message=e;this.addEventListener("message",e)}else{this.#l.message=null}}get binaryType(){s.brandCheck(this,WebSocket);return this[g]}set binaryType(e){s.brandCheck(this,WebSocket);if(e!=="blob"&&e!=="arraybuffer"){this[g]="blob"}else{this[g]=e}}#h(e){this[h]=e;const t=new w(this);t.on("drain",(function onParserDrain(){this.ws[h].socket.resume()}));e.socket.ws=this;this[E]=t;this[d]=a.OPEN;const n=e.headersList.get("sec-websocket-extensions");if(n!==null){this.#g=n}const s=e.headersList.get("sec-websocket-protocol");if(s!==null){this.#p=s}B("open",this)}}WebSocket.CONNECTING=WebSocket.prototype.CONNECTING=a.CONNECTING;WebSocket.OPEN=WebSocket.prototype.OPEN=a.OPEN;WebSocket.CLOSING=WebSocket.prototype.CLOSING=a.CLOSING;WebSocket.CLOSED=WebSocket.prototype.CLOSED=a.CLOSED;Object.defineProperties(WebSocket.prototype,{CONNECTING:A,OPEN:A,CLOSING:A,CLOSED:A,url:R,readyState:R,bufferedAmount:R,onopen:R,onerror:R,onclose:R,close:R,onmessage:R,binaryType:R,send:R,extensions:R,protocol:R,[Symbol.toStringTag]:{value:"WebSocket",writable:false,enumerable:false,configurable:true}});Object.defineProperties(WebSocket,{CONNECTING:A,OPEN:A,CLOSING:A,CLOSED:A});s.converters["sequence"]=s.sequenceConverter(s.converters.DOMString);s.converters["DOMString or sequence"]=function(e){if(s.util.Type(e)==="Object"&&Symbol.iterator in e){return s.converters["sequence"](e)}return s.converters.DOMString(e)};s.converters.WebSocketInit=s.dictionaryConverter([{key:"protocols",converter:s.converters["DOMString or sequence"],get defaultValue(){return[]}},{key:"dispatcher",converter:e=>e,get defaultValue(){return k()}},{key:"headers",converter:s.nullableConverter(s.converters.HeadersInit)}]);s.converters["DOMString or sequence or WebSocketInit"]=function(e){if(s.util.Type(e)==="Object"&&!(Symbol.iterator in e)){return s.converters.WebSocketInit(e)}return{protocols:s.converters["DOMString or sequence"](e)}};s.converters.WebSocketSendData=function(e){if(s.util.Type(e)==="Object"){if(v(e)){return s.converters.Blob(e,{strict:false})}if(ArrayBuffer.isView(e)||S.isAnyArrayBuffer(e)){return s.converters.BufferSource(e)}}return s.converters.USVString(e)};e.exports={WebSocket:WebSocket}},5840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return r.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return A.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return l.default}});var s=_interopRequireDefault(n(8628));var i=_interopRequireDefault(n(6409));var r=_interopRequireDefault(n(5122));var o=_interopRequireDefault(n(9120));var A=_interopRequireDefault(n(5332));var a=_interopRequireDefault(n(1595));var c=_interopRequireDefault(n(6900));var u=_interopRequireDefault(n(8950));var l=_interopRequireDefault(n(2746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},4569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("md5").update(e).digest()}var i=md5;t["default"]=i},5332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n="00000000-0000-0000-0000-000000000000";t["default"]=n},2746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}let t;const n=new Uint8Array(16);n[0]=(t=parseInt(e.slice(0,8),16))>>>24;n[1]=t>>>16&255;n[2]=t>>>8&255;n[3]=t&255;n[4]=(t=parseInt(e.slice(9,13),16))>>>8;n[5]=t&255;n[6]=(t=parseInt(e.slice(14,18),16))>>>8;n[7]=t&255;n[8]=(t=parseInt(e.slice(19,23),16))>>>8;n[9]=t&255;n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;n[11]=t/4294967296&255;n[12]=t>>>24&255;n[13]=t>>>16&255;n[14]=t>>>8&255;n[15]=t&255;return n}var i=parse;t["default"]=i},814:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=/^(?:[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;t["default"]=n},807:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=new Uint8Array(256);let r=i.length;function rng(){if(r>i.length-16){s.default.randomFillSync(i);r=0}return i.slice(r,r+=16)}},5274:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("sha1").update(e).digest()}var i=sha1;t["default"]=i},8950:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=[];for(let e=0;e<256;++e){i.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const n=(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase();if(!(0,s.default)(n)){throw TypeError("Stringified UUID is invalid")}return n}var r=stringify;t["default"]=r},8628:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(807));var i=_interopRequireDefault(n(8950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let r;let o;let A=0;let a=0;function v1(e,t,n){let c=t&&n||0;const u=t||new Array(16);e=e||{};let l=e.node||r;let d=e.clockseq!==undefined?e.clockseq:o;if(l==null||d==null){const t=e.random||(e.rng||s.default)();if(l==null){l=r=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=o=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let g=e.nsecs!==undefined?e.nsecs:a+1;const h=p-A+(g-a)/1e4;if(h<0&&e.clockseq===undefined){d=d+1&16383}if((h<0||p>A)&&e.nsecs===undefined){g=0}if(g>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}A=p;a=g;o=d;p+=122192928e5;const f=((p&268435455)*1e4+g)%4294967296;u[c++]=f>>>24&255;u[c++]=f>>>16&255;u[c++]=f>>>8&255;u[c++]=f&255;const E=p/4294967296*1e4&268435455;u[c++]=E>>>8&255;u[c++]=E&255;u[c++]=E>>>24&15|16;u[c++]=E>>>16&255;u[c++]=d>>>8|128;u[c++]=d&255;for(let e=0;e<6;++e){u[c+e]=l[e]}return t||(0,i.default)(u)}var c=v1;t["default"]=c},6409:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(5998));var i=_interopRequireDefault(n(4569));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v3",48,i.default);var o=r;t["default"]=o},5998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var s=_interopRequireDefault(n(8950));var i=_interopRequireDefault(n(2746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(807));var i=_interopRequireDefault(n(8950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,n){e=e||{};const r=e.random||(e.rng||s.default)();r[6]=r[6]&15|64;r[8]=r[8]&63|128;if(t){n=n||0;for(let e=0;e<16;++e){t[n+e]=r[e]}return t}return(0,i.default)(r)}var r=v4;t["default"]=r},9120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(5998));var i=_interopRequireDefault(n(5274));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v5",80,i.default);var o=r;t["default"]=o},6900:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(814));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&s.default.test(e)}var i=validate;t["default"]=i},1595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var i=version;t["default"]=i},8542:(e,t,n)=>{t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.destroy=(()=>{let e=false;return()=>{if(!e){e=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`.")}}})();t.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"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let s=0;let i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}s++;if(e==="%c"){i=s}}));t.splice(i,0,n)}t.log=console.debug||console.log||(()=>{});function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=n(2624)(t);const{formatters:s}=e.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2624:(e,t,n)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=n(6628);createDebug.destroy=destroy;Object.keys(e).forEach((t=>{createDebug[t]=e[t]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let n=0;n{if(t==="%%"){return"%"}r++;const i=createDebug.formatters[s];if(typeof i==="function"){const s=e[r];t=i.call(n,s);e.splice(r,1);r--}return t}));createDebug.formatArgs.call(n,e);const o=n.log||createDebug.log;o.apply(n,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(n!==null){return n}if(s!==createDebug.namespaces){s=createDebug.namespaces;i=createDebug.enabled(e)}return i},set:e=>{n=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,t){const n=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);n.log=this.log;return n}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];let t;const n=(typeof e==="string"?e:"").split(/[\s,]+/);const s=n.length;for(t=0;t"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let t;let n;for(t=0,n=createDebug.skips.length;t{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=n(8542)}else{e.exports=n(5305)}},5305:(e,t,n)=>{const s=n(6224);const i=n(3837);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");t.colors=[6,2,3,4,5,1];try{const e=n(1415);if(e&&(e.stderr||e).level>=2){t.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(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let s=process.env[t];if(/^(yes|on|true|enabled)$/i.test(s)){s=true}else if(/^(no|off|false|disabled)$/i.test(s)){s=false}else if(s==="null"){s=null}else{s=Number(s)}e[n]=s;return e}),{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):s.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:n,useColors:s}=this;if(s){const s=this.color;const i="[3"+(s<8?s:"8;5;"+s);const r=` ${i};1m${n} `;t[0]=r+t[0].split("\n").join("\n"+r);t.push(i+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+n+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let s=0;se.trim())).join(" ")};r.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},3787:e=>{"use strict";e.exports=(e,t=process.argv)=>{const n=e.startsWith("-")?"":e.length===1?"-":"--";const s=t.indexOf(n+e);const i=t.indexOf("--");return s!==-1&&(i===-1||s{var t=1e3;var n=t*60;var s=n*60;var i=s*24;var r=i*7;var o=i*365.25;e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0){return parse(e)}else if(n==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var A=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!A){return}var a=parseFloat(A[1]);var c=(A[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return a*o;case"weeks":case"week":case"w":return a*r;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return undefined}}function fmtShort(e){var r=Math.abs(e);if(r>=i){return Math.round(e/i)+"d"}if(r>=s){return Math.round(e/s)+"h"}if(r>=n){return Math.round(e/n)+"m"}if(r>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var r=Math.abs(e);if(r>=i){return plural(e,r,i,"day")}if(r>=s){return plural(e,r,s,"hour")}if(r>=n){return plural(e,r,n,"minute")}if(r>=t){return plural(e,r,t,"second")}return e+" ms"}function plural(e,t,n,s){var i=t>=n*1.5;return Math.round(e/n)+" "+s+(i?"s":"")}},1415:(e,t,n)=>{"use strict";const s=n(2037);const i=n(6224);const r=n(3787);const{env:o}=process;let A;if(r("no-color")||r("no-colors")||r("color=false")||r("color=never")){A=0}else if(r("color")||r("colors")||r("color=true")||r("color=always")){A=1}if("FORCE_COLOR"in o){if(o.FORCE_COLOR==="true"){A=1}else if(o.FORCE_COLOR==="false"){A=0}else{A=o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e,t){if(A===0){return 0}if(r("color=16m")||r("color=full")||r("color=truecolor")){return 3}if(r("color=256")){return 2}if(e&&!t&&A===undefined){return 0}const n=A||0;if(o.TERM==="dumb"){return n}if(process.platform==="win32"){const e=s.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in o){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in o))||o.CI_NAME==="codeship"){return 1}return n}if("TEAMCITY_VERSION"in o){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0}if(o.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(o.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)){return 1}if("COLORTERM"in o){return 1}return n}function getSupportLevel(e){const t=supportsColor(e,e&&e.isTTY);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,i.isatty(1))),stderr:translateLevel(supportsColor(true,i.isatty(2)))}},4978:module=>{module.exports=eval("require")("util/types")},9491:e=>{"use strict";e.exports=require("assert")},852:e=>{"use strict";e.exports=require("async_hooks")},4300:e=>{"use strict";e.exports=require("buffer")},6206:e=>{"use strict";e.exports=require("console")},6113:e=>{"use strict";e.exports=require("crypto")},7643:e=>{"use strict";e.exports=require("diagnostics_channel")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5158:e=>{"use strict";e.exports=require("http2")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},5673:e=>{"use strict";e.exports=require("node:events")},4492:e=>{"use strict";e.exports=require("node:stream")},7261:e=>{"use strict";e.exports=require("node:util")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},4074:e=>{"use strict";e.exports=require("perf_hooks")},3477:e=>{"use strict";e.exports=require("querystring")},2781:e=>{"use strict";e.exports=require("stream")},5356:e=>{"use strict";e.exports=require("stream/web")},1576:e=>{"use strict";e.exports=require("string_decoder")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},1267:e=>{"use strict";e.exports=require("worker_threads")},9796:e=>{"use strict";e.exports=require("zlib")},526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.grant=t.BaseAuthAPI=t.AuthApiError=void 0;const s=n(8361);const i=n(5467);const r=n(6966);const o=n(8295);class AuthApiError extends Error{constructor(e,t,n,s,i){super(t||e);this.error=e;this.error_description=t;this.statusCode=n;this.body=s;this.headers=i;this.name="AuthApiError"}}t.AuthApiError=AuthApiError;function parseErrorBody(e){const t=JSON.parse(e);let n;if(t.error){n=t}else{n={error:t.code,error_description:t.description}}return n}async function parseError(e){const t=await e.text();try{const n=parseErrorBody(t);return new AuthApiError(n.error,n.error_description,e.status,t,e.headers)}catch(n){return new s.ResponseError(e.status,t,e.headers,"Response returned an error code")}}class BaseAuthAPI extends i.BaseAPI{constructor(e){super({...e,baseUrl:`https://${e.domain}`,middleware:e.telemetry!==false?[new o.TelemetryMiddleware(e)]:[],parseError:parseError,retry:{enabled:false,...e.retry}});this.domain=e.domain;this.clientId=e.clientId;this.clientSecret=e.clientSecret;this.clientAssertionSigningKey=e.clientAssertionSigningKey;this.clientAssertionSigningAlg=e.clientAssertionSigningAlg}async addClientAuthentication(e){return(0,r.addClientAuthentication)({payload:e,domain:this.domain,clientId:this.clientId,clientSecret:this.clientSecret,clientAssertionSigningKey:this.clientAssertionSigningKey,clientAssertionSigningAlg:this.clientAssertionSigningAlg})}}t.BaseAuthAPI=BaseAuthAPI;async function grant(e,t,{idTokenValidateOptions:n,initOverrides:s}={},r,o,A){const a=await A({path:"/oauth/token",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:r,...t,grant_type:e})},s);const c=await i.JSONApiResponse.fromResponse(a);if(c.data.id_token){await o.validate(c.data.id_token,n)}return c}t.grant=grant},6966:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.addClientAuthentication=void 0;const o=r(n(4061));const A=n(6008);const addClientAuthentication=async({payload:e,domain:t,clientId:n,clientAssertionSigningKey:s,clientAssertionSigningAlg:i,clientSecret:r})=>{const a=e.client_id||n;if(s&&!e.client_assertion){const n=i||"RS256";const r=await o.importPKCS8(s,n);e.client_assertion=await new o.SignJWT({}).setProtectedHeader({alg:n}).setIssuedAt().setSubject(a).setJti((0,A.v4)()).setIssuer(a).setAudience(`https://${t}/`).setExpirationTime("2mins").sign(r);e.client_assertion_type="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}else if(r&&!e.client_secret){e.client_secret=r}if((!e.client_secret||e.client_secret.trim().length===0)&&(!e.client_assertion||e.client_assertion.trim().length===0)){throw new Error("The client_secret or client_assertion field is required.")}return e};t.addClientAuthentication=addClientAuthentication},8657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Database=void 0;const s=n(4667);const i=n(5467);const r=n(526);class Database extends r.BaseAuthAPI{async signUp(e,t){(0,i.validateRequiredRequestParams)(e,["email","password","connection"]);const n=await this.request({path:"/dbconnections/signup",method:"POST",headers:{"Content-Type":"application/json"},body:{client_id:this.clientId,...e}},t);return s.JSONApiResponse.fromResponse(n)}async changePassword(e,t){(0,i.validateRequiredRequestParams)(e,["email","connection"]);const n=await this.request({path:"/dbconnections/change_password",method:"POST",headers:{"Content-Type":"application/json"},body:{client_id:this.clientId,...e}},t);return s.TextApiResponse.fromResponse(n)}}t.Database=Database},2932:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.IDTokenValidator=t.IdTokenValidatorError=void 0;const o=r(n(4061));const A=60;class IdTokenValidatorError extends Error{}t.IdTokenValidatorError=IdTokenValidatorError;class IDTokenValidator{constructor({domain:e,clientId:t,clientSecret:n,agent:s,headers:i,timeoutDuration:r,idTokenSigningAlg:a="RS256",clockTolerance:c=A}){this.jwks=o.createRemoteJWKSet(new URL(`https://${e}/.well-known/jwks.json`),{timeoutDuration:r,agent:s,headers:i});this.alg=a;this.audience=t;this.secret=(new TextEncoder).encode(n);this.issuer=`https://${e}/`;this.clockTolerance=c}async validate(e,{nonce:t,maxAge:n,organization:s}={}){const i=this.alg==="HS256"?this.secret:this.jwks;const r=o.decodeProtectedHeader(e);const A=o.decodeJwt(e);if(r.alg!=="RS256"&&r.alg!=="HS256"){throw new Error(`Signature algorithm of "${r.alg}" is not supported. Expected the ID token to be signed with "RS256" or "HS256".`)}if(!A.iss||typeof A.iss!=="string"){throw new IdTokenValidatorError("Issuer (iss) claim must be a string present in the ID token")}if(A.iss!==this.issuer){throw new IdTokenValidatorError(`Issuer (iss) claim mismatch in the ID token; expected "${this.issuer}", found "${A.iss}"`)}if(!A.sub||typeof A.sub!=="string"){throw new IdTokenValidatorError("Subject (sub) claim must be a string present in the ID token")}if(!A.aud||!(typeof A.aud==="string"||Array.isArray(A.aud))){throw new IdTokenValidatorError("Audience (aud) claim must be a string or array of strings present in the ID token")}if(Array.isArray(A.aud)&&!A.aud.includes(this.audience)){throw new IdTokenValidatorError(`Audience (aud) claim mismatch in the ID token; expected "${this.audience}" but was not one of "${A.aud.join(", ")}"`)}else if(typeof A.aud==="string"&&A.aud!==this.audience){throw new IdTokenValidatorError(`Audience (aud) claim mismatch in the ID token; expected "${this.audience}" but found "${A.aud}"`)}if(s){if(s.indexOf("org_")===0){if(!A.org_id||typeof A.org_id!=="string"){throw new Error("Organization Id (org_id) claim must be a string present in the ID token")}if(A.org_id!==s){throw new Error(`Organization Id (org_id) claim value mismatch in the ID token; expected "${s}", found "${A.org_id}"'`)}}else{if(!A.org_name||typeof A.org_name!=="string"){throw new Error("Organization Name (org_name) claim must be a string present in the ID token")}if(A.org_name!==s.toLowerCase()){throw new Error(`Organization Name (org_name) claim value mismatch in the ID token; expected "${s}", found "${A.org_name}"'`)}}}const a=Math.floor(Date.now()/1e3);if(!A.exp||typeof A.exp!=="number"){throw new IdTokenValidatorError("Expiration Time (exp) claim must be a number present in the ID token")}const c=A.exp+this.clockTolerance;if(a>c){throw new IdTokenValidatorError(`Expiration Time (exp) claim error in the ID token; current time (${a}) is after expiration time (${c})`)}if(!A.iat||typeof A.iat!=="number"){throw new IdTokenValidatorError("Issued At (iat) claim must be a number present in the ID token")}if(t||A.nonce){if(!A.nonce||typeof A.nonce!=="string"){throw new IdTokenValidatorError("Nonce (nonce) claim must be a string present in the ID token")}if(A.nonce!==t){throw new IdTokenValidatorError(`Nonce (nonce) claim mismatch in the ID token; expected "${t}", found "${A.nonce}"`)}}if(Array.isArray(A.aud)&&A.aud.length>1){if(!A.azp||typeof A.azp!=="string"){throw new IdTokenValidatorError("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values")}if(A.azp!==this.audience){throw new IdTokenValidatorError(`Authorized Party (azp) claim mismatch in the ID token; expected "${this.audience}", found "${A.azp}"`)}}if(n){if(!A.auth_time||typeof A.auth_time!=="number"){throw new IdTokenValidatorError("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified")}const e=A.auth_time+n+this.clockTolerance;if(a>e){throw new IdTokenValidatorError(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Currrent time (${a}) is after last auth at ${e}`)}}await o.jwtVerify(e,i,{issuer:this.issuer,audience:this.audience,clockTolerance:this.clockTolerance,maxTokenAge:n,algorithms:["HS256","RS256"]})}}t.IDTokenValidator=IDTokenValidator},3776:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))s(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});t.AuthenticationClient=t.AuthApiError=t.IdTokenValidatorError=void 0;const r=n(8657);const o=n(9424);const A=n(4475);i(n(8657),t);i(n(9424),t);i(n(4475),t);var a=n(2932);Object.defineProperty(t,"IdTokenValidatorError",{enumerable:true,get:function(){return a.IdTokenValidatorError}});var c=n(526);Object.defineProperty(t,"AuthApiError",{enumerable:true,get:function(){return c.AuthApiError}});class AuthenticationClient{constructor(e){this.database=new r.Database(e);this.oauth=new o.OAuth(e);this.passwordless=new A.Passwordless(e)}}t.AuthenticationClient=AuthenticationClient},9424:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.OAuth=void 0;const s=n(5467);const i=n(526);const r=n(2932);class OAuth extends i.BaseAuthAPI{constructor(e){super(e);this.idTokenValidator=new r.IDTokenValidator(e)}async authorizationCodeGrant(e,t={}){(0,s.validateRequiredRequestParams)(e,["code"]);return(0,i.grant)("authorization_code",await this.addClientAuthentication(e),t,this.clientId,this.idTokenValidator,this.request.bind(this))}async authorizationCodeGrantWithPKCE(e,t={}){(0,s.validateRequiredRequestParams)(e,["code","code_verifier"]);return(0,i.grant)("authorization_code",await this.addClientAuthentication(e),t,this.clientId,this.idTokenValidator,this.request.bind(this))}async clientCredentialsGrant(e,t={}){(0,s.validateRequiredRequestParams)(e,["audience"]);return(0,i.grant)("client_credentials",await this.addClientAuthentication(e),t,this.clientId,this.idTokenValidator,this.request.bind(this))}async passwordGrant(e,t={}){(0,s.validateRequiredRequestParams)(e,["username","password"]);return(0,i.grant)(e.realm?"http://auth0.com/oauth/grant-type/password-realm":"password",await this.addClientAuthentication(e),t,this.clientId,this.idTokenValidator,this.request.bind(this))}async refreshTokenGrant(e,t={}){(0,s.validateRequiredRequestParams)(e,["refresh_token"]);return(0,i.grant)("refresh_token",await this.addClientAuthentication(e),t,this.clientId,this.idTokenValidator,this.request.bind(this))}async revokeRefreshToken(e,t={}){(0,s.validateRequiredRequestParams)(e,["token"]);const n=await this.request({path:"/oauth/revoke",method:"POST",headers:{"Content-Type":"application/json"},body:await this.addClientAuthentication({client_id:this.clientId,...e})},t.initOverrides);return s.VoidApiResponse.fromResponse(n)}}t.OAuth=OAuth},4475:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Passwordless=void 0;const s=n(5467);const i=n(526);const r=n(2932);class Passwordless extends i.BaseAuthAPI{constructor(e){super(e);this.idTokenValidator=new r.IDTokenValidator(e)}async sendEmail(e,t){(0,s.validateRequiredRequestParams)(e,["email"]);const n=await this.request({path:"/passwordless/start",method:"POST",headers:{"Content-Type":"application/json"},body:await this.addClientAuthentication({client_id:this.clientId,connection:"email",...e})},t);return s.VoidApiResponse.fromResponse(n)}async sendSMS(e,t){(0,s.validateRequiredRequestParams)(e,["phone_number"]);const n=await this.request({path:"/passwordless/start",method:"POST",headers:{"Content-Type":"application/json"},body:await this.addClientAuthentication({client_id:this.clientId,connection:"sms",...e})},t);return s.VoidApiResponse.fromResponse(n)}async loginWithEmail(e,t={}){(0,s.validateRequiredRequestParams)(e,["email","code"]);const{email:n,code:r,...o}=e;return(0,i.grant)("http://auth0.com/oauth/grant-type/passwordless/otp",await this.addClientAuthentication({username:n,otp:r,realm:"email",...o}),t,this.clientId,this.idTokenValidator,this.request.bind(this))}async loginWithSMS(e,t={}){(0,s.validateRequiredRequestParams)(e,["phone_number","code"]);const{phone_number:n,code:r,...o}=e;return(0,i.grant)("http://auth0.com/oauth/grant-type/passwordless/otp",await this.addClientAuthentication({username:n,otp:r,realm:"sms",...o}),t,this.clientId,this.idTokenValidator,this.request.bind(this))}}t.Passwordless=Passwordless},4035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PostProviderRequestNameEnum=t.PatchProviderRequestNameEnum=void 0;const s=n(195);t.PatchProviderRequestNameEnum=s.EmailProviderUpdateNameEnum;t.PostProviderRequestNameEnum=s.EmailProviderCreateNameEnum},4712:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))s(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(3119),t);i(n(3776),t);i(n(6650),t);i(n(8361),t);i(n(4667),t);i(n(4035),t)},8361:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.RequiredError=t.FetchError=t.TimeoutError=t.ResponseError=void 0;class ResponseError extends Error{constructor(e,t,n,s){super(s);this.statusCode=e;this.body=t;this.headers=n;this.name="ResponseError"}}t.ResponseError=ResponseError;class TimeoutError extends Error{constructor(){super("The request was timed out.");this.name="TimeoutError"}}t.TimeoutError=TimeoutError;class FetchError extends Error{constructor(e,t){super(t);this.cause=e;this.name="FetchError"}}t.FetchError=FetchError;class RequiredError extends Error{constructor(e,t){super(t);this.field=e;this.name="RequiredError"}}t.RequiredError=RequiredError},3551:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))s(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(8361),t);i(n(4667),t)},8295:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TelemetryMiddleware=void 0;const s=n(8200);const i=n(4061);class TelemetryMiddleware{constructor(e){this.clientInfo=e.clientInfo||(0,s.generateClientInfo)()}async pre(e){if("string"===typeof this.clientInfo.name&&this.clientInfo.name.length>0){e.init.headers={...e.init.headers,"Auth0-Client":i.base64url.encode(JSON.stringify(this.clientInfo))}}return{url:e.url,init:e.init}}}t.TelemetryMiddleware=TelemetryMiddleware},4667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TextApiResponse=t.VoidApiResponse=t.JSONApiResponse=void 0;class JSONApiResponse{constructor(e,t,n,s){this.data=e;this.headers=t;this.status=n;this.statusText=s}static async fromResponse(e){const t=await e.json();return new JSONApiResponse(t,e.headers,e.status,e.statusText)}}t.JSONApiResponse=JSONApiResponse;class VoidApiResponse{constructor(e,t,n){this.headers=e;this.status=t;this.statusText=n}static async fromResponse(e){return new VoidApiResponse(e.headers,e.status,e.statusText)}}t.VoidApiResponse=VoidApiResponse;class TextApiResponse{constructor(e,t,n,s){this.data=e;this.headers=t;this.status=n;this.statusText=s}static async fromResponse(e){const t=await e.text();return new TextApiResponse(t,e.headers,e.status,e.statusText)}}t.TextApiResponse=TextApiResponse},577:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.retry=void 0;const n=250;const s=1e4;const i=3;const r=10;const o=500;function getRandomInt(e,t){e=Math.ceil(e);t=Math.floor(t);return Math.floor(Math.random()*(t-e)+e)}async function pause(e){return new Promise((t=>setTimeout(t,e)))}function retry(e,{maxRetries:t,retryWhen:A}){const a=Math.min(r,t!==null&&t!==void 0?t:i);let c=0;const retryAndWait=async()=>{let t;t=await e();if((A||[429]).includes(t.status)&&c{const n=new AbortController;const s=setTimeout((()=>{n.abort()}),this.timeoutDuration);try{return await this.fetchApi(e,{signal:n.signal,...t})}catch(e){if(e.name==="AbortError"){throw new o.TimeoutError}throw e}finally{clearTimeout(s)}};this.fetch=async(e,t)=>{var n;let s={url:e,init:t};for(const e of this.middleware){if(e.pre){s=await e.pre({fetch:this.fetchWithTimeout,...s})||s}}let i=undefined;let A=undefined;try{i=((n=this.configuration.retry)===null||n===void 0?void 0:n.enabled)!==false?await(0,r.retry)((()=>this.fetchWithTimeout(s.url,s.init)),{...this.configuration.retry}):await this.fetchWithTimeout(s.url,s.init)}catch(e){A=e}if(A||!i.ok){for(const e of this.middleware){if(e.onError){i=await e.onError({fetch:this.fetchWithTimeout,...s,error:A,response:i?i.clone():undefined})||i}}if(i===undefined){throw new o.FetchError(A,"The request failed and the interceptors did not return an alternative response")}}else{for(const e of this.middleware){if(e.post){i=await e.post({fetch:this.fetchApi,...s,response:i.clone()})||i}}}return i};if(e.baseUrl===null||e.baseUrl===undefined){throw new Error("Must provide a base URL for the API")}if("string"!==typeof e.baseUrl||e.baseUrl.length===0){throw new Error("The provided base URL is invalid")}this.middleware=e.middleware||[];this.fetchApi=e.fetch||fetch;this.parseError=e.parseError;this.timeoutDuration=typeof e.timeoutDuration==="number"?e.timeoutDuration:1e4}async request(e,t){const{url:n,init:s}=await this.createFetchParams(e,t);const i=await this.fetch(n,s);if(i&&i.status>=200&&i.status<300){return i}const r=await this.parseError(i);throw r}async createFetchParams(e,t){let n=this.configuration.baseUrl+e.path;if(e.query!==undefined&&Object.keys(e.query).length!==0){n+=`?${querystring(e.query)}`}const s=Object.assign({},this.configuration.headers,e.headers);Object.keys(s).forEach((e=>s[e]===undefined?delete s[e]:{}));const i=typeof t==="function"?t:async()=>t;const r={method:e.method,headers:s,body:e.body,agent:this.configuration.agent};const o={...r,...await i({init:r,context:e})};const A={...o,body:o.body instanceof FormData||o.body instanceof URLSearchParams||o.body instanceof Blob?o.body:JSON.stringify(o.body)};return{url:n,init:A}}}t.BaseAPI=BaseAPI;t.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"};function querystring(e){return Object.keys(e).map((t=>querystringSingleKey(t,e[t]))).filter((e=>e.length>0)).join("&")}function querystringSingleKey(e,t){if(t instanceof Array){const n=t.map((e=>encodeURIComponent(String(e)))).join(`&${encodeURIComponent(e)}=`);return`${encodeURIComponent(e)}=${n}`}return`${encodeURIComponent(e)}=${encodeURIComponent(String(t))}`}function validateRequiredRequestParams(e,t){t.forEach((t=>{if(e[t]===null||e[t]===undefined){throw new o.RequiredError(t,`Required parameter requestParameters.${t} was null or undefined.`)}}))}t.validateRequiredRequestParams=validateRequiredRequestParams;function applyQueryParams(e,n){return n.reduce(((n,{key:s,config:i})=>{let r;if(i.isArray){if(i.isCollectionFormatMulti){r=e[s]}else{r=e[s].join(t.COLLECTION_FORMATS[i.collectionFormat])}}else{if(e[s]!==undefined){r=e[s]}}return r!==undefined?{...n,[s]:r}:n}),{})}t.applyQueryParams=applyQueryParams;async function parseFormParam(e){let t=e;t=typeof t=="number"||typeof t=="boolean"?""+t:t;return t}t.parseFormParam=parseFormParam},7248:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))s(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});t.ManagementClientBase=void 0;i(n(892),t);i(n(195),t);const r=n(892);class ManagementClientBase{constructor(e){this.configuration=e;this.actions=new r.ActionsManager(this.configuration);this.anomaly=new r.AnomalyManager(this.configuration);this.attackProtection=new r.AttackProtectionManager(this.configuration);this.blacklists=new r.BlacklistsManager(this.configuration);this.branding=new r.BrandingManager(this.configuration);this.clientGrants=new r.ClientGrantsManager(this.configuration);this.clients=new r.ClientsManager(this.configuration);this.connections=new r.ConnectionsManager(this.configuration);this.customDomains=new r.CustomDomainsManager(this.configuration);this.deviceCredentials=new r.DeviceCredentialsManager(this.configuration);this.emailTemplates=new r.EmailTemplatesManager(this.configuration);this.emails=new r.EmailsManager(this.configuration);this.grants=new r.GrantsManager(this.configuration);this.guardian=new r.GuardianManager(this.configuration);this.hooks=new r.HooksManager(this.configuration);this.jobs=new r.JobsManager(this.configuration);this.keys=new r.KeysManager(this.configuration);this.logStreams=new r.LogStreamsManager(this.configuration);this.logs=new r.LogsManager(this.configuration);this.organizations=new r.OrganizationsManager(this.configuration);this.prompts=new r.PromptsManager(this.configuration);this.resourceServers=new r.ResourceServersManager(this.configuration);this.roles=new r.RolesManager(this.configuration);this.rules=new r.RulesManager(this.configuration);this.rulesConfigs=new r.RulesConfigsManager(this.configuration);this.stats=new r.StatsManager(this.configuration);this.tenants=new r.TenantsManager(this.configuration);this.tickets=new r.TicketsManager(this.configuration);this.userBlocks=new r.UserBlocksManager(this.configuration);this.users=new r.UsersManager(this.configuration);this.usersByEmail=new r.UsersByEmailManager(this.configuration)}}t.ManagementClientBase=ManagementClientBase},8048:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.ActionsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class ActionsManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"force",config:{}}]);const s=await this.request({path:`/actions/actions/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE",query:n},t);return o.VoidApiResponse.fromResponse(s)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/actions/actions/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async getVersion(e,t){o.validateRequiredRequestParams(e,["actionId","id"]);const n=await this.request({path:`/actions/actions/{actionId}/versions/{id}`.replace("{actionId}",encodeURIComponent(String(e.actionId))).replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async getVersions(e,t){o.validateRequiredRequestParams(e,["actionId"]);const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}}]);const s=await this.request({path:`/actions/actions/{actionId}/versions`.replace("{actionId}",encodeURIComponent(String(e.actionId))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"triggerId",config:{}},{key:"actionName",config:{}},{key:"deployed",config:{}},{key:"page",config:{}},{key:"per_page",config:{}},{key:"installed",config:{}}]);const s=await this.request({path:`/actions/actions`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getTriggerBindings(e,t){o.validateRequiredRequestParams(e,["triggerId"]);const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}}]);const s=await this.request({path:`/actions/triggers/{triggerId}/bindings`.replace("{triggerId}",encodeURIComponent(String(e.triggerId))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getExecution(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/actions/executions/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async getAllTriggers(e){const t=await this.request({path:`/actions/triggers`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async update(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/actions/actions/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async updateTriggerBindings(e,t,n){o.validateRequiredRequestParams(e,["triggerId"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/actions/triggers/{triggerId}/bindings`.replace("{triggerId}",encodeURIComponent(String(e.triggerId))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/actions/actions`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async deploy(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/actions/actions/{id}/deploy`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST"},t);return o.JSONApiResponse.fromResponse(n)}async deployVersion(e,t,n){o.validateRequiredRequestParams(e,["id","actionId"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/actions/actions/{actionId}/versions/{id}/deploy`.replace("{id}",encodeURIComponent(String(e.id))).replace("{actionId}",encodeURIComponent(String(e.actionId))),method:"POST",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async test(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/actions/actions/{id}/test`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}}t.ActionsManager=ActionsManager},1734:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.AnomalyManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class AnomalyManager extends A{async deleteBlockedIp(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/anomaly/blocks/ips/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async checkIfIpIsBlocked(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/anomaly/blocks/ips/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.VoidApiResponse.fromResponse(n)}}t.AnomalyManager=AnomalyManager},3716:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.AttackProtectionManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class AttackProtectionManager extends A{async getBreachedPasswordDetectionConfig(e){const t=await this.request({path:`/attack-protection/breached-password-detection`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getBruteForceConfig(e){const t=await this.request({path:`/attack-protection/brute-force-protection`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getSuspiciousIpThrottlingConfig(e){const t=await this.request({path:`/attack-protection/suspicious-ip-throttling`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async updateBreachedPasswordDetectionConfig(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/attack-protection/breached-password-detection`,method:"PATCH",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updateBruteForceConfig(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/attack-protection/brute-force-protection`,method:"PATCH",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updateSuspiciousIpThrottlingConfig(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/attack-protection/suspicious-ip-throttling`,method:"PATCH",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.AttackProtectionManager=AttackProtectionManager},6654:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.BlacklistsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class BlacklistsManager extends A{async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"aud",config:{}}]);const s=await this.request({path:`/blacklists/tokens`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async add(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/blacklists/tokens`,method:"POST",headers:n,body:e},t);return o.VoidApiResponse.fromResponse(s)}}t.BlacklistsManager=BlacklistsManager},1147:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.BrandingManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class BrandingManager extends A{async deleteTheme(e,t){o.validateRequiredRequestParams(e,["themeId"]);const n=await this.request({path:`/branding/themes/{themeId}`.replace("{themeId}",encodeURIComponent(String(e.themeId))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async deleteUniversalLoginTemplate(e){const t=await this.request({path:`/branding/templates/universal-login`,method:"DELETE"},e);return o.VoidApiResponse.fromResponse(t)}async getSettings(e){const t=await this.request({path:`/branding`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getTheme(e,t){o.validateRequiredRequestParams(e,["themeId"]);const n=await this.request({path:`/branding/themes/{themeId}`.replace("{themeId}",encodeURIComponent(String(e.themeId))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async getDefaultTheme(e){const t=await this.request({path:`/branding/themes/default`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getUniversalLoginTemplate(e){const t=await this.request({path:`/branding/templates/universal-login`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async updateSettings(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/branding`,method:"PATCH",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updateTheme(e,t,n){o.validateRequiredRequestParams(e,["themeId"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/branding/themes/{themeId}`.replace("{themeId}",encodeURIComponent(String(e.themeId))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async createTheme(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/branding/themes`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async setUniversalLoginTemplate(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/branding/templates/universal-login`,method:"PUT",headers:n,body:e},t);return o.VoidApiResponse.fromResponse(s)}}t.BrandingManager=BrandingManager},5345:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.ClientGrantsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class ClientGrantsManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/client-grants/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"per_page",config:{}},{key:"page",config:{}},{key:"include_totals",config:{}},{key:"audience",config:{}},{key:"client_id",config:{}}]);const s=await this.request({path:`/client-grants`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async update(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/client-grants/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/client-grants`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.ClientGrantsManager=ClientGrantsManager},2909:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.ClientsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class ClientsManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["client_id"]);const n=await this.request({path:`/clients/{client_id}`.replace("{client_id}",encodeURIComponent(String(e.client_id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async deleteCredential(e,t){o.validateRequiredRequestParams(e,["client_id","credential_id"]);const n=await this.request({path:`/clients/{client_id}/credentials/{credential_id}`.replace("{client_id}",encodeURIComponent(String(e.client_id))).replace("{credential_id}",encodeURIComponent(String(e.credential_id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"fields",config:{}},{key:"include_fields",config:{}},{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}},{key:"is_global",config:{}},{key:"is_first_party",config:{}},{key:"app_type",config:{}}]);const s=await this.request({path:`/clients`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async get(e,t){o.validateRequiredRequestParams(e,["client_id"]);const n=o.applyQueryParams(e,[{key:"fields",config:{}},{key:"include_fields",config:{}}]);const s=await this.request({path:`/clients/{client_id}`.replace("{client_id}",encodeURIComponent(String(e.client_id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getCredentials(e,t){o.validateRequiredRequestParams(e,["client_id"]);const n=await this.request({path:`/clients/{client_id}/credentials`.replace("{client_id}",encodeURIComponent(String(e.client_id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async getCredential(e,t){o.validateRequiredRequestParams(e,["client_id","credential_id"]);const n=await this.request({path:`/clients/{client_id}/credentials/{credential_id}`.replace("{client_id}",encodeURIComponent(String(e.client_id))).replace("{credential_id}",encodeURIComponent(String(e.credential_id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async update(e,t,n){o.validateRequiredRequestParams(e,["client_id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/clients/{client_id}`.replace("{client_id}",encodeURIComponent(String(e.client_id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async updateCredential(e,t,n){o.validateRequiredRequestParams(e,["client_id","credential_id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/clients/{client_id}/credentials/{credential_id}`.replace("{client_id}",encodeURIComponent(String(e.client_id))).replace("{credential_id}",encodeURIComponent(String(e.credential_id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/clients`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async createCredential(e,t,n){o.validateRequiredRequestParams(e,["client_id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/clients/{client_id}/credentials`.replace("{client_id}",encodeURIComponent(String(e.client_id))),method:"POST",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async rotateClientSecret(e,t){o.validateRequiredRequestParams(e,["client_id"]);const n=await this.request({path:`/clients/{client_id}/rotate-secret`.replace("{client_id}",encodeURIComponent(String(e.client_id))),method:"POST"},t);return o.JSONApiResponse.fromResponse(n)}}t.ClientsManager=ClientsManager},1626:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.ConnectionsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class ConnectionsManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/connections/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async deleteUserByEmail(e,t){o.validateRequiredRequestParams(e,["id","email"]);const n=o.applyQueryParams(e,[{key:"email",config:{}}]);const s=await this.request({path:`/connections/{id}/users`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE",query:n},t);return o.VoidApiResponse.fromResponse(s)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"per_page",config:{}},{key:"page",config:{}},{key:"include_totals",config:{}},{key:"from",config:{}},{key:"take",config:{}},{key:"strategy",config:{isArray:true,isCollectionFormatMulti:true}},{key:"name",config:{}},{key:"fields",config:{}},{key:"include_fields",config:{}}]);const s=await this.request({path:`/connections`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"fields",config:{}},{key:"include_fields",config:{}}]);const s=await this.request({path:`/connections/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async checkStatus(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/connections/{id}/status`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.VoidApiResponse.fromResponse(n)}async update(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/connections/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/connections`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.ConnectionsManager=ConnectionsManager},6948:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.CustomDomainsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class CustomDomainsManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/custom-domains/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getAll(e){const t=await this.request({path:`/custom-domains`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/custom-domains/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async update(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/custom-domains/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/custom-domains`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async verify(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/custom-domains/{id}/verify`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST"},t);return o.JSONApiResponse.fromResponse(n)}}t.CustomDomainsManager=CustomDomainsManager},4558:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.DeviceCredentialsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class DeviceCredentialsManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/device-credentials/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}},{key:"fields",config:{}},{key:"include_fields",config:{}},{key:"user_id",config:{}},{key:"client_id",config:{}},{key:"type",config:{}}]);const s=await this.request({path:`/device-credentials`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async createPublicKey(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/device-credentials`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.DeviceCredentialsManager=DeviceCredentialsManager},537:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.EmailTemplatesManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class EmailTemplatesManager extends A{async get(e,t){o.validateRequiredRequestParams(e,["templateName"]);const n=await this.request({path:`/email-templates/{templateName}`.replace("{templateName}",encodeURIComponent(String(e.templateName))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async update(e,t,n){o.validateRequiredRequestParams(e,["templateName"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/email-templates/{templateName}`.replace("{templateName}",encodeURIComponent(String(e.templateName))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/email-templates`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async put(e,t,n){o.validateRequiredRequestParams(e,["templateName"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/email-templates/{templateName}`.replace("{templateName}",encodeURIComponent(String(e.templateName))),method:"PUT",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}}t.EmailTemplatesManager=EmailTemplatesManager},3541:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.EmailsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class EmailsManager extends A{async get(e={},t){const n=o.applyQueryParams(e,[{key:"fields",config:{}},{key:"include_fields",config:{}}]);const s=await this.request({path:`/emails/provider`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async update(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/emails/provider`,method:"PATCH",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async configure(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/emails/provider`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.EmailsManager=EmailsManager},513:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.GrantsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class GrantsManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/grants/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async deleteByUserId(e,t){o.validateRequiredRequestParams(e,["user_id"]);const n=o.applyQueryParams(e,[{key:"user_id",config:{}}]);const s=await this.request({path:`/grants`,method:"DELETE",query:n},t);return o.VoidApiResponse.fromResponse(s)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"per_page",config:{}},{key:"page",config:{}},{key:"include_totals",config:{}},{key:"user_id",config:{}},{key:"client_id",config:{}},{key:"audience",config:{}}]);const s=await this.request({path:`/grants`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}}t.GrantsManager=GrantsManager},5428:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.GuardianManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class GuardianManager extends A{async deleteGuardianEnrollment(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/guardian/enrollments/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getPushNotificationProviderAPNS(e){const t=await this.request({path:`/guardian/factors/push-notification/providers/apns`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getGuardianEnrollment(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/guardian/enrollments/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async getPhoneFactorTemplates(e){const t=await this.request({path:`/guardian/factors/phone/templates`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getSmsFactorTemplates(e){const t=await this.request({path:`/guardian/factors/sms/templates`,method:"GET"},e);return t.status===204?o.VoidApiResponse.fromResponse(t):o.JSONApiResponse.fromResponse(t)}async getFactors(e){const t=await this.request({path:`/guardian/factors`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getPhoneFactorMessageTypes(e){const t=await this.request({path:`/guardian/factors/phone/message-types`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getPhoneFactorSelectedProvider(e){const t=await this.request({path:`/guardian/factors/phone/selected-provider`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getPhoneFactorProviderTwilio(e){const t=await this.request({path:`/guardian/factors/phone/providers/twilio`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getPushNotificationSelectedProvider(e){const t=await this.request({path:`/guardian/factors/push-notification/selected-provider`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getPolicies(e){const t=await this.request({path:`/guardian/policies`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getSmsSelectedProvider(e){const t=await this.request({path:`/guardian/factors/sms/selected-provider`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getSmsFactorProviderTwilio(e){const t=await this.request({path:`/guardian/factors/sms/providers/twilio`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async getPushNotificationProviderSNS(e){const t=await this.request({path:`/guardian/factors/push-notification/providers/sns`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async updatePushNotificationProviderAPNS(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/push-notification/providers/apns`,method:"PATCH",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updatePushNotificationProviderFCM(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/push-notification/providers/fcm`,method:"PATCH",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updatePushNotificationProviderSNS(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/push-notification/providers/sns`,method:"PATCH",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async createEnrollmentTicket(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/enrollments/ticket`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async setPushNotificationProviderAPNS(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/push-notification/providers/apns`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async setPhoneFactorTemplates(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/phone/templates`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async setSmsFactorTemplates(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/sms/templates`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updateFactor(e,t,n){o.validateRequiredRequestParams(e,["name"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/guardian/factors/{name}`.replace("{name}",encodeURIComponent(String(e.name))),method:"PUT",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async setPushNotificationProviderFCM(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/push-notification/providers/fcm`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updatePhoneFactorMessageTypes(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/phone/message-types`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updatePhoneFactorSelectedProvider(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/phone/selected-provider`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async setPushNotificationSelectedProvider(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/push-notification/selected-provider`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updatePolicies(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/policies`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async setSmsSelectedProvider(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/sms/selected-provider`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async setSmsFactorProviderTwilio(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/sms/providers/twilio`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async setPushNotificationProviderSNS(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/push-notification/providers/sns`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updatePhoneFactorProviderTwilio(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/guardian/factors/phone/providers/twilio`,method:"PUT",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.GuardianManager=GuardianManager},8476:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.HooksManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class HooksManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/hooks/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async deleteSecrets(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/hooks/{id}/secrets`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}},{key:"enabled",config:{}},{key:"fields",config:{}},{key:"triggerId",config:{}}]);const s=await this.request({path:`/hooks`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"fields",config:{}}]);const s=await this.request({path:`/hooks/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getSecrets(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/hooks/{id}/secrets`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async update(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/hooks/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async updateSecrets(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/hooks/{id}/secrets`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/hooks`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async addSecrets(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/hooks/{id}/secrets`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}}t.HooksManager=HooksManager},892:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))s(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(8048),t);i(n(1734),t);i(n(3716),t);i(n(6654),t);i(n(1147),t);i(n(5345),t);i(n(2909),t);i(n(1626),t);i(n(6948),t);i(n(4558),t);i(n(537),t);i(n(3541),t);i(n(513),t);i(n(5428),t);i(n(8476),t);i(n(486),t);i(n(2318),t);i(n(1118),t);i(n(4415),t);i(n(1302),t);i(n(6462),t);i(n(9160),t);i(n(2347),t);i(n(8556),t);i(n(683),t);i(n(5670),t);i(n(74),t);i(n(5744),t);i(n(2521),t);i(n(1713),t);i(n(6207),t)},486:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.JobsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class JobsManager extends A{async getErrors(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/jobs/{id}/errors`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return n.status===204?o.VoidApiResponse.fromResponse(n):o.JSONApiResponse.fromResponse(n)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/jobs/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async exportUsers(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/jobs/users-exports`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async importUsers(e,t){const n=new FormData;if(e.users!==undefined){n.append("users",await o.parseFormParam(e.users))}if(e.connection_id!==undefined){n.append("connection_id",await o.parseFormParam(e.connection_id))}if(e.upsert!==undefined){n.append("upsert",await o.parseFormParam(e.upsert))}if(e.external_id!==undefined){n.append("external_id",await o.parseFormParam(e.external_id))}if(e.send_completion_email!==undefined){n.append("send_completion_email",await o.parseFormParam(e.send_completion_email))}const s=await this.request({path:`/jobs/users-imports`,method:"POST",body:n},t);return o.JSONApiResponse.fromResponse(s)}async verifyEmail(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/jobs/verification-email`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.JobsManager=JobsManager},2318:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.KeysManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class KeysManager extends A{async get(e,t){o.validateRequiredRequestParams(e,["kid"]);const n=await this.request({path:`/keys/signing/{kid}`.replace("{kid}",encodeURIComponent(String(e.kid))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async getAll(e){const t=await this.request({path:`/keys/signing`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async rotate(e){const t=await this.request({path:`/keys/signing/rotate`,method:"POST"},e);return o.JSONApiResponse.fromResponse(t)}async revoke(e,t){o.validateRequiredRequestParams(e,["kid"]);const n=await this.request({path:`/keys/signing/{kid}/revoke`.replace("{kid}",encodeURIComponent(String(e.kid))),method:"PUT"},t);return o.JSONApiResponse.fromResponse(n)}}t.KeysManager=KeysManager},1118:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.LogStreamsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class LogStreamsManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/log-streams/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getAll(e){const t=await this.request({path:`/log-streams`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/log-streams/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async update(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/log-streams/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/log-streams`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.LogStreamsManager=LogStreamsManager},4415:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.LogsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class LogsManager extends A{async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"sort",config:{}},{key:"fields",config:{}},{key:"include_fields",config:{}},{key:"include_totals",config:{}},{key:"from",config:{}},{key:"take",config:{}},{key:"q",config:{}}]);const s=await this.request({path:`/logs`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/logs/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}}t.LogsManager=LogsManager},1302:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.OrganizationsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class OrganizationsManager extends A{async deleteEnabledConnection(e,t){o.validateRequiredRequestParams(e,["id","connectionId"]);const n=await this.request({path:`/organizations/{id}/enabled_connections/{connectionId}`.replace("{id}",encodeURIComponent(String(e.id))).replace("{connectionId}",encodeURIComponent(String(e.connectionId))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async deleteInvitation(e,t){o.validateRequiredRequestParams(e,["id","invitation_id"]);const n=await this.request({path:`/organizations/{id}/invitations/{invitation_id}`.replace("{id}",encodeURIComponent(String(e.id))).replace("{invitation_id}",encodeURIComponent(String(e.invitation_id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async deleteMembers(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/organizations/{id}/members`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async deleteMemberRoles(e,t,n){o.validateRequiredRequestParams(e,["id","user_id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/organizations/{id}/members/{user_id}/roles`.replace("{id}",encodeURIComponent(String(e.id))).replace("{user_id}",encodeURIComponent(String(e.user_id))),method:"DELETE",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/organizations/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getEnabledConnections(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}}]);const s=await this.request({path:`/organizations/{id}/enabled_connections`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getEnabledConnection(e,t){o.validateRequiredRequestParams(e,["id","connectionId"]);const n=await this.request({path:`/organizations/{id}/enabled_connections/{connectionId}`.replace("{id}",encodeURIComponent(String(e.id))).replace("{connectionId}",encodeURIComponent(String(e.connectionId))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async getInvitations(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}},{key:"fields",config:{}},{key:"include_fields",config:{}},{key:"sort",config:{}}]);const s=await this.request({path:`/organizations/{id}/invitations`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getInvitation(e,t){o.validateRequiredRequestParams(e,["id","invitation_id"]);const n=o.applyQueryParams(e,[{key:"fields",config:{}},{key:"include_fields",config:{}}]);const s=await this.request({path:`/organizations/{id}/invitations/{invitation_id}`.replace("{id}",encodeURIComponent(String(e.id))).replace("{invitation_id}",encodeURIComponent(String(e.invitation_id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getMembers(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}},{key:"from",config:{}},{key:"take",config:{}},{key:"fields",config:{}},{key:"include_fields",config:{}}]);const s=await this.request({path:`/organizations/{id}/members`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getByName(e,t){o.validateRequiredRequestParams(e,["name"]);const n=await this.request({path:`/organizations/name/{name}`.replace("{name}",encodeURIComponent(String(e.name))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async getMemberRoles(e,t){o.validateRequiredRequestParams(e,["id","user_id"]);const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}}]);const s=await this.request({path:`/organizations/{id}/members/{user_id}/roles`.replace("{id}",encodeURIComponent(String(e.id))).replace("{user_id}",encodeURIComponent(String(e.user_id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}},{key:"from",config:{}},{key:"take",config:{}},{key:"sort",config:{}}]);const s=await this.request({path:`/organizations`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/organizations/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async updateEnabledConnection(e,t,n){o.validateRequiredRequestParams(e,["id","connectionId"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/organizations/{id}/enabled_connections/{connectionId}`.replace("{id}",encodeURIComponent(String(e.id))).replace("{connectionId}",encodeURIComponent(String(e.connectionId))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async update(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/organizations/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async addEnabledConnection(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/organizations/{id}/enabled_connections`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async createInvitation(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/organizations/{id}/invitations`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async addMembers(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/organizations/{id}/members`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async addMemberRoles(e,t,n){o.validateRequiredRequestParams(e,["id","user_id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/organizations/{id}/members/{user_id}/roles`.replace("{id}",encodeURIComponent(String(e.id))).replace("{user_id}",encodeURIComponent(String(e.user_id))),method:"POST",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/organizations`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.OrganizationsManager=OrganizationsManager},6462:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.PromptsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class PromptsManager extends A{async getCustomTextByLanguage(e,t){o.validateRequiredRequestParams(e,["prompt","language"]);const n=await this.request({path:`/prompts/{prompt}/custom-text/{language}`.replace("{prompt}",encodeURIComponent(String(e.prompt))).replace("{language}",encodeURIComponent(String(e.language))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async get(e){const t=await this.request({path:`/prompts`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async update(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/prompts`,method:"PATCH",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updateCustomTextByLanguage(e,t,n){o.validateRequiredRequestParams(e,["prompt","language"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/prompts/{prompt}/custom-text/{language}`.replace("{prompt}",encodeURIComponent(String(e.prompt))).replace("{language}",encodeURIComponent(String(e.language))),method:"PUT",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}}t.PromptsManager=PromptsManager},9160:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.ResourceServersManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class ResourceServersManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/resource-servers/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}},{key:"include_fields",config:{}}]);const s=await this.request({path:`/resource-servers`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"include_fields",config:{}}]);const s=await this.request({path:`/resource-servers/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async update(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/resource-servers/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/resource-servers`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.ResourceServersManager=ResourceServersManager},2347:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.RolesManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class RolesManager extends A{async deletePermissions(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/roles/{id}/permissions`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/roles/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getPermissions(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"per_page",config:{}},{key:"page",config:{}},{key:"include_totals",config:{}}]);const s=await this.request({path:`/roles/{id}/permissions`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getUsers(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"per_page",config:{}},{key:"page",config:{}},{key:"include_totals",config:{}},{key:"from",config:{}},{key:"take",config:{}}]);const s=await this.request({path:`/roles/{id}/users`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"per_page",config:{}},{key:"page",config:{}},{key:"include_totals",config:{}},{key:"name_filter",config:{}}]);const s=await this.request({path:`/roles`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/roles/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async update(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/roles/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async addPermissions(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/roles/{id}/permissions`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async assignUsers(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/roles/{id}/users`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/roles`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.RolesManager=RolesManager},683:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.RulesConfigsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class RulesConfigsManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["key"]);const n=await this.request({path:`/rules-configs/{key}`.replace("{key}",encodeURIComponent(String(e.key))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getAll(e){const t=await this.request({path:`/rules-configs`,method:"GET"},e);return o.JSONApiResponse.fromResponse(t)}async set(e,t,n){o.validateRequiredRequestParams(e,["key"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/rules-configs/{key}`.replace("{key}",encodeURIComponent(String(e.key))),method:"PUT",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}}t.RulesConfigsManager=RulesConfigsManager},8556:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.RulesManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class RulesManager extends A{async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/rules/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}},{key:"enabled",config:{}},{key:"fields",config:{}},{key:"include_fields",config:{}}]);const s=await this.request({path:`/rules`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"fields",config:{}},{key:"include_fields",config:{}}]);const s=await this.request({path:`/rules/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async update(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/rules/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/rules`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.RulesManager=RulesManager},5670:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.StatsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class StatsManager extends A{async getActiveUsersCount(e){const t=await this.request({path:`/stats/active-users`,method:"GET"},e);return o.TextApiResponse.fromResponse(t)}async getDaily(e={},t){const n=o.applyQueryParams(e,[{key:"from",config:{}},{key:"to",config:{}}]);const s=await this.request({path:`/stats/daily`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}}t.StatsManager=StatsManager},74:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.TenantsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class TenantsManager extends A{async updateSettings(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/tenants/settings`,method:"PATCH",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async getSettings(e={},t){const n=o.applyQueryParams(e,[{key:"fields",config:{}},{key:"include_fields",config:{}}]);const s=await this.request({path:`/tenants/settings`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}}t.TenantsManager=TenantsManager},5744:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.TicketsManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class TicketsManager extends A{async verifyEmail(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/tickets/email-verification`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async changePassword(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/tickets/password-change`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}}t.TicketsManager=TicketsManager},2521:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.UserBlocksManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class UserBlocksManager extends A{async deleteAll(e,t){o.validateRequiredRequestParams(e,["identifier"]);const n=o.applyQueryParams(e,[{key:"identifier",config:{}}]);const s=await this.request({path:`/user-blocks`,method:"DELETE",query:n},t);return o.VoidApiResponse.fromResponse(s)}async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/user-blocks/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getAll(e,t){o.validateRequiredRequestParams(e,["identifier"]);const n=o.applyQueryParams(e,[{key:"identifier",config:{}},{key:"consider_brute_force_enablement",config:{}}]);const s=await this.request({path:`/user-blocks`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"consider_brute_force_enablement",config:{}}]);const s=await this.request({path:`/user-blocks/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}}t.UserBlocksManager=UserBlocksManager},6207:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.UsersByEmailManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class UsersByEmailManager extends A{async getByEmail(e,t){o.validateRequiredRequestParams(e,["email"]);const n=o.applyQueryParams(e,[{key:"fields",config:{}},{key:"include_fields",config:{}},{key:"email",config:{}}]);const s=await this.request({path:`/users-by-email`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}}t.UsersByEmailManager=UsersByEmailManager},1713:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.UsersManager=void 0;const o=r(n(5467));const{BaseAPI:A}=o;class UsersManager extends A{async deleteAuthenticationMethods(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/users/{id}/authentication-methods`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async deleteAuthenticationMethod(e,t){o.validateRequiredRequestParams(e,["id","authentication_method_id"]);const n=await this.request({path:`/users/{id}/authentication-methods/{authentication_method_id}`.replace("{id}",encodeURIComponent(String(e.id))).replace("{authentication_method_id}",encodeURIComponent(String(e.authentication_method_id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async deleteAllAuthenticators(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/users/{id}/authenticators`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async deleteMultifactorProvider(e,t){o.validateRequiredRequestParams(e,["id","provider"]);const n=await this.request({path:`/users/{id}/multifactor/{provider}`.replace("{id}",encodeURIComponent(String(e.id))).replace("{provider}",encodeURIComponent(String(e.provider))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async deletePermissions(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/users/{id}/permissions`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async unlink(e,t){o.validateRequiredRequestParams(e,["id","provider","user_id"]);const n=await this.request({path:`/users/{id}/identities/{provider}/{user_id}`.replace("{id}",encodeURIComponent(String(e.id))).replace("{provider}",encodeURIComponent(String(e.provider))).replace("{user_id}",encodeURIComponent(String(e.user_id))),method:"DELETE"},t);return o.JSONApiResponse.fromResponse(n)}async deleteRoles(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/users/{id}/roles`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async delete(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/users/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE"},t);return o.VoidApiResponse.fromResponse(n)}async getAuthenticationMethods(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}}]);const s=await this.request({path:`/users/{id}/authentication-methods`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getAuthenticationMethod(e,t){o.validateRequiredRequestParams(e,["id","authentication_method_id"]);const n=await this.request({path:`/users/{id}/authentication-methods/{authentication_method_id}`.replace("{id}",encodeURIComponent(String(e.id))).replace("{authentication_method_id}",encodeURIComponent(String(e.authentication_method_id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async getEnrollments(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/users/{id}/enrollments`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET"},t);return o.JSONApiResponse.fromResponse(n)}async getLogs(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"sort",config:{}},{key:"include_totals",config:{}}]);const s=await this.request({path:`/users/{id}/logs`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getPermissions(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"per_page",config:{}},{key:"page",config:{}},{key:"include_totals",config:{}}]);const s=await this.request({path:`/users/{id}/permissions`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getUserOrganizations(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}}]);const s=await this.request({path:`/users/{id}/organizations`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getRoles(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"per_page",config:{}},{key:"page",config:{}},{key:"include_totals",config:{}}]);const s=await this.request({path:`/users/{id}/roles`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async getAll(e={},t){const n=o.applyQueryParams(e,[{key:"page",config:{}},{key:"per_page",config:{}},{key:"include_totals",config:{}},{key:"sort",config:{}},{key:"connection",config:{}},{key:"fields",config:{}},{key:"include_fields",config:{}},{key:"q",config:{}},{key:"search_engine",config:{}}]);const s=await this.request({path:`/users`,method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async get(e,t){o.validateRequiredRequestParams(e,["id"]);const n=o.applyQueryParams(e,[{key:"fields",config:{}},{key:"include_fields",config:{}}]);const s=await this.request({path:`/users/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"GET",query:n},t);return o.JSONApiResponse.fromResponse(s)}async updateAuthenticationMethod(e,t,n){o.validateRequiredRequestParams(e,["id","authentication_method_id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/users/{id}/authentication-methods/{authentication_method_id}`.replace("{id}",encodeURIComponent(String(e.id))).replace("{authentication_method_id}",encodeURIComponent(String(e.authentication_method_id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async update(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/users/{id}`.replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async createAuthenticationMethod(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/users/{id}/authentication-methods`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async link(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/users/{id}/identities`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}async invalidateRememberBrowser(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/users/{id}/multifactor/actions/invalidate-remember-browser`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST"},t);return o.VoidApiResponse.fromResponse(n)}async assignPermissions(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/users/{id}/permissions`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async regenerateRecoveryCode(e,t){o.validateRequiredRequestParams(e,["id"]);const n=await this.request({path:`/users/{id}/recovery-code-regeneration`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST"},t);return o.JSONApiResponse.fromResponse(n)}async assignRoles(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/users/{id}/roles`.replace("{id}",encodeURIComponent(String(e.id))),method:"POST",headers:s,body:t},n);return o.VoidApiResponse.fromResponse(i)}async create(e,t){const n={};n["Content-Type"]="application/json";const s=await this.request({path:`/users`,method:"POST",headers:n,body:e},t);return o.JSONApiResponse.fromResponse(s)}async updateAuthenticationMethods(e,t,n){o.validateRequiredRequestParams(e,["id"]);const s={};s["Content-Type"]="application/json";const i=await this.request({path:`/users/{id}/authentication-methods`.replace("{id}",encodeURIComponent(String(e.id))),method:"PUT",headers:s,body:t},n);return o.JSONApiResponse.fromResponse(i)}}t.UsersManager=UsersManager},195:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GetExecution200ResponseStatusEnum=t.GetEmailTemplatesByTemplateName200ResponseTemplateEnum=t.GetCredentials200ResponseInnerAlgEnum=t.GetBruteForceProtection200ResponseModeEnum=t.GetBruteForceProtection200ResponseShieldsEnum=t.GetBreachedPasswordDetection200ResponseStagePreUserRegistrationShieldsEnum=t.GetBreachedPasswordDetection200ResponseMethodEnum=t.GetBreachedPasswordDetection200ResponseAdminNotificationFrequencyEnum=t.GetBreachedPasswordDetection200ResponseShieldsEnum=t.GetAuthenticationMethods200ResponseOneOfInnerAuthenticationMethodsInnerTypeEnum=t.GetAuthenticationMethods200ResponseOneOfInnerPreferredAuthenticationMethodEnum=t.GetAuthenticationMethods200ResponseOneOfInnerTypeEnum=t.GetActions200ResponseActionsInnerSupportedTriggersInnerIdAnyOf=t.GetActions200ResponseActionsInnerIntegrationCurrentReleaseRequiredSecretsInnerTypeEnum=t.GetActions200ResponseActionsInnerIntegrationFeatureTypeEnum=t.GetActions200ResponseActionsInnerStatusEnum=t.GetActionVersions200ResponseVersionsInnerStatusEnum=t.FactorNameEnum=t.EnrollmentStatusEnum=t.EmailTemplateUpdateTemplateEnum=t.EmailProviderUpdateNameEnum=t.EmailProviderCreateNameEnum=t.DeviceCredentialCreateTypeEnum=t.DeviceCredentialTypeEnum=t.CustomDomainTypeEnum=t.CustomDomainStatusEnum=t.ConnectionUpdateOptionsSetUserRootAttributesEnum=t.ConnectionUpdateOptionsPasswordPolicyEnum=t.ConnectionCreateOptionsPasskeyOptionsChallengeUiEnum=t.ConnectionCreateOptionsSetUserRootAttributesEnum=t.ConnectionCreateOptionsPasswordPolicyEnum=t.ConnectionCreateStrategyEnum=t.ClientUpdateJwtConfigurationAlgEnum=t.ClientUpdateOrganizationRequireBehaviorEnum=t.ClientUpdateOrganizationUsageEnum=t.ClientUpdateAppTypeEnum=t.ClientUpdateTokenEndpointAuthMethodEnum=t.ClientRefreshTokenExpirationTypeEnum=t.ClientRefreshTokenRotationTypeEnum=t.ClientJwtConfigurationAlgEnum=t.ClientCreateJwtConfigurationAlgEnum=t.ClientCreateClientAuthenticationMethodsPrivateKeyJwtCredentialsInnerAlgEnum=t.ClientCreateClientAuthenticationMethodsPrivateKeyJwtCredentialsInnerCredentialTypeEnum=t.ClientCreateOrganizationRequireBehaviorEnum=t.ClientCreateOrganizationUsageEnum=t.ClientCreateAppTypeEnum=t.ClientCreateTokenEndpointAuthMethodEnum=t.ClientOrganizationRequireBehaviorEnum=t.ClientOrganizationUsageEnum=t.ClientTokenEndpointAuthMethodEnum=void 0;t.PostBrandingThemeRequestBordersInputsStyleEnum=t.PostBrandingThemeRequestBordersButtonsStyleEnum=t.PostAuthenticationMethodsRequestPreferredAuthenticationMethodEnum=t.PostAuthenticationMethodsRequestTypeEnum=t.PostAuthenticationMethods201ResponsePreferredAuthenticationMethodEnum=t.PostAuthenticationMethods201ResponseTypeEnum=t.PatchSuspiciousIpThrottlingRequestShieldsEnum=t.PatchLogStreamsByIdRequestSinkOneOf3MixpanelRegionEnum=t.PatchLogStreamsByIdRequestSinkOneOfDatadogRegionEnum=t.PatchLogStreamsByIdRequestStatusEnum=t.PatchEmailTemplatesByTemplateNameRequestTemplateEnum=t.PatchCustomDomainsByIdRequestCustomClientIpHeaderEnum=t.PatchCustomDomainsByIdRequestTlsPolicyEnum=t.PatchBruteForceProtectionRequestModeEnum=t.PatchBruteForceProtectionRequestShieldsEnum=t.PatchBreachedPasswordDetectionRequestStagePreUserRegistrationShieldsEnum=t.PatchBreachedPasswordDetectionRequestMethodEnum=t.PatchBreachedPasswordDetectionRequestAdminNotificationFrequencyEnum=t.PatchBreachedPasswordDetectionRequestShieldsEnum=t.PatchBindingsRequestBindingsInnerOneOfRefTypeEnum=t.PatchAuthenticationMethodsByAuthenticationMethodIdRequestPreferredAuthenticationMethodEnum=t.JobFormatEnum=t.HookCreateTriggerIdEnum=t.GetSuspiciousIpThrottling200ResponseShieldsEnum=t.GetPnProviders200ResponseProviderEnum=t.GetPhoneProviders200ResponseProviderEnum=t.GetMessageTypes200ResponseMessageTypesEnum=t.GetLogStreams200ResponseInnerOneOfSinkHttpContentFormatEnum=t.GetLogStreams200ResponseInnerOneOfFiltersInnerNameEnum=t.GetLogStreams200ResponseInnerOneOfFiltersInnerTypeEnum=t.GetLogStreams200ResponseInnerOneOf7SinkMixpanelRegionEnum=t.GetLogStreams200ResponseInnerOneOf7TypeEnum=t.GetLogStreams200ResponseInnerOneOf7StatusEnum=t.GetLogStreams200ResponseInnerOneOf6TypeEnum=t.GetLogStreams200ResponseInnerOneOf6StatusEnum=t.GetLogStreams200ResponseInnerOneOf5TypeEnum=t.GetLogStreams200ResponseInnerOneOf5StatusEnum=t.GetLogStreams200ResponseInnerOneOf4TypeEnum=t.GetLogStreams200ResponseInnerOneOf4StatusEnum=t.GetLogStreams200ResponseInnerOneOf3SinkDatadogRegionEnum=t.GetLogStreams200ResponseInnerOneOf3TypeEnum=t.GetLogStreams200ResponseInnerOneOf3StatusEnum=t.GetLogStreams200ResponseInnerOneOf2SinkAzureRegionEnum=t.GetLogStreams200ResponseInnerOneOf2TypeEnum=t.GetLogStreams200ResponseInnerOneOf2StatusEnum=t.GetLogStreams200ResponseInnerOneOf1SinkAwsRegionEnum=t.GetLogStreams200ResponseInnerOneOf1TypeEnum=t.GetLogStreams200ResponseInnerOneOf1StatusEnum=t.GetLogStreams200ResponseInnerOneOfTypeEnum=t.GetLogStreams200ResponseInnerOneOfStatusEnum=void 0;t.TenantSettingsUpdateFlagsChangePwdFlowV1Enum=t.TenantSettingsUpdateDeviceFlowCharsetEnum=t.TenantSettingsUpdateEnabledLocalesEnum=t.TenantSettingsSessionCookieModeEnum=t.TenantSettingsDeviceFlowCharsetEnum=t.TenantSettingsEnabledLocalesEnum=t.ResourceServerUpdateTokenDialectEnum=t.ResourceServerUpdateSigningAlgEnum=t.ResourceServerCreateTokenDialectEnum=t.ResourceServerCreateSigningAlgEnum=t.ResourceServerTokenDialectEnum=t.ResourceServerSigningAlgEnum=t.PutAuthenticationMethodsRequestInnerPreferredAuthenticationMethodEnum=t.PutAuthenticationMethodsRequestInnerTypeEnum=t.PutAuthenticationMethods200ResponseInnerAuthenticationMethodsInnerTypeEnum=t.PutAuthenticationMethods200ResponseInnerPreferredAuthenticationMethodEnum=t.PutAuthenticationMethods200ResponseInnerTypeEnum=t.PromptsSettingsUpdateUniversalLoginExperienceEnum=t.PromptsSettingsUniversalLoginExperienceEnum=t.PostVerify200ResponseTypeEnum=t.PostVerify200ResponseStatusEnum=t.PostVerificationEmailRequestIdentityProviderEnum=t.PostUsersExportsRequestFormatEnum=t.PostLogStreamsRequestOneOfFiltersInnerNameEnum=t.PostLogStreamsRequestOneOfFiltersInnerTypeEnum=t.PostLogStreamsRequestOneOf7TypeEnum=t.PostLogStreamsRequestOneOf6TypeEnum=t.PostLogStreamsRequestOneOf5TypeEnum=t.PostLogStreamsRequestOneOf4TypeEnum=t.PostLogStreamsRequestOneOf3TypeEnum=t.PostLogStreamsRequestOneOf2SinkAzureRegionEnum=t.PostLogStreamsRequestOneOf2TypeEnum=t.PostLogStreamsRequestOneOf1SinkAwsRegionEnum=t.PostLogStreamsRequestOneOf1TypeEnum=t.PostLogStreamsRequestOneOfTypeEnum=t.PostIdentitiesRequestProviderEnum=t.PostEmailTemplatesRequestTemplateEnum=t.PostCustomDomainsRequestCustomClientIpHeaderEnum=t.PostCustomDomainsRequestTlsPolicyEnum=t.PostCustomDomainsRequestVerificationMethodEnum=t.PostCustomDomainsRequestTypeEnum=t.PostCustomDomains201ResponseVerificationMethodsInnerNameEnum=t.PostCustomDomains201ResponseTypeEnum=t.PostCustomDomains201ResponseStatusEnum=t.PostCredentialsRequestCredentialTypeEnum=t.PostBrandingThemeRequestWidgetSocialButtonsLayoutEnum=t.PostBrandingThemeRequestWidgetLogoPositionEnum=t.PostBrandingThemeRequestWidgetHeaderTextAlignmentEnum=t.PostBrandingThemeRequestPageBackgroundPageLayoutEnum=t.PostBrandingThemeRequestFontsLinksStyleEnum=void 0;t.GetUsersSearchEngineEnum=t.DeleteUserIdentityByUserIdProviderEnum=t.DeleteMultifactorByProviderProviderEnum=t.PutCustomTextByLanguageLanguageEnum=t.PutCustomTextByLanguagePromptEnum=t.GetCustomTextByLanguageLanguageEnum=t.GetCustomTextByLanguagePromptEnum=t.GetHooksTriggerIdEnum=t.PutFactorsByNameOperationNameEnum=t.PutEmailTemplatesByTemplateNameTemplateNameEnum=t.PatchEmailTemplatesByTemplateNameOperationTemplateNameEnum=t.GetEmailTemplatesByTemplateNameTemplateNameEnum=t.GetDeviceCredentialsTypeEnum=t.GetConnectionsStrategyEnum=t.UserEnrollmentAuthMethodEnum=t.UserEnrollmentStatusEnum=void 0;t.ClientTokenEndpointAuthMethodEnum={none:"none",client_secret_post:"client_secret_post",client_secret_basic:"client_secret_basic"};t.ClientOrganizationUsageEnum={deny:"deny",allow:"allow",require:"require"};t.ClientOrganizationRequireBehaviorEnum={no_prompt:"no_prompt",pre_login_prompt:"pre_login_prompt",post_login_prompt:"post_login_prompt"};t.ClientCreateTokenEndpointAuthMethodEnum={none:"none",client_secret_post:"client_secret_post",client_secret_basic:"client_secret_basic"};t.ClientCreateAppTypeEnum={native:"native",spa:"spa",regular_web:"regular_web",non_interactive:"non_interactive",rms:"rms",box:"box",cloudbees:"cloudbees",concur:"concur",dropbox:"dropbox",mscrm:"mscrm",echosign:"echosign",egnyte:"egnyte",newrelic:"newrelic",office365:"office365",salesforce:"salesforce",sentry:"sentry",sharepoint:"sharepoint",slack:"slack",springcm:"springcm",zendesk:"zendesk",zoom:"zoom",sso_integration:"sso_integration",oag:"oag"};t.ClientCreateOrganizationUsageEnum={deny:"deny",allow:"allow",require:"require"};t.ClientCreateOrganizationRequireBehaviorEnum={no_prompt:"no_prompt",pre_login_prompt:"pre_login_prompt",post_login_prompt:"post_login_prompt"};t.ClientCreateClientAuthenticationMethodsPrivateKeyJwtCredentialsInnerCredentialTypeEnum={public_key:"public_key"};t.ClientCreateClientAuthenticationMethodsPrivateKeyJwtCredentialsInnerAlgEnum={RS256:"RS256",RS384:"RS384",PS256:"PS256"};t.ClientCreateJwtConfigurationAlgEnum={HS256:"HS256",RS256:"RS256",PS256:"PS256"};t.ClientJwtConfigurationAlgEnum={HS256:"HS256",RS256:"RS256",PS256:"PS256"};t.ClientRefreshTokenRotationTypeEnum={rotating:"rotating",non_rotating:"non-rotating"};t.ClientRefreshTokenExpirationTypeEnum={expiring:"expiring",non_expiring:"non-expiring"};t.ClientUpdateTokenEndpointAuthMethodEnum={none:"none",client_secret_post:"client_secret_post",client_secret_basic:"client_secret_basic",null:"null"};t.ClientUpdateAppTypeEnum={native:"native",spa:"spa",regular_web:"regular_web",non_interactive:"non_interactive",rms:"rms",box:"box",cloudbees:"cloudbees",concur:"concur",dropbox:"dropbox",mscrm:"mscrm",echosign:"echosign",egnyte:"egnyte",newrelic:"newrelic",office365:"office365",salesforce:"salesforce",sentry:"sentry",sharepoint:"sharepoint",slack:"slack",springcm:"springcm",zendesk:"zendesk",zoom:"zoom",sso_integration:"sso_integration",oag:"oag"};t.ClientUpdateOrganizationUsageEnum={deny:"deny",allow:"allow",require:"require"};t.ClientUpdateOrganizationRequireBehaviorEnum={no_prompt:"no_prompt",pre_login_prompt:"pre_login_prompt",post_login_prompt:"post_login_prompt"};t.ClientUpdateJwtConfigurationAlgEnum={HS256:"HS256",RS256:"RS256",PS256:"PS256"};t.ConnectionCreateStrategyEnum={ad:"ad",adfs:"adfs",amazon:"amazon",apple:"apple",dropbox:"dropbox",bitbucket:"bitbucket",aol:"aol",auth0_oidc:"auth0-oidc",auth0:"auth0",baidu:"baidu",bitly:"bitly",box:"box",custom:"custom",daccount:"daccount",dwolla:"dwolla",email:"email",evernote_sandbox:"evernote-sandbox",evernote:"evernote",exact:"exact",facebook:"facebook",fitbit:"fitbit",flickr:"flickr",github:"github",google_apps:"google-apps",google_oauth2:"google-oauth2",instagram:"instagram",ip:"ip",line:"line",linkedin:"linkedin",miicard:"miicard",oauth1:"oauth1",oauth2:"oauth2",office365:"office365",oidc:"oidc",okta:"okta",paypal:"paypal",paypal_sandbox:"paypal-sandbox",pingfederate:"pingfederate",planningcenter:"planningcenter",renren:"renren",salesforce_community:"salesforce-community",salesforce_sandbox:"salesforce-sandbox",salesforce:"salesforce",samlp:"samlp",sharepoint:"sharepoint",shopify:"shopify",sms:"sms",soundcloud:"soundcloud",thecity_sandbox:"thecity-sandbox",thecity:"thecity",thirtysevensignals:"thirtysevensignals",twitter:"twitter",untappd:"untappd",vkontakte:"vkontakte",waad:"waad",weibo:"weibo",windowslive:"windowslive",wordpress:"wordpress",yahoo:"yahoo",yammer:"yammer",yandex:"yandex"};t.ConnectionCreateOptionsPasswordPolicyEnum={none:"none",low:"low",fair:"fair",good:"good",excellent:"excellent",null:"null"};t.ConnectionCreateOptionsSetUserRootAttributesEnum={each_login:"on_each_login",first_login:"on_first_login"};t.ConnectionCreateOptionsPasskeyOptionsChallengeUiEnum={both:"both",autofill:"autofill",button:"button"};t.ConnectionUpdateOptionsPasswordPolicyEnum={none:"none",low:"low",fair:"fair",good:"good",excellent:"excellent",null:"null"};t.ConnectionUpdateOptionsSetUserRootAttributesEnum={each_login:"on_each_login",first_login:"on_first_login"};t.CustomDomainStatusEnum={disabled:"disabled",pending:"pending",pending_verification:"pending_verification",ready:"ready"};t.CustomDomainTypeEnum={auth0_managed_certs:"auth0_managed_certs",self_managed_certs:"self_managed_certs"};t.DeviceCredentialTypeEnum={public_key:"public_key",refresh_token:"refresh_token",rotating_refresh_token:"rotating_refresh_token"};t.DeviceCredentialCreateTypeEnum={public_key:"public_key"};t.EmailProviderCreateNameEnum={mailgun:"mailgun",mandrill:"mandrill",sendgrid:"sendgrid",ses:"ses",sparkpost:"sparkpost",smtp:"smtp",azure_cs:"azure_cs",ms365:"ms365"};t.EmailProviderUpdateNameEnum={mailgun:"mailgun",mandrill:"mandrill",sendgrid:"sendgrid",ses:"ses",sparkpost:"sparkpost",smtp:"smtp",azure_cs:"azure_cs",ms365:"ms365"};t.EmailTemplateUpdateTemplateEnum={verify_email:"verify_email",verify_email_by_code:"verify_email_by_code",reset_email:"reset_email",welcome_email:"welcome_email",blocked_account:"blocked_account",stolen_credentials:"stolen_credentials",enrollment_email:"enrollment_email",mfa_oob_code:"mfa_oob_code",user_invitation:"user_invitation",change_password:"change_password",password_reset:"password_reset"};t.EnrollmentStatusEnum={pending:"pending",confirmed:"confirmed"};t.FactorNameEnum={push_notification:"push-notification",sms:"sms",email:"email",duo:"duo",otp:"otp",webauthn_roaming:"webauthn-roaming",webauthn_platform:"webauthn-platform",recovery_code:"recovery-code"};t.GetActionVersions200ResponseVersionsInnerStatusEnum={pending:"pending",building:"building",packaged:"packaged",built:"built",retrying:"retrying",failed:"failed"};t.GetActions200ResponseActionsInnerStatusEnum={pending:"pending",building:"building",packaged:"packaged",built:"built",retrying:"retrying",failed:"failed"};t.GetActions200ResponseActionsInnerIntegrationFeatureTypeEnum={unspecified:"unspecified",action:"action",social_connection:"social_connection",log_stream:"log_stream",sso_integration:"sso_integration",sms_provider:"sms_provider"};t.GetActions200ResponseActionsInnerIntegrationCurrentReleaseRequiredSecretsInnerTypeEnum={UNSPECIFIED:"UNSPECIFIED",STRING:"STRING"};t.GetActions200ResponseActionsInnerSupportedTriggersInnerIdAnyOf={post_login:"post-login",credentials_exchange:"credentials-exchange",pre_user_registration:"pre-user-registration",post_user_registration:"post-user-registration",post_change_password:"post-change-password",send_phone_message:"send-phone-message",iga_approval:"iga-approval",iga_certification:"iga-certification",iga_fulfillment_assignment:"iga-fulfillment-assignment",iga_fulfillment_execution:"iga-fulfillment-execution",password_reset_post_challenge:"password-reset-post-challenge"};t.GetAuthenticationMethods200ResponseOneOfInnerTypeEnum={recovery_code:"recovery-code",totp:"totp",push:"push",phone:"phone",email:"email",email_verification:"email-verification",webauthn_roaming:"webauthn-roaming",webauthn_platform:"webauthn-platform",guardian:"guardian",passkey:"passkey"};t.GetAuthenticationMethods200ResponseOneOfInnerPreferredAuthenticationMethodEnum={sms:"sms",voice:"voice"};t.GetAuthenticationMethods200ResponseOneOfInnerAuthenticationMethodsInnerTypeEnum={totp:"totp",push:"push",sms:"sms",voice:"voice"};t.GetBreachedPasswordDetection200ResponseShieldsEnum={block:"block",user_notification:"user_notification",admin_notification:"admin_notification"};t.GetBreachedPasswordDetection200ResponseAdminNotificationFrequencyEnum={immediately:"immediately",daily:"daily",weekly:"weekly",monthly:"monthly"};t.GetBreachedPasswordDetection200ResponseMethodEnum={standard:"standard",enhanced:"enhanced"};t.GetBreachedPasswordDetection200ResponseStagePreUserRegistrationShieldsEnum={block:"block",admin_notification:"admin_notification"};t.GetBruteForceProtection200ResponseShieldsEnum={block:"block",user_notification:"user_notification"};t.GetBruteForceProtection200ResponseModeEnum={identifier_and_ip:"count_per_identifier_and_ip",identifier:"count_per_identifier"};t.GetCredentials200ResponseInnerAlgEnum={RS256:"RS256",RS384:"RS384",PS256:"PS256"};t.GetEmailTemplatesByTemplateName200ResponseTemplateEnum={verify_email:"verify_email",verify_email_by_code:"verify_email_by_code",reset_email:"reset_email",welcome_email:"welcome_email",blocked_account:"blocked_account",stolen_credentials:"stolen_credentials",enrollment_email:"enrollment_email",mfa_oob_code:"mfa_oob_code",user_invitation:"user_invitation",change_password:"change_password",password_reset:"password_reset"};t.GetExecution200ResponseStatusEnum={unspecified:"unspecified",pending:"pending",final:"final",partial:"partial",canceled:"canceled",suspended:"suspended"};t.GetLogStreams200ResponseInnerOneOfStatusEnum={active:"active",paused:"paused",suspended:"suspended"};t.GetLogStreams200ResponseInnerOneOfTypeEnum={http:"http"};t.GetLogStreams200ResponseInnerOneOf1StatusEnum={active:"active",paused:"paused",suspended:"suspended"};t.GetLogStreams200ResponseInnerOneOf1TypeEnum={eventbridge:"eventbridge"};t.GetLogStreams200ResponseInnerOneOf1SinkAwsRegionEnum={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_southeast_1:"ap-southeast-1",ap_southeast_2:"ap-southeast-2",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_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_gov_east_1:"us-gov-east-1",us_gov_west_1:"us-gov-west-1",us_east_1:"us-east-1",us_east_2:"us-east-2",us_west_1:"us-west-1",us_west_2:"us-west-2"};t.GetLogStreams200ResponseInnerOneOf2StatusEnum={active:"active",paused:"paused",suspended:"suspended"};t.GetLogStreams200ResponseInnerOneOf2TypeEnum={eventgrid:"eventgrid"};t.GetLogStreams200ResponseInnerOneOf2SinkAzureRegionEnum={australiacentral:"australiacentral",australiaeast:"australiaeast",australiasoutheast:"australiasoutheast",brazilsouth:"brazilsouth",canadacentral:"canadacentral",canadaeast:"canadaeast",centralindia:"centralindia",centralus:"centralus",eastasia:"eastasia",eastus:"eastus",eastus2:"eastus2",francecentral:"francecentral",germanywestcentral:"germanywestcentral",japaneast:"japaneast",japanwest:"japanwest",koreacentral:"koreacentral",koreasouth:"koreasouth",northcentralus:"northcentralus",northeurope:"northeurope",norwayeast:"norwayeast",southafricanorth:"southafricanorth",southcentralus:"southcentralus",southeastasia:"southeastasia",southindia:"southindia",switzerlandnorth:"switzerlandnorth",uaenorth:"uaenorth",uksouth:"uksouth",ukwest:"ukwest",westcentralus:"westcentralus",westeurope:"westeurope",westindia:"westindia",westus:"westus",westus2:"westus2"};t.GetLogStreams200ResponseInnerOneOf3StatusEnum={active:"active",paused:"paused",suspended:"suspended"};t.GetLogStreams200ResponseInnerOneOf3TypeEnum={datadog:"datadog"};t.GetLogStreams200ResponseInnerOneOf3SinkDatadogRegionEnum={us:"us",eu:"eu",us3:"us3",us5:"us5"};t.GetLogStreams200ResponseInnerOneOf4StatusEnum={active:"active",paused:"paused",suspended:"suspended"};t.GetLogStreams200ResponseInnerOneOf4TypeEnum={splunk:"splunk"};t.GetLogStreams200ResponseInnerOneOf5StatusEnum={active:"active",paused:"paused",suspended:"suspended"};t.GetLogStreams200ResponseInnerOneOf5TypeEnum={sumo:"sumo"};t.GetLogStreams200ResponseInnerOneOf6StatusEnum={active:"active",paused:"paused",suspended:"suspended"};t.GetLogStreams200ResponseInnerOneOf6TypeEnum={segment:"segment"};t.GetLogStreams200ResponseInnerOneOf7StatusEnum={active:"active",paused:"paused",suspended:"suspended"};t.GetLogStreams200ResponseInnerOneOf7TypeEnum={mixpanel:"mixpanel"};t.GetLogStreams200ResponseInnerOneOf7SinkMixpanelRegionEnum={us:"us",eu:"eu"};t.GetLogStreams200ResponseInnerOneOfFiltersInnerTypeEnum={category:"category"};t.GetLogStreams200ResponseInnerOneOfFiltersInnerNameEnum={auth_ancillary_fail:"auth.ancillary.fail",auth_ancillary_success:"auth.ancillary.success",auth_login_fail:"auth.login.fail",auth_login_notification:"auth.login.notification",auth_login_success:"auth.login.success",auth_logout_fail:"auth.logout.fail",auth_logout_success:"auth.logout.success",auth_signup_fail:"auth.signup.fail",auth_signup_success:"auth.signup.success",auth_silent_auth_fail:"auth.silent_auth.fail",auth_silent_auth_success:"auth.silent_auth.success",auth_token_exchange_fail:"auth.token_exchange.fail",auth_token_exchange_success:"auth.token_exchange.success",management_fail:"management.fail",management_success:"management.success",system_notification:"system.notification",user_fail:"user.fail",user_notification:"user.notification",user_success:"user.success",other:"other"};t.GetLogStreams200ResponseInnerOneOfSinkHttpContentFormatEnum={JSONARRAY:"JSONARRAY",JSONLINES:"JSONLINES",JSONOBJECT:"JSONOBJECT"};t.GetMessageTypes200ResponseMessageTypesEnum={sms:"sms",voice:"voice"};t.GetPhoneProviders200ResponseProviderEnum={auth0:"auth0",twilio:"twilio",phone_message_hook:"phone-message-hook"};t.GetPnProviders200ResponseProviderEnum={guardian:"guardian",sns:"sns",direct:"direct"};t.GetSuspiciousIpThrottling200ResponseShieldsEnum={block:"block",admin_notification:"admin_notification"};t.HookCreateTriggerIdEnum={credentials_exchange:"credentials-exchange",pre_user_registration:"pre-user-registration",post_user_registration:"post-user-registration",post_change_password:"post-change-password",send_phone_message:"send-phone-message"};t.JobFormatEnum={json:"json",csv:"csv"};t.PatchAuthenticationMethodsByAuthenticationMethodIdRequestPreferredAuthenticationMethodEnum={voice:"voice",sms:"sms"};t.PatchBindingsRequestBindingsInnerOneOfRefTypeEnum={binding_id:"binding_id",action_id:"action_id",action_name:"action_name"};t.PatchBreachedPasswordDetectionRequestShieldsEnum={block:"block",user_notification:"user_notification",admin_notification:"admin_notification"};t.PatchBreachedPasswordDetectionRequestAdminNotificationFrequencyEnum={immediately:"immediately",daily:"daily",weekly:"weekly",monthly:"monthly"};t.PatchBreachedPasswordDetectionRequestMethodEnum={standard:"standard",enhanced:"enhanced"};t.PatchBreachedPasswordDetectionRequestStagePreUserRegistrationShieldsEnum={block:"block",admin_notification:"admin_notification"};t.PatchBruteForceProtectionRequestShieldsEnum={block:"block",user_notification:"user_notification"};t.PatchBruteForceProtectionRequestModeEnum={identifier_and_ip:"count_per_identifier_and_ip",identifier:"count_per_identifier"};t.PatchCustomDomainsByIdRequestTlsPolicyEnum={recommended:"recommended",compatible:"compatible"};t.PatchCustomDomainsByIdRequestCustomClientIpHeaderEnum={true_client_ip:"true-client-ip",cf_connecting_ip:"cf-connecting-ip",x_forwarded_for:"x-forwarded-for",x_azure_clientip:"x-azure-clientip",empty:""};t.PatchEmailTemplatesByTemplateNameRequestTemplateEnum={verify_email:"verify_email",verify_email_by_code:"verify_email_by_code",reset_email:"reset_email",welcome_email:"welcome_email",blocked_account:"blocked_account",stolen_credentials:"stolen_credentials",enrollment_email:"enrollment_email",mfa_oob_code:"mfa_oob_code",user_invitation:"user_invitation",change_password:"change_password",password_reset:"password_reset"};t.PatchLogStreamsByIdRequestStatusEnum={active:"active",paused:"paused",suspended:"suspended"};t.PatchLogStreamsByIdRequestSinkOneOfDatadogRegionEnum={us:"us",eu:"eu",us3:"us3",us5:"us5"};t.PatchLogStreamsByIdRequestSinkOneOf3MixpanelRegionEnum={us:"us",eu:"eu"};t.PatchSuspiciousIpThrottlingRequestShieldsEnum={block:"block",admin_notification:"admin_notification"};t.PostAuthenticationMethods201ResponseTypeEnum={phone:"phone",email:"email",totp:"totp",webauthn_roaming:"webauthn-roaming"};t.PostAuthenticationMethods201ResponsePreferredAuthenticationMethodEnum={voice:"voice",sms:"sms"};t.PostAuthenticationMethodsRequestTypeEnum={phone:"phone",email:"email",totp:"totp",webauthn_roaming:"webauthn-roaming"};t.PostAuthenticationMethodsRequestPreferredAuthenticationMethodEnum={voice:"voice",sms:"sms"};t.PostBrandingThemeRequestBordersButtonsStyleEnum={pill:"pill",rounded:"rounded",sharp:"sharp"};t.PostBrandingThemeRequestBordersInputsStyleEnum={pill:"pill",rounded:"rounded",sharp:"sharp"};t.PostBrandingThemeRequestFontsLinksStyleEnum={normal:"normal",underlined:"underlined"};t.PostBrandingThemeRequestPageBackgroundPageLayoutEnum={center:"center",left:"left",right:"right"};t.PostBrandingThemeRequestWidgetHeaderTextAlignmentEnum={center:"center",left:"left",right:"right"};t.PostBrandingThemeRequestWidgetLogoPositionEnum={center:"center",left:"left",none:"none",right:"right"};t.PostBrandingThemeRequestWidgetSocialButtonsLayoutEnum={bottom:"bottom",top:"top"};t.PostCredentialsRequestCredentialTypeEnum={public_key:"public_key",cert_subject_dn:"cert_subject_dn",x509_cert:"x509_cert"};t.PostCustomDomains201ResponseStatusEnum={disabled:"disabled",pending:"pending",pending_verification:"pending_verification",ready:"ready"};t.PostCustomDomains201ResponseTypeEnum={auth0_managed_certs:"auth0_managed_certs",self_managed_certs:"self_managed_certs"};t.PostCustomDomains201ResponseVerificationMethodsInnerNameEnum={cname:"cname",txt:"txt"};t.PostCustomDomainsRequestTypeEnum={auth0_managed_certs:"auth0_managed_certs",self_managed_certs:"self_managed_certs"};t.PostCustomDomainsRequestVerificationMethodEnum={txt:"txt"};t.PostCustomDomainsRequestTlsPolicyEnum={recommended:"recommended",compatible:"compatible"};t.PostCustomDomainsRequestCustomClientIpHeaderEnum={true_client_ip:"true-client-ip",cf_connecting_ip:"cf-connecting-ip",x_forwarded_for:"x-forwarded-for",x_azure_clientip:"x-azure-clientip",null:"null"};t.PostEmailTemplatesRequestTemplateEnum={verify_email:"verify_email",verify_email_by_code:"verify_email_by_code",reset_email:"reset_email",welcome_email:"welcome_email",blocked_account:"blocked_account",stolen_credentials:"stolen_credentials",enrollment_email:"enrollment_email",mfa_oob_code:"mfa_oob_code",user_invitation:"user_invitation",change_password:"change_password",password_reset:"password_reset"};t.PostIdentitiesRequestProviderEnum={ad:"ad",adfs:"adfs",amazon:"amazon",apple:"apple",dropbox:"dropbox",bitbucket:"bitbucket",aol:"aol",auth0_oidc:"auth0-oidc",auth0:"auth0",baidu:"baidu",bitly:"bitly",box:"box",custom:"custom",daccount:"daccount",dwolla:"dwolla",email:"email",evernote_sandbox:"evernote-sandbox",evernote:"evernote",exact:"exact",facebook:"facebook",fitbit:"fitbit",flickr:"flickr",github:"github",google_apps:"google-apps",google_oauth2:"google-oauth2",instagram:"instagram",ip:"ip",line:"line",linkedin:"linkedin",miicard:"miicard",oauth1:"oauth1",oauth2:"oauth2",office365:"office365",oidc:"oidc",okta:"okta",paypal:"paypal",paypal_sandbox:"paypal-sandbox",pingfederate:"pingfederate",planningcenter:"planningcenter",renren:"renren",salesforce_community:"salesforce-community",salesforce_sandbox:"salesforce-sandbox",salesforce:"salesforce",samlp:"samlp",sharepoint:"sharepoint",shopify:"shopify",sms:"sms",soundcloud:"soundcloud",thecity_sandbox:"thecity-sandbox",thecity:"thecity",thirtysevensignals:"thirtysevensignals",twitter:"twitter",untappd:"untappd",vkontakte:"vkontakte",waad:"waad",weibo:"weibo",windowslive:"windowslive",wordpress:"wordpress",yahoo:"yahoo",yammer:"yammer",yandex:"yandex"};t.PostLogStreamsRequestOneOfTypeEnum={http:"http"};t.PostLogStreamsRequestOneOf1TypeEnum={eventbridge:"eventbridge"};t.PostLogStreamsRequestOneOf1SinkAwsRegionEnum={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_southeast_1:"ap-southeast-1",ap_southeast_2:"ap-southeast-2",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_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_gov_east_1:"us-gov-east-1",us_gov_west_1:"us-gov-west-1",us_east_1:"us-east-1",us_east_2:"us-east-2",us_west_1:"us-west-1",us_west_2:"us-west-2"};t.PostLogStreamsRequestOneOf2TypeEnum={eventgrid:"eventgrid"};t.PostLogStreamsRequestOneOf2SinkAzureRegionEnum={australiacentral:"australiacentral",australiaeast:"australiaeast",australiasoutheast:"australiasoutheast",brazilsouth:"brazilsouth",canadacentral:"canadacentral",canadaeast:"canadaeast",centralindia:"centralindia",centralus:"centralus",eastasia:"eastasia",eastus:"eastus",eastus2:"eastus2",francecentral:"francecentral",germanywestcentral:"germanywestcentral",japaneast:"japaneast",japanwest:"japanwest",koreacentral:"koreacentral",koreasouth:"koreasouth",northcentralus:"northcentralus",northeurope:"northeurope",norwayeast:"norwayeast",southafricanorth:"southafricanorth",southcentralus:"southcentralus",southeastasia:"southeastasia",southindia:"southindia",switzerlandnorth:"switzerlandnorth",uaenorth:"uaenorth",uksouth:"uksouth",ukwest:"ukwest",westcentralus:"westcentralus",westeurope:"westeurope",westindia:"westindia",westus:"westus",westus2:"westus2"};t.PostLogStreamsRequestOneOf3TypeEnum={datadog:"datadog"};t.PostLogStreamsRequestOneOf4TypeEnum={splunk:"splunk"};t.PostLogStreamsRequestOneOf5TypeEnum={sumo:"sumo"};t.PostLogStreamsRequestOneOf6TypeEnum={segment:"segment"};t.PostLogStreamsRequestOneOf7TypeEnum={mixpanel:"mixpanel"};t.PostLogStreamsRequestOneOfFiltersInnerTypeEnum={category:"category"};t.PostLogStreamsRequestOneOfFiltersInnerNameEnum={auth_ancillary_fail:"auth.ancillary.fail",auth_ancillary_success:"auth.ancillary.success",auth_login_fail:"auth.login.fail",auth_login_notification:"auth.login.notification",auth_login_success:"auth.login.success",auth_logout_fail:"auth.logout.fail",auth_logout_success:"auth.logout.success",auth_signup_fail:"auth.signup.fail",auth_signup_success:"auth.signup.success",auth_silent_auth_fail:"auth.silent_auth.fail",auth_silent_auth_success:"auth.silent_auth.success",auth_token_exchange_fail:"auth.token_exchange.fail",auth_token_exchange_success:"auth.token_exchange.success",management_fail:"management.fail",management_success:"management.success",system_notification:"system.notification",user_fail:"user.fail",user_notification:"user.notification",user_success:"user.success",other:"other"};t.PostUsersExportsRequestFormatEnum={json:"json",csv:"csv"};t.PostVerificationEmailRequestIdentityProviderEnum={ad:"ad",adfs:"adfs",amazon:"amazon",apple:"apple",dropbox:"dropbox",bitbucket:"bitbucket",aol:"aol",auth0_oidc:"auth0-oidc",auth0:"auth0",baidu:"baidu",bitly:"bitly",box:"box",custom:"custom",daccount:"daccount",dwolla:"dwolla",email:"email",evernote_sandbox:"evernote-sandbox",evernote:"evernote",exact:"exact",facebook:"facebook",fitbit:"fitbit",flickr:"flickr",github:"github",google_apps:"google-apps",google_oauth2:"google-oauth2",instagram:"instagram",ip:"ip",line:"line",linkedin:"linkedin",miicard:"miicard",oauth1:"oauth1",oauth2:"oauth2",office365:"office365",oidc:"oidc",okta:"okta",paypal:"paypal",paypal_sandbox:"paypal-sandbox",pingfederate:"pingfederate",planningcenter:"planningcenter",renren:"renren",salesforce_community:"salesforce-community",salesforce_sandbox:"salesforce-sandbox",salesforce:"salesforce",samlp:"samlp",sharepoint:"sharepoint",shopify:"shopify",sms:"sms",soundcloud:"soundcloud",thecity_sandbox:"thecity-sandbox",thecity:"thecity",thirtysevensignals:"thirtysevensignals",twitter:"twitter",untappd:"untappd",vkontakte:"vkontakte",waad:"waad",weibo:"weibo",windowslive:"windowslive",wordpress:"wordpress",yahoo:"yahoo",yammer:"yammer",yandex:"yandex"};t.PostVerify200ResponseStatusEnum={disabled:"disabled",pending:"pending",pending_verification:"pending_verification",ready:"ready"};t.PostVerify200ResponseTypeEnum={auth0_managed_certs:"auth0_managed_certs",self_managed_certs:"self_managed_certs"};t.PromptsSettingsUniversalLoginExperienceEnum={new:"new",classic:"classic"};t.PromptsSettingsUpdateUniversalLoginExperienceEnum={new:"new",classic:"classic"};t.PutAuthenticationMethods200ResponseInnerTypeEnum={phone:"phone",email:"email",totp:"totp",webauthn_roaming:"webauthn-roaming"};t.PutAuthenticationMethods200ResponseInnerPreferredAuthenticationMethodEnum={voice:"voice",sms:"sms"};t.PutAuthenticationMethods200ResponseInnerAuthenticationMethodsInnerTypeEnum={totp:"totp",push:"push",sms:"sms",voice:"voice"};t.PutAuthenticationMethodsRequestInnerTypeEnum={phone:"phone",email:"email",totp:"totp"};t.PutAuthenticationMethodsRequestInnerPreferredAuthenticationMethodEnum={voice:"voice",sms:"sms"};t.ResourceServerSigningAlgEnum={HS256:"HS256",RS256:"RS256",PS256:"PS256"};t.ResourceServerTokenDialectEnum={token:"access_token",token_authz:"access_token_authz"};t.ResourceServerCreateSigningAlgEnum={HS256:"HS256",RS256:"RS256",PS256:"PS256"};t.ResourceServerCreateTokenDialectEnum={token:"access_token",token_authz:"access_token_authz"};t.ResourceServerUpdateSigningAlgEnum={HS256:"HS256",RS256:"RS256",PS256:"PS256"};t.ResourceServerUpdateTokenDialectEnum={token:"access_token",token_authz:"access_token_authz"};t.TenantSettingsEnabledLocalesEnum={ar:"ar",bg:"bg",bs:"bs",ca_ES:"ca-ES",cs:"cs",cy:"cy",da:"da",de:"de",el:"el",en:"en",es:"es",et:"et",eu_ES:"eu-ES",fi:"fi",fr:"fr",fr_CA:"fr-CA",fr_FR:"fr-FR",gl_ES:"gl-ES",he:"he",hi:"hi",hr:"hr",hu:"hu",id:"id",is:"is",it:"it",ja:"ja",ko:"ko",lt:"lt",lv:"lv",nb:"nb",nl:"nl",nn:"nn",no:"no",pl:"pl",pt:"pt",pt_BR:"pt-BR",pt_PT:"pt-PT",ro:"ro",ru:"ru",sk:"sk",sl:"sl",sr:"sr",sv:"sv",th:"th",tr:"tr",uk:"uk",vi:"vi",zh_CN:"zh-CN",zh_TW:"zh-TW"};t.TenantSettingsDeviceFlowCharsetEnum={base20:"base20",digits:"digits"};t.TenantSettingsSessionCookieModeEnum={persistent:"persistent",non_persistent:"non-persistent"};t.TenantSettingsUpdateEnabledLocalesEnum={ar:"ar",bg:"bg",bs:"bs",ca_ES:"ca-ES",cs:"cs",cy:"cy",da:"da",de:"de",el:"el",en:"en",es:"es",et:"et",eu_ES:"eu-ES",fi:"fi",fr:"fr",fr_CA:"fr-CA",fr_FR:"fr-FR",gl_ES:"gl-ES",he:"he",hi:"hi",hr:"hr",hu:"hu",id:"id",is:"is",it:"it",ja:"ja",ko:"ko",lt:"lt",lv:"lv",nb:"nb",nl:"nl",nn:"nn",no:"no",pl:"pl",pt:"pt",pt_BR:"pt-BR",pt_PT:"pt-PT",ro:"ro",ru:"ru",sk:"sk",sl:"sl",sr:"sr",sv:"sv",th:"th",tr:"tr",uk:"uk",vi:"vi",zh_CN:"zh-CN",zh_TW:"zh-TW"};t.TenantSettingsUpdateDeviceFlowCharsetEnum={base20:"base20",digits:"digits"};t.TenantSettingsUpdateFlagsChangePwdFlowV1Enum={false:false};t.UserEnrollmentStatusEnum={pending:"pending",confirmed:"confirmed"};t.UserEnrollmentAuthMethodEnum={authenticator:"authenticator",guardian:"guardian",sms:"sms",webauthn_platform:"webauthn-platform",webauthn_roaming:"webauthn-roaming"};t.GetConnectionsStrategyEnum={ad:"ad",adfs:"adfs",amazon:"amazon",apple:"apple",dropbox:"dropbox",bitbucket:"bitbucket",aol:"aol",auth0_oidc:"auth0-oidc",auth0:"auth0",baidu:"baidu",bitly:"bitly",box:"box",custom:"custom",daccount:"daccount",dwolla:"dwolla",email:"email",evernote_sandbox:"evernote-sandbox",evernote:"evernote",exact:"exact",facebook:"facebook",fitbit:"fitbit",flickr:"flickr",github:"github",google_apps:"google-apps",google_oauth2:"google-oauth2",instagram:"instagram",ip:"ip",line:"line",linkedin:"linkedin",miicard:"miicard",oauth1:"oauth1",oauth2:"oauth2",office365:"office365",oidc:"oidc",okta:"okta",paypal:"paypal",paypal_sandbox:"paypal-sandbox",pingfederate:"pingfederate",planningcenter:"planningcenter",renren:"renren",salesforce_community:"salesforce-community",salesforce_sandbox:"salesforce-sandbox",salesforce:"salesforce",samlp:"samlp",sharepoint:"sharepoint",shopify:"shopify",sms:"sms",soundcloud:"soundcloud",thecity_sandbox:"thecity-sandbox",thecity:"thecity",thirtysevensignals:"thirtysevensignals",twitter:"twitter",untappd:"untappd",vkontakte:"vkontakte",waad:"waad",weibo:"weibo",windowslive:"windowslive",wordpress:"wordpress",yahoo:"yahoo",yammer:"yammer",yandex:"yandex",auth0_adldap:"auth0-adldap"};t.GetDeviceCredentialsTypeEnum={public_key:"public_key",refresh_token:"refresh_token",rotating_refresh_token:"rotating_refresh_token"};t.GetEmailTemplatesByTemplateNameTemplateNameEnum={verify_email:"verify_email",verify_email_by_code:"verify_email_by_code",reset_email:"reset_email",welcome_email:"welcome_email",blocked_account:"blocked_account",stolen_credentials:"stolen_credentials",enrollment_email:"enrollment_email",mfa_oob_code:"mfa_oob_code",user_invitation:"user_invitation",change_password:"change_password",password_reset:"password_reset"};t.PatchEmailTemplatesByTemplateNameOperationTemplateNameEnum={verify_email:"verify_email",verify_email_by_code:"verify_email_by_code",reset_email:"reset_email",welcome_email:"welcome_email",blocked_account:"blocked_account",stolen_credentials:"stolen_credentials",enrollment_email:"enrollment_email",mfa_oob_code:"mfa_oob_code",user_invitation:"user_invitation",change_password:"change_password",password_reset:"password_reset"};t.PutEmailTemplatesByTemplateNameTemplateNameEnum={verify_email:"verify_email",verify_email_by_code:"verify_email_by_code",reset_email:"reset_email",welcome_email:"welcome_email",blocked_account:"blocked_account",stolen_credentials:"stolen_credentials",enrollment_email:"enrollment_email",mfa_oob_code:"mfa_oob_code",user_invitation:"user_invitation",change_password:"change_password",password_reset:"password_reset"};t.PutFactorsByNameOperationNameEnum={push_notification:"push-notification",sms:"sms",email:"email",duo:"duo",otp:"otp",webauthn_roaming:"webauthn-roaming",webauthn_platform:"webauthn-platform",recovery_code:"recovery-code"};t.GetHooksTriggerIdEnum={credentials_exchange:"credentials-exchange",pre_user_registration:"pre-user-registration",post_user_registration:"post-user-registration",post_change_password:"post-change-password",send_phone_message:"send-phone-message"};t.GetCustomTextByLanguagePromptEnum={login:"login",login_id:"login-id",login_password:"login-password",login_passwordless:"login-passwordless",login_email_verification:"login-email-verification",signup:"signup",signup_id:"signup-id",signup_password:"signup-password",phone_identifier_enrollment:"phone-identifier-enrollment",phone_identifier_challenge:"phone-identifier-challenge",reset_password:"reset-password",consent:"consent",logout:"logout",mfa_push:"mfa-push",mfa_otp:"mfa-otp",mfa_voice:"mfa-voice",mfa_phone:"mfa-phone",mfa_webauthn:"mfa-webauthn",mfa_sms:"mfa-sms",mfa_email:"mfa-email",mfa_recovery_code:"mfa-recovery-code",mfa:"mfa",status:"status",device_flow:"device-flow",email_verification:"email-verification",email_otp_challenge:"email-otp-challenge",organizations:"organizations",invitation:"invitation",common:"common",passkeys:"passkeys"};t.GetCustomTextByLanguageLanguageEnum={ar:"ar",bg:"bg",bs:"bs",ca_ES:"ca-ES",cs:"cs",cy:"cy",da:"da",de:"de",el:"el",en:"en",es:"es",et:"et",eu_ES:"eu-ES",fi:"fi",fr:"fr",fr_CA:"fr-CA",fr_FR:"fr-FR",gl_ES:"gl-ES",he:"he",hi:"hi",hr:"hr",hu:"hu",id:"id",is:"is",it:"it",ja:"ja",ko:"ko",lt:"lt",lv:"lv",nb:"nb",nl:"nl",nn:"nn",no:"no",pl:"pl",pt:"pt",pt_BR:"pt-BR",pt_PT:"pt-PT",ro:"ro",ru:"ru",sk:"sk",sl:"sl",sr:"sr",sv:"sv",th:"th",tr:"tr",uk:"uk",vi:"vi",zh_CN:"zh-CN",zh_TW:"zh-TW"};t.PutCustomTextByLanguagePromptEnum={login:"login",login_id:"login-id",login_password:"login-password",login_passwordless:"login-passwordless",login_email_verification:"login-email-verification",signup:"signup",signup_id:"signup-id",signup_password:"signup-password",phone_identifier_enrollment:"phone-identifier-enrollment",phone_identifier_challenge:"phone-identifier-challenge",reset_password:"reset-password",consent:"consent",logout:"logout",mfa_push:"mfa-push",mfa_otp:"mfa-otp",mfa_voice:"mfa-voice",mfa_phone:"mfa-phone",mfa_webauthn:"mfa-webauthn",mfa_sms:"mfa-sms",mfa_email:"mfa-email",mfa_recovery_code:"mfa-recovery-code",mfa:"mfa",status:"status",device_flow:"device-flow",email_verification:"email-verification",email_otp_challenge:"email-otp-challenge",organizations:"organizations",invitation:"invitation",common:"common",passkeys:"passkeys"};t.PutCustomTextByLanguageLanguageEnum={ar:"ar",bg:"bg",bs:"bs",ca_ES:"ca-ES",cs:"cs",cy:"cy",da:"da",de:"de",el:"el",en:"en",es:"es",et:"et",eu_ES:"eu-ES",fi:"fi",fr:"fr",fr_CA:"fr-CA",fr_FR:"fr-FR",gl_ES:"gl-ES",he:"he",hi:"hi",hr:"hr",hu:"hu",id:"id",is:"is",it:"it",ja:"ja",ko:"ko",lt:"lt",lv:"lv",nb:"nb",nl:"nl",nn:"nn",no:"no",pl:"pl",pt:"pt",pt_BR:"pt-BR",pt_PT:"pt-PT",ro:"ro",ru:"ru",sk:"sk",sl:"sl",sr:"sr",sv:"sv",th:"th",tr:"tr",uk:"uk",vi:"vi",zh_CN:"zh-CN",zh_TW:"zh-TW"};t.DeleteMultifactorByProviderProviderEnum={duo:"duo",google_authenticator:"google-authenticator"};t.DeleteUserIdentityByUserIdProviderEnum={ad:"ad",adfs:"adfs",amazon:"amazon",apple:"apple",dropbox:"dropbox",bitbucket:"bitbucket",aol:"aol",auth0_oidc:"auth0-oidc",auth0:"auth0",baidu:"baidu",bitly:"bitly",box:"box",custom:"custom",daccount:"daccount",dwolla:"dwolla",email:"email",evernote_sandbox:"evernote-sandbox",evernote:"evernote",exact:"exact",facebook:"facebook",fitbit:"fitbit",flickr:"flickr",github:"github",google_apps:"google-apps",google_oauth2:"google-oauth2",instagram:"instagram",ip:"ip",line:"line",linkedin:"linkedin",miicard:"miicard",oauth1:"oauth1",oauth2:"oauth2",office365:"office365",oidc:"oidc",okta:"okta",paypal:"paypal",paypal_sandbox:"paypal-sandbox",pingfederate:"pingfederate",planningcenter:"planningcenter",renren:"renren",salesforce_community:"salesforce-community",salesforce_sandbox:"salesforce-sandbox",salesforce:"salesforce",samlp:"samlp",sharepoint:"sharepoint",shopify:"shopify",sms:"sms",soundcloud:"soundcloud",thecity_sandbox:"thecity-sandbox",thecity:"thecity",thirtysevensignals:"thirtysevensignals",twitter:"twitter",untappd:"untappd",vkontakte:"vkontakte",waad:"waad",weibo:"weibo",windowslive:"windowslive",wordpress:"wordpress",yahoo:"yahoo",yammer:"yammer",yandex:"yandex"};t.GetUsersSearchEngineEnum={v1:"v1",v2:"v2",v3:"v3"}},3119:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))s(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(2602),t);i(n(2469),t);i(n(7248),t)},2602:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true})},2469:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ManagementClient=t.ManagementApiError=void 0;const s=n(7248);const i=n(3387);const r=n(3551);const o=n(8295);class ManagementApiError extends Error{constructor(e,t,n,s,i,r){super(r);this.errorCode=e;this.error=t;this.statusCode=n;this.body=s;this.headers=i;this.msg=r;this.name="ManagementApiError"}}t.ManagementApiError=ManagementApiError;async function parseError(e){const t=await e.text();let n;try{n=JSON.parse(t);return new ManagementApiError(n.errorCode,n.error,n.statusCode||e.status,t,e.headers,n.message)}catch(n){return new r.ResponseError(e.status,t,e.headers,"Response returned an error code")}}class ManagementClient extends s.ManagementClientBase{constructor(e){super({...e,baseUrl:`https://${e.domain}/api/v2`,middleware:[new i.TokenProviderMiddleware(e),...e.telemetry!==false?[new o.TelemetryMiddleware(e)]:[]],parseError:parseError})}}t.ManagementClient=ManagementClient},3387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TokenProviderMiddleware=void 0;const s=n(206);class TokenProviderMiddleware{constructor(e){var t;if("token"in e){this.tokenProvider={getAccessToken:()=>Promise.resolve(e.token)}}else{this.tokenProvider=new s.TokenProvider({...e,audience:(t=e.audience)!==null&&t!==void 0?t:`https://${e.domain}/api/v2/`,...{clientSecret:e.clientSecret},...{clientAssertionSigningKey:e.clientAssertionSigningKey}})}}async pre(e){const t=await this.tokenProvider.getAccessToken();e.init.headers={...e.init.headers,Authorization:`Bearer ${t}`};return{url:e.url,init:e.init}}}t.TokenProviderMiddleware=TokenProviderMiddleware},206:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TokenProvider=void 0;const s=n(3776);const i=10*1e3;class TokenProvider{constructor(e){this.options=e;this.expiresAt=0;this.accessToken="";this.authenticationClient=new s.AuthenticationClient(e)}async getAccessToken(){if(!this.accessToken||Date.now()>this.expiresAt-i){this.pending=this.pending||this.authenticationClient.oauth.clientCredentialsGrant({audience:this.options.audience});const{data:{access_token:e,expires_in:t}}=await this.pending.finally((()=>{delete this.pending}));this.expiresAt=Date.now()+t*1e3;this.accessToken=e}return this.accessToken}}t.TokenProvider=TokenProvider},6650:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UserInfoClient=t.parseError=t.UserInfoError=void 0;const s=n(8361);const i=n(8295);const r=n(4667);const o=n(5467);class UserInfoError extends Error{constructor(e,t,n,s,i){super(t||e);this.error=e;this.error_description=t;this.statusCode=n;this.body=s;this.headers=i;this.name="UserInfoError"}}t.UserInfoError=UserInfoError;async function parseError(e){const t=await e.text();let n;try{n=JSON.parse(t);return new UserInfoError(n.error,n.error_description,e.status,t,e.headers)}catch(n){return new s.ResponseError(e.status,t,e.headers,"Response returned an error code")}}t.parseError=parseError;class UserInfoClient extends o.BaseAPI{constructor(e){super({...e,baseUrl:`https://${e.domain}`,middleware:e.telemetry!==false?[new i.TelemetryMiddleware(e)]:[],parseError:parseError})}async getUserInfo(e,t){const n=await this.request({path:`/userinfo`,method:"GET",headers:{Authorization:`Bearer ${e}`}},t);return r.JSONApiResponse.fromResponse(n)}}t.UserInfoClient=UserInfoClient},8200:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateClientInfo=void 0;const s=n(1817);const generateClientInfo=()=>({name:"node-auth0",version:s.version,env:{node:process.version.replace("v","")}});t.generateClientInfo=generateClientInfo},1817:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="4.1.0"},8757:(e,t,n)=>{"use strict";const s=n(4334);const i=n(7310);const r=n(3329);const o=n(3685);const A=n(5687);const a=n(3837);const c=n(7707);const u=n(9796);const l=n(2781);const d=n(2361);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}const p=_interopDefaultLegacy(s);const g=_interopDefaultLegacy(i);const h=_interopDefaultLegacy(o);const f=_interopDefaultLegacy(A);const E=_interopDefaultLegacy(a);const m=_interopDefaultLegacy(c);const C=_interopDefaultLegacy(u);const Q=_interopDefaultLegacy(l);const I=_interopDefaultLegacy(d);function bind(e,t){return function wrap(){return e.apply(t,arguments)}}const{toString:B}=Object.prototype;const{getPrototypeOf:y}=Object;const b=(e=>t=>{const n=B.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null));const kindOfTest=e=>{e=e.toLowerCase();return t=>b(t)===e};const typeOfTest=e=>t=>typeof t===e;const{isArray:w}=Array;const R=typeOfTest("undefined");function isBuffer(e){return e!==null&&!R(e)&&e.constructor!==null&&!R(e.constructor)&&S(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const v=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&v(e.buffer)}return t}const k=typeOfTest("string");const S=typeOfTest("function");const x=typeOfTest("number");const isObject=e=>e!==null&&typeof e==="object";const isBoolean=e=>e===true||e===false;const isPlainObject=e=>{if(b(e)!=="object"){return false}const t=y(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};const D=kindOfTest("Date");const _=kindOfTest("File");const N=kindOfTest("Blob");const F=kindOfTest("FileList");const isStream=e=>isObject(e)&&S(e.pipe);const isFormData=e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||S(e.append)&&((t=b(e))==="formdata"||t==="object"&&S(e.toString)&&e.toString()==="[object FormData]"))};const U=kindOfTest("URLSearchParams");const trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=false}={}){if(e===null||typeof e==="undefined"){return}let s;let i;if(typeof e!=="object"){e=[e]}if(w(e)){for(s=0,i=e.length;s0){i=n[s];if(t===i.toLowerCase()){return i}}return null}const T=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();const isContextDefined=e=>!R(e)&&e!==T;function merge(){const{caseless:e}=isContextDefined(this)&&this||{};const t={};const assignValue=(n,s)=>{const i=e&&findKey(t,s)||s;if(isPlainObject(t[i])&&isPlainObject(n)){t[i]=merge(t[i],n)}else if(isPlainObject(n)){t[i]=merge({},n)}else if(w(n)){t[i]=n.slice()}else{t[i]=n}};for(let e=0,t=arguments.length;e{forEach(t,((t,s)=>{if(n&&S(t)){e[s]=bind(t,n)}else{e[s]=t}}),{allOwnKeys:s});return e};const stripBOM=e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};const inherits=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});n&&Object.assign(e.prototype,n)};const toFlatObject=(e,t,n,s)=>{let i;let r;let o;const A={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);r=i.length;while(r-- >0){o=i[r];if((!s||s(o,e,t))&&!A[o]){t[o]=e[o];A[o]=true}}e=n!==false&&y(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t};const endsWith=(e,t,n)=>{e=String(e);if(n===undefined||n>e.length){n=e.length}n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n};const toArray=e=>{if(!e)return null;if(w(e))return e;let t=e.length;if(!x(t))return null;const n=new Array(t);while(t-- >0){n[t]=e[t]}return n};const M=(e=>t=>e&&t instanceof e)(typeof Uint8Array!=="undefined"&&y(Uint8Array));const forEachEntry=(e,t)=>{const n=e&&e[Symbol.iterator];const s=n.call(e);let i;while((i=s.next())&&!i.done){const n=i.value;t.call(e,n[0],n[1])}};const matchAll=(e,t)=>{let n;const s=[];while((n=e.exec(t))!==null){s.push(n)}return s};const L=kindOfTest("HTMLFormElement");const toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function replacer(e,t,n){return t.toUpperCase()+n}));const O=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype);const P=kindOfTest("RegExp");const reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e);const s={};forEach(n,((n,i)=>{let r;if((r=t(n,i,e))!==false){s[i]=r||n}}));Object.defineProperties(e,s)};const freezeMethods=e=>{reduceDescriptors(e,((t,n)=>{if(S(e)&&["arguments","caller","callee"].indexOf(n)!==-1){return false}const s=e[n];if(!S(s))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}}}))};const toObjectSet=(e,t)=>{const n={};const define=e=>{e.forEach((e=>{n[e]=true}))};w(e)?define(e):define(String(e).split(t));return n};const noop=()=>{};const toFiniteNumber=(e,t)=>{e=+e;return Number.isFinite(e)?e:t};const J="abcdefghijklmnopqrstuvwxyz";const H="0123456789";const q={DIGIT:H,ALPHA:J,ALPHA_DIGIT:J+J.toUpperCase()+H};const generateString=(e=16,t=q.ALPHA_DIGIT)=>{let n="";const{length:s}=t;while(e--){n+=t[Math.random()*s|0]}return n};function isSpecCompliantForm(e){return!!(e&&S(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const toJSONObject=e=>{const t=new Array(10);const visit=(e,n)=>{if(isObject(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;const s=w(e)?[]:{};forEach(e,((e,t)=>{const i=visit(e,n+1);!R(i)&&(s[t]=i)}));t[n]=undefined;return s}}return e};return visit(e,0)};const G=kindOfTest("AsyncFunction");const isThenable=e=>e&&(isObject(e)||S(e))&&S(e.then)&&S(e.catch);const Y={isArray:w,isArrayBuffer:v,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:k,isNumber:x,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isUndefined:R,isDate:D,isFile:_,isBlob:N,isRegExp:P,isFunction:S,isStream:isStream,isURLSearchParams:U,isTypedArray:M,isFileList:F,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:b,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:L,hasOwnProperty:O,hasOwnProp:O,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:T,isContextDefined:isContextDefined,ALPHABET:q,generateString:generateString,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:G,isThenable:isThenable};function AxiosError(e,t,n,s,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);n&&(this.config=n);s&&(this.request=s);i&&(this.response=i)}Y.inherits(AxiosError,Error,{toJSON:function toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const V=AxiosError.prototype;const j={};["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"].forEach((e=>{j[e]={value:e}}));Object.defineProperties(AxiosError,j);Object.defineProperty(V,"isAxiosError",{value:true});AxiosError.from=(e,t,n,s,i,r)=>{const o=Object.create(V);Y.toFlatObject(e,o,(function filter(e){return e!==Error.prototype}),(e=>e!=="isAxiosError"));AxiosError.call(o,e.message,t,n,s,i);o.cause=e;o.name=e.name;r&&Object.assign(o,r);return o};function isVisitable(e){return Y.isPlainObject(e)||Y.isArray(e)}function removeBrackets(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){if(!e)return t;return e.concat(t).map((function each(e,t){e=removeBrackets(e);return!n&&t?"["+e+"]":e})).join(n?".":"")}function isFlatArray(e){return Y.isArray(e)&&!e.some(isVisitable)}const W=Y.toFlatObject(Y,{},null,(function filter(e){return/^is[A-Z]/.test(e)}));function toFormData(e,t,n){if(!Y.isObject(e)){throw new TypeError("target must be an object")}t=t||new(p["default"]||FormData);n=Y.toFlatObject(n,{metaTokens:true,dots:false,indexes:false},false,(function defined(e,t){return!Y.isUndefined(t[e])}));const s=n.metaTokens;const i=n.visitor||defaultVisitor;const r=n.dots;const o=n.indexes;const A=n.Blob||typeof Blob!=="undefined"&&Blob;const a=A&&Y.isSpecCompliantForm(t);if(!Y.isFunction(i)){throw new TypeError("visitor must be a function")}function convertValue(e){if(e===null)return"";if(Y.isDate(e)){return e.toISOString()}if(!a&&Y.isBlob(e)){throw new AxiosError("Blob is not supported. Use a Buffer instead.")}if(Y.isArrayBuffer(e)||Y.isTypedArray(e)){return a&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function defaultVisitor(e,n,i){let A=e;if(e&&!i&&typeof e==="object"){if(Y.endsWith(n,"{}")){n=s?n:n.slice(0,-2);e=JSON.stringify(e)}else if(Y.isArray(e)&&isFlatArray(e)||(Y.isFileList(e)||Y.endsWith(n,"[]"))&&(A=Y.toArray(e))){n=removeBrackets(n);A.forEach((function each(e,s){!(Y.isUndefined(e)||e===null)&&t.append(o===true?renderKey([n],s,r):o===null?n:n+"[]",convertValue(e))}));return false}}if(isVisitable(e)){return true}t.append(renderKey(i,n,r),convertValue(e));return false}const c=[];const u=Object.assign(W,{defaultVisitor:defaultVisitor,convertValue:convertValue,isVisitable:isVisitable});function build(e,n){if(Y.isUndefined(e))return;if(c.indexOf(e)!==-1){throw Error("Circular reference detected in "+n.join("."))}c.push(e);Y.forEach(e,(function each(e,s){const r=!(Y.isUndefined(e)||e===null)&&i.call(t,e,Y.isString(s)?s.trim():s,n,u);if(r===true){build(e,n?n.concat(s):[s])}}));c.pop()}if(!Y.isObject(e)){throw new TypeError("data must be an object")}build(e);return t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function replacer(e){return t[e]}))}function AxiosURLSearchParams(e,t){this._pairs=[];e&&toFormData(e,this,t)}const K=AxiosURLSearchParams.prototype;K.append=function append(e,t){this._pairs.push([e,t])};K.toString=function toString(e){const t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map((function each(e){return t(e[0])+"="+t(e[1])}),"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,n){if(!t){return e}const s=n&&n.encode||encode;const i=n&&n.serialize;let r;if(i){r=i(t,n)}else{r=Y.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(s)}if(r){const t=e.indexOf("#");if(t!==-1){e=e.slice(0,t)}e+=(e.indexOf("?")===-1?"?":"&")+r}return e}class InterceptorManager{constructor(){this.handlers=[]}use(e,t,n){this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(e){if(this.handlers[e]){this.handlers[e]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(e){Y.forEach(this.handlers,(function forEachHandler(t){if(t!==null){e(t)}}))}}const z=InterceptorManager;const Z={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};const X=g["default"].URLSearchParams;const $={isNode:true,classes:{URLSearchParams:X,FormData:p["default"],Blob:typeof Blob!=="undefined"&&Blob||null},protocols:["http","https","file","data"]};function toURLEncodedForm(e,t){return toFormData(e,new $.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,s){if(Y.isBuffer(e)){this.append(t,e.toString("base64"));return false}return s.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map((e=>e[0]==="[]"?"":e[1]||e[0]))}function arrayToObject(e){const t={};const n=Object.keys(e);let s;const i=n.length;let r;for(s=0;s=e.length;i=!i&&Y.isArray(n)?n.length:i;if(o){if(Y.hasOwnProp(n,i)){n[i]=[n[i],t]}else{n[i]=t}return!r}if(!n[i]||!Y.isObject(n[i])){n[i]=[]}const A=buildPath(e,t,n[i],s);if(A&&Y.isArray(n[i])){n[i]=arrayToObject(n[i])}return!r}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const t={};Y.forEachEntry(e,((e,n)=>{buildPath(parsePropPath(e),n,t,0)}));return t}return null}function stringifySafely(e,t,n){if(Y.isString(e)){try{(t||JSON.parse)(e);return Y.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(n||JSON.stringify)(e)}const ee={transitional:Z,adapter:["xhr","http"],transformRequest:[function transformRequest(e,t){const n=t.getContentType()||"";const s=n.indexOf("application/json")>-1;const i=Y.isObject(e);if(i&&Y.isHTMLForm(e)){e=new FormData(e)}const r=Y.isFormData(e);if(r){if(!s){return e}return s?JSON.stringify(formDataToJSON(e)):e}if(Y.isArrayBuffer(e)||Y.isBuffer(e)||Y.isStream(e)||Y.isFile(e)||Y.isBlob(e)){return e}if(Y.isArrayBufferView(e)){return e.buffer}if(Y.isURLSearchParams(e)){t.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return e.toString()}let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1){return toURLEncodedForm(e,this.formSerializer).toString()}if((o=Y.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(i||s){t.setContentType("application/json",false);return stringifySafely(e)}return e}],transformResponse:[function transformResponse(e){const t=this.transitional||ee.transitional;const n=t&&t.forcedJSONParsing;const s=this.responseType==="json";if(e&&Y.isString(e)&&(n&&!this.responseType||s)){const n=t&&t.silentJSONParsing;const i=!n&&s;try{return JSON.parse(e)}catch(e){if(i){if(e.name==="SyntaxError"){throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};Y.forEach(["delete","get","head","post","put","patch"],(e=>{ee.headers[e]={}}));const te=ee;const ne=Y.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"]);const parseHeaders=e=>{const t={};let n;let s;let i;e&&e.split("\n").forEach((function parser(e){i=e.indexOf(":");n=e.substring(0,i).trim().toLowerCase();s=e.substring(i+1).trim();if(!n||t[n]&&ne[n]){return}if(n==="set-cookie"){if(t[n]){t[n].push(s)}else{t[n]=[s]}}else{t[n]=t[n]?t[n]+", "+s:s}}));return t};const se=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){if(e===false||e==null){return e}return Y.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null);const n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;while(s=n.exec(e)){t[s[1]]=s[2]}return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,s,i){if(Y.isFunction(s)){return s.call(this,t,n)}if(i){t=n}if(!Y.isString(t))return;if(Y.isString(s)){return t.indexOf(s)!==-1}if(Y.isRegExp(s)){return s.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}function buildAccessors(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach((s=>{Object.defineProperty(e,s+n,{value:function(e,n,i){return this[s].call(this,t,e,n,i)},configurable:true})}))}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,n){const s=this;function setHeader(e,t,n){const i=normalizeHeader(t);if(!i){throw new Error("header name must be a non-empty string")}const r=Y.findKey(s,i);if(!r||s[r]===undefined||n===true||n===undefined&&s[r]!==false){s[r||t]=normalizeValue(e)}}const setHeaders=(e,t)=>Y.forEach(e,((e,n)=>setHeader(e,n,t)));if(Y.isPlainObject(e)||e instanceof this.constructor){setHeaders(e,t)}else if(Y.isString(e)&&(e=e.trim())&&!isValidHeaderName(e)){setHeaders(parseHeaders(e),t)}else{e!=null&&setHeader(t,e,n)}return this}get(e,t){e=normalizeHeader(e);if(e){const n=Y.findKey(this,e);if(n){const e=this[n];if(!t){return e}if(t===true){return parseTokens(e)}if(Y.isFunction(t)){return t.call(this,e,n)}if(Y.isRegExp(t)){return t.exec(e)}throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){e=normalizeHeader(e);if(e){const n=Y.findKey(this,e);return!!(n&&this[n]!==undefined&&(!t||matchHeaderValue(this,this[n],n,t)))}return false}delete(e,t){const n=this;let s=false;function deleteHeader(e){e=normalizeHeader(e);if(e){const i=Y.findKey(n,e);if(i&&(!t||matchHeaderValue(n,n[i],i,t))){delete n[i];s=true}}}if(Y.isArray(e)){e.forEach(deleteHeader)}else{deleteHeader(e)}return s}clear(e){const t=Object.keys(this);let n=t.length;let s=false;while(n--){const i=t[n];if(!e||matchHeaderValue(this,this[i],i,e,true)){delete this[i];s=true}}return s}normalize(e){const t=this;const n={};Y.forEach(this,((s,i)=>{const r=Y.findKey(n,i);if(r){t[r]=normalizeValue(s);delete t[i];return}const o=e?formatHeader(i):String(i).trim();if(o!==i){delete t[i]}t[o]=normalizeValue(s);n[o]=true}));return this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);Y.forEach(this,((n,s)=>{n!=null&&n!==false&&(t[s]=e&&Y.isArray(n)?n.join(", "):n)}));return t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);t.forEach((e=>n.set(e)));return n}static accessor(e){const t=this[se]=this[se]={accessors:{}};const n=t.accessors;const s=this.prototype;function defineAccessor(e){const t=normalizeHeader(e);if(!n[t]){buildAccessors(s,e);n[t]=true}}Y.isArray(e)?e.forEach(defineAccessor):defineAccessor(e);return this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Y.reduceDescriptors(AxiosHeaders.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}));Y.freezeMethods(AxiosHeaders);const ie=AxiosHeaders;function transformData(e,t){const n=this||te;const s=t||n;const i=ie.from(s.headers);let r=s.data;Y.forEach(e,(function transform(e){r=e.call(n,r,i.normalize(),t?t.status:undefined)}));i.normalize();return r}function isCancel(e){return!!(e&&e.__CANCEL__)}function CanceledError(e,t,n){AxiosError.call(this,e==null?"canceled":e,AxiosError.ERR_CANCELED,t,n);this.name="CanceledError"}Y.inherits(CanceledError,AxiosError,{__CANCEL__:true});function settle(e,t,n){const s=n.config.validateStatus;if(!n.status||!s||s(n.status)){e(n)}else{t(new AxiosError("Request failed with status code "+n.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}}function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t){if(e&&!isAbsoluteURL(t)){return combineURLs(e,t)}return t}const re="1.6.0";function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const oe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function fromDataURI(e,t,n){const s=n&&n.Blob||$.classes.Blob;const i=parseProtocol(e);if(t===undefined&&s){t=true}if(i==="data"){e=i.length?e.slice(i.length+1):e;const n=oe.exec(e);if(!n){throw new AxiosError("Invalid URL",AxiosError.ERR_INVALID_URL)}const r=n[1];const o=n[2];const A=n[3];const a=Buffer.from(decodeURIComponent(A),o?"base64":"utf8");if(t){if(!s){throw new AxiosError("Blob is not supported",AxiosError.ERR_NOT_SUPPORT)}return new s([a],{type:r})}return a}throw new AxiosError("Unsupported protocol "+i,AxiosError.ERR_NOT_SUPPORT)}function throttle(e,t){let n=0;const s=1e3/t;let i=null;return function throttled(t,r){const o=Date.now();if(t||o-n>s){if(i){clearTimeout(i);i=null}n=o;return e.apply(null,r)}if(!i){i=setTimeout((()=>{i=null;n=Date.now();return e.apply(null,r)}),s-(o-n))}}}function speedometer(e,t){e=e||10;const n=new Array(e);const s=new Array(e);let i=0;let r=0;let o;t=t!==undefined?t:1e3;return function push(A){const a=Date.now();const c=s[r];if(!o){o=a}n[i]=A;s[i]=a;let u=r;let l=0;while(u!==i){l+=n[u++];u=u%e}i=(i+1)%e;if(i===r){r=(r+1)%e}if(a-o!Y.isUndefined(t[e])));super({readableHighWaterMark:e.chunkSize});const t=this;const n=this[Ae]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:false,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};const s=speedometer(n.ticksRate*e.samplesCount,n.timeWindow);this.on("newListener",(e=>{if(e==="progress"){if(!n.isCaptured){n.isCaptured=true}}}));let i=0;n.updateProgress=throttle((function throttledHandler(){const e=n.length;const r=n.bytesSeen;const o=r-i;if(!o||t.destroyed)return;const A=s(o);i=r;process.nextTick((()=>{t.emit("progress",{loaded:r,total:e,progress:e?r/e:undefined,bytes:o,rate:A?A:undefined,estimated:A&&e&&r<=e?(e-r)/A:undefined})}))}),n.ticksRate);const onFinish=()=>{n.updateProgress(true)};this.once("end",onFinish);this.once("error",onFinish)}_read(e){const t=this[Ae];if(t.onReadCallback){t.onReadCallback()}return super._read(e)}_transform(e,t,n){const s=this;const i=this[Ae];const r=i.maxRate;const o=this.readableHighWaterMark;const A=i.timeWindow;const a=1e3/A;const c=r/a;const u=i.minChunkSize!==false?Math.max(i.minChunkSize,c*.01):0;function pushChunk(e,t){const n=Buffer.byteLength(e);i.bytesSeen+=n;i.bytes+=n;if(i.isCaptured){i.updateProgress()}if(s.push(e)){process.nextTick(t)}else{i.onReadCallback=()=>{i.onReadCallback=null;process.nextTick(t)}}}const transformChunk=(e,t)=>{const n=Buffer.byteLength(e);let s=null;let a=o;let l;let d=0;if(r){const e=Date.now();if(!i.ts||(d=e-i.ts)>=A){i.ts=e;l=c-i.bytes;i.bytes=l<0?-l:0;d=0}l=c-i.bytes}if(r){if(l<=0){return setTimeout((()=>{t(null,e)}),A-d)}if(la&&n-a>u){s=e.subarray(a);e=e.subarray(0,a)}pushChunk(e,s?()=>{process.nextTick(t,null,s)}:t)};transformChunk(e,(function transformNextChunk(e,t){if(e){return n(e)}if(t){transformChunk(t,transformNextChunk)}else{n(null)}}))}setLength(e){this[Ae].length=+e;return this}}const ae=AxiosTransformStream;const{asyncIterator:ce}=Symbol;const readBlob=async function*(e){if(e.stream){yield*e.stream()}else if(e.arrayBuffer){yield await e.arrayBuffer()}else if(e[ce]){yield*e[ce]()}else{yield e}};const ue=readBlob;const le=Y.ALPHABET.ALPHA_DIGIT+"-_";const de=new a.TextEncoder;const pe="\r\n";const ge=de.encode(pe);const he=2;class FormDataPart{constructor(e,t){const{escapeName:n}=this.constructor;const s=Y.isString(t);let i=`Content-Disposition: form-data; name="${n(e)}"${!s&&t.name?`; filename="${n(t.name)}"`:""}${pe}`;if(s){t=de.encode(String(t).replace(/\r?\n|\r\n?/g,pe))}else{i+=`Content-Type: ${t.type||"application/octet-stream"}${pe}`}this.headers=de.encode(i+pe);this.contentLength=s?t.byteLength:t.size;this.size=this.headers.byteLength+this.contentLength+he;this.name=e;this.value=t}async*encode(){yield this.headers;const{value:e}=this;if(Y.isTypedArray(e)){yield e}else{yield*ue(e)}yield ge}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}const formDataToStream=(e,t,n)=>{const{tag:s="form-data-boundary",size:i=25,boundary:r=s+"-"+Y.generateString(i,le)}=n||{};if(!Y.isFormData(e)){throw TypeError("FormData instance required")}if(r.length<1||r.length>70){throw Error("boundary must be 10-70 characters long")}const o=de.encode("--"+r+pe);const A=de.encode("--"+r+"--"+pe+pe);let a=A.byteLength;const c=Array.from(e.entries()).map((([e,t])=>{const n=new FormDataPart(e,t);a+=n.size;return n}));a+=o.byteLength*c.length;a=Y.toFiniteNumber(a);const u={"Content-Type":`multipart/form-data; boundary=${r}`};if(Number.isFinite(a)){u["Content-Length"]=a}t&&t(u);return l.Readable.from(async function*(){for(const e of c){yield o;yield*e.encode()}yield A}())};const fe=formDataToStream;class ZlibHeaderTransformStream extends Q["default"].Transform{__transform(e,t,n){this.push(e);n()}_transform(e,t,n){if(e.length!==0){this._transform=this.__transform;if(e[0]!==120){const e=Buffer.alloc(2);e[0]=120;e[1]=156;this.push(e,t)}}this.__transform(e,t,n)}}const Ee=ZlibHeaderTransformStream;const callbackify=(e,t)=>Y.isAsyncFn(e)?function(...n){const s=n.pop();e.apply(this,n).then((e=>{try{t?s(null,...t(e)):s(null,e)}catch(e){s(e)}}),s)}:e;const me=callbackify;const Ce={flush:C["default"].constants.Z_SYNC_FLUSH,finishFlush:C["default"].constants.Z_SYNC_FLUSH};const Qe={flush:C["default"].constants.BROTLI_OPERATION_FLUSH,finishFlush:C["default"].constants.BROTLI_OPERATION_FLUSH};const Ie=Y.isFunction(C["default"].createBrotliDecompress);const{http:Be,https:ye}=m["default"];const be=/https:?/;const we=$.protocols.map((e=>e+":"));function dispatchBeforeRedirect(e){if(e.beforeRedirects.proxy){e.beforeRedirects.proxy(e)}if(e.beforeRedirects.config){e.beforeRedirects.config(e)}}function setProxy(e,t,n){let s=t;if(!s&&s!==false){const e=r.getProxyForUrl(n);if(e){s=new URL(e)}}if(s){if(s.username){s.auth=(s.username||"")+":"+(s.password||"")}if(s.auth){if(s.auth.username||s.auth.password){s.auth=(s.auth.username||"")+":"+(s.auth.password||"")}const t=Buffer.from(s.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=s.hostname||s.host;e.hostname=t;e.host=t;e.port=s.port;e.path=n;if(s.protocol){e.protocol=s.protocol.includes(":")?s.protocol:`${s.protocol}:`}}e.beforeRedirects.proxy=function beforeRedirect(e){setProxy(e,t,e.href)}}const Re=typeof process!=="undefined"&&Y.kindOf(process)==="process";const wrapAsync=e=>new Promise(((t,n)=>{let s;let i;const done=(e,t)=>{if(i)return;i=true;s&&s(e,t)};const _resolve=e=>{done(e);t(e)};const _reject=e=>{done(e,true);n(e)};e(_resolve,_reject,(e=>s=e)).catch(_reject)}));const resolveFamily=({address:e,family:t})=>{if(!Y.isString(e)){throw TypeError("address must be a string")}return{address:e,family:t||(e.indexOf(".")<0?6:4)}};const buildAddressEntry=(e,t)=>resolveFamily(Y.isObject(e)?e:{address:e,family:t});const ve=Re&&function httpAdapter(e){return wrapAsync((async function dispatchHttpRequest(t,n,s){let{data:i,lookup:r,family:o}=e;const{responseType:A,responseEncoding:a}=e;const c=e.method.toUpperCase();let u;let l=false;let d;if(r){const e=me(r,(e=>Y.isArray(e)?e:[e]));r=(t,n,s)=>{e(t,n,((e,t,i)=>{const r=Y.isArray(t)?t.map((e=>buildAddressEntry(e))):[buildAddressEntry(t,i)];n.all?s(e,r):s(e,r[0].address,r[0].family)}))}}const p=new I["default"];const onFinished=()=>{if(e.cancelToken){e.cancelToken.unsubscribe(abort)}if(e.signal){e.signal.removeEventListener("abort",abort)}p.removeAllListeners()};s(((e,t)=>{u=true;if(t){l=true;onFinished()}}));function abort(t){p.emit("abort",!t||t.type?new CanceledError(null,e,d):t)}p.once("abort",n);if(e.cancelToken||e.signal){e.cancelToken&&e.cancelToken.subscribe(abort);if(e.signal){e.signal.aborted?abort():e.signal.addEventListener("abort",abort)}}const g=buildFullPath(e.baseURL,e.url);const m=new URL(g,"http://localhost");const B=m.protocol||we[0];if(B==="data:"){let s;if(c!=="GET"){return settle(t,n,{status:405,statusText:"method not allowed",headers:{},config:e})}try{s=fromDataURI(e.url,A==="blob",{Blob:e.env&&e.env.Blob})}catch(t){throw AxiosError.from(t,AxiosError.ERR_BAD_REQUEST,e)}if(A==="text"){s=s.toString(a);if(!a||a==="utf8"){s=Y.stripBOM(s)}}else if(A==="stream"){s=Q["default"].Readable.from(s)}return settle(t,n,{data:s,status:200,statusText:"OK",headers:new ie,config:e})}if(we.indexOf(B)===-1){return n(new AxiosError("Unsupported protocol "+B,AxiosError.ERR_BAD_REQUEST,e))}const y=ie.from(e.headers).normalize();y.set("User-Agent","axios/"+re,false);const b=e.onDownloadProgress;const w=e.onUploadProgress;const R=e.maxRate;let v=undefined;let k=undefined;if(Y.isSpecCompliantForm(i)){const e=y.getContentType(/boundary=([-_\w\d]{10,70})/i);i=fe(i,(e=>{y.set(e)}),{tag:`axios-${re}-boundary`,boundary:e&&e[1]||undefined})}else if(Y.isFormData(i)&&Y.isFunction(i.getHeaders)){y.set(i.getHeaders());if(!y.hasContentLength()){try{const e=await E["default"].promisify(i.getLength).call(i);Number.isFinite(e)&&e>=0&&y.setContentLength(e)}catch(e){}}}else if(Y.isBlob(i)){i.size&&y.setContentType(i.type||"application/octet-stream");y.setContentLength(i.size||0);i=Q["default"].Readable.from(ue(i))}else if(i&&!Y.isStream(i)){if(Buffer.isBuffer(i));else if(Y.isArrayBuffer(i)){i=Buffer.from(new Uint8Array(i))}else if(Y.isString(i)){i=Buffer.from(i,"utf-8")}else{return n(new AxiosError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",AxiosError.ERR_BAD_REQUEST,e))}y.setContentLength(i.length,false);if(e.maxBodyLength>-1&&i.length>e.maxBodyLength){return n(new AxiosError("Request body larger than maxBodyLength limit",AxiosError.ERR_BAD_REQUEST,e))}}const S=Y.toFiniteNumber(y.getContentLength());if(Y.isArray(R)){v=R[0];k=R[1]}else{v=k=R}if(i&&(w||v)){if(!Y.isStream(i)){i=Q["default"].Readable.from(i,{objectMode:false})}i=Q["default"].pipeline([i,new ae({length:S,maxRate:Y.toFiniteNumber(v)})],Y.noop);w&&i.on("progress",(e=>{w(Object.assign(e,{upload:true}))}))}let x=undefined;if(e.auth){const t=e.auth.username||"";const n=e.auth.password||"";x=t+":"+n}if(!x&&m.username){const e=m.username;const t=m.password;x=e+":"+t}x&&y.delete("authorization");let D;try{D=buildURL(m.pathname+m.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const s=new Error(t.message);s.config=e;s.url=e.url;s.exists=true;return n(s)}y.set("Accept-Encoding","gzip, compress, deflate"+(Ie?", br":""),false);const _={path:D,method:c,headers:y.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:x,protocol:B,family:o,beforeRedirect:dispatchBeforeRedirect,beforeRedirects:{}};!Y.isUndefined(r)&&(_.lookup=r);if(e.socketPath){_.socketPath=e.socketPath}else{_.hostname=m.hostname;_.port=m.port;setProxy(_,e.proxy,B+"//"+m.hostname+(m.port?":"+m.port:"")+_.path)}let N;const F=be.test(_.protocol);_.agent=F?e.httpsAgent:e.httpAgent;if(e.transport){N=e.transport}else if(e.maxRedirects===0){N=F?f["default"]:h["default"]}else{if(e.maxRedirects){_.maxRedirects=e.maxRedirects}if(e.beforeRedirect){_.beforeRedirects.config=e.beforeRedirect}N=F?ye:Be}if(e.maxBodyLength>-1){_.maxBodyLength=e.maxBodyLength}else{_.maxBodyLength=Infinity}if(e.insecureHTTPParser){_.insecureHTTPParser=e.insecureHTTPParser}d=N.request(_,(function handleResponse(s){if(d.destroyed)return;const i=[s];const r=+s.headers["content-length"];if(b){const e=new ae({length:Y.toFiniteNumber(r),maxRate:Y.toFiniteNumber(k)});b&&e.on("progress",(e=>{b(Object.assign(e,{download:true}))}));i.push(e)}let o=s;const u=s.req||d;if(e.decompress!==false&&s.headers["content-encoding"]){if(c==="HEAD"||s.statusCode===204){delete s.headers["content-encoding"]}switch((s.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":i.push(C["default"].createUnzip(Ce));delete s.headers["content-encoding"];break;case"deflate":i.push(new Ee);i.push(C["default"].createUnzip(Ce));delete s.headers["content-encoding"];break;case"br":if(Ie){i.push(C["default"].createBrotliDecompress(Qe));delete s.headers["content-encoding"]}}}o=i.length>1?Q["default"].pipeline(i,Y.noop):i[0];const g=Q["default"].finished(o,(()=>{g();onFinished()}));const h={status:s.statusCode,statusText:s.statusMessage,headers:new ie(s.headers),config:e,request:u};if(A==="stream"){h.data=o;settle(t,n,h)}else{const s=[];let i=0;o.on("data",(function handleStreamData(t){s.push(t);i+=t.length;if(e.maxContentLength>-1&&i>e.maxContentLength){l=true;o.destroy();n(new AxiosError("maxContentLength size of "+e.maxContentLength+" exceeded",AxiosError.ERR_BAD_RESPONSE,e,u))}}));o.on("aborted",(function handlerStreamAborted(){if(l){return}const t=new AxiosError("maxContentLength size of "+e.maxContentLength+" exceeded",AxiosError.ERR_BAD_RESPONSE,e,u);o.destroy(t);n(t)}));o.on("error",(function handleStreamError(t){if(d.destroyed)return;n(AxiosError.from(t,null,e,u))}));o.on("end",(function handleStreamEnd(){try{let e=s.length===1?s[0]:Buffer.concat(s);if(A!=="arraybuffer"){e=e.toString(a);if(!a||a==="utf8"){e=Y.stripBOM(e)}}h.data=e}catch(t){return n(AxiosError.from(t,null,e,h.request,h))}settle(t,n,h)}))}p.once("abort",(e=>{if(!o.destroyed){o.emit("error",e);o.destroy()}}))}));p.once("abort",(e=>{n(e);d.destroy(e)}));d.on("error",(function handleRequestError(t){n(AxiosError.from(t,null,e,d))}));d.on("socket",(function handleRequestSocket(e){e.setKeepAlive(true,1e3*60)}));if(e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t)){n(new AxiosError("error trying to parse `config.timeout` to int",AxiosError.ERR_BAD_OPTION_VALUE,e,d));return}d.setTimeout(t,(function handleRequestTimeout(){if(u)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const s=e.transitional||Z;if(e.timeoutErrorMessage){t=e.timeoutErrorMessage}n(new AxiosError(t,s.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,d));abort()}))}if(Y.isStream(i)){let t=false;let n=false;i.on("end",(()=>{t=true}));i.once("error",(e=>{n=true;d.destroy(e)}));i.on("close",(()=>{if(!t&&!n){abort(new CanceledError("Request stream has been aborted",e,d))}}));i.pipe(d)}else{d.end(i)}}))};const ke=$.isStandardBrowserEnv?function standardBrowserEnv(){return{write:function write(e,t,n,s,i,r){const o=[];o.push(e+"="+encodeURIComponent(t));if(Y.isNumber(n)){o.push("expires="+new Date(n).toGMTString())}if(Y.isString(s)){o.push("path="+s)}if(Y.isString(i)){o.push("domain="+i)}if(r===true){o.push("secure")}document.cookie=o.join("; ")},read:function read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function remove(e){this.write(e,"",Date.now()-864e5)}}}():function nonStandardBrowserEnv(){return{write:function write(){},read:function read(){return null},remove:function remove(){}}}();const Se=$.isStandardBrowserEnv?function standardBrowserEnv(){const e=/(msie|trident)/i.test(navigator.userAgent);const t=document.createElement("a");let n;function resolveURL(n){let s=n;if(e){t.setAttribute("href",s);s=t.href}t.setAttribute("href",s);return{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}n=resolveURL(window.location.href);return function isURLSameOrigin(e){const t=Y.isString(e)?resolveURL(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function nonStandardBrowserEnv(){return function isURLSameOrigin(){return true}}();function progressEventReducer(e,t){let n=0;const s=speedometer(50,250);return i=>{const r=i.loaded;const o=i.lengthComputable?i.total:undefined;const A=r-n;const a=s(A);const c=r<=o;n=r;const u={loaded:r,total:o,progress:o?r/o:undefined,bytes:A,rate:a?a:undefined,estimated:a&&o&&c?(o-r)/a:undefined,event:i};u[t?"download":"upload"]=true;e(u)}}const xe=typeof XMLHttpRequest!=="undefined";const De=xe&&function(e){return new Promise((function dispatchXhrRequest(t,n){let s=e.data;const i=ie.from(e.headers).normalize();const r=e.responseType;let o;function done(){if(e.cancelToken){e.cancelToken.unsubscribe(o)}if(e.signal){e.signal.removeEventListener("abort",o)}}let A;if(Y.isFormData(s)){if($.isStandardBrowserEnv||$.isStandardBrowserWebWorkerEnv){i.setContentType(false)}else if(!i.getContentType(/^\s*multipart\/form-data/)){i.setContentType("multipart/form-data")}else if(Y.isString(A=i.getContentType())){i.setContentType(A.replace(/^\s*(multipart\/form-data);+/,"$1"))}}let a=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"";const n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+n))}const c=buildFullPath(e.baseURL,e.url);a.open(e.method.toUpperCase(),buildURL(c,e.params,e.paramsSerializer),true);a.timeout=e.timeout;function onloadend(){if(!a){return}const s=ie.from("getAllResponseHeaders"in a&&a.getAllResponseHeaders());const i=!r||r==="text"||r==="json"?a.responseText:a.response;const o={data:i,status:a.status,statusText:a.statusText,headers:s,config:e,request:a};settle((function _resolve(e){t(e);done()}),(function _reject(e){n(e);done()}),o);a=null}if("onloadend"in a){a.onloadend=onloadend}else{a.onreadystatechange=function handleLoad(){if(!a||a.readyState!==4){return}if(a.status===0&&!(a.responseURL&&a.responseURL.indexOf("file:")===0)){return}setTimeout(onloadend)}}a.onabort=function handleAbort(){if(!a){return}n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,a));a=null};a.onerror=function handleError(){n(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,a));a=null};a.ontimeout=function handleTimeout(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const s=e.transitional||Z;if(e.timeoutErrorMessage){t=e.timeoutErrorMessage}n(new AxiosError(t,s.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,a));a=null};if($.isStandardBrowserEnv){const t=Se(c)&&e.xsrfCookieName&&ke.read(e.xsrfCookieName);if(t){i.set(e.xsrfHeaderName,t)}}s===undefined&&i.setContentType(null);if("setRequestHeader"in a){Y.forEach(i.toJSON(),(function setRequestHeader(e,t){a.setRequestHeader(t,e)}))}if(!Y.isUndefined(e.withCredentials)){a.withCredentials=!!e.withCredentials}if(r&&r!=="json"){a.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){a.addEventListener("progress",progressEventReducer(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&a.upload){a.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress))}if(e.cancelToken||e.signal){o=t=>{if(!a){return}n(!t||t.type?new CanceledError(null,e,a):t);a.abort();a=null};e.cancelToken&&e.cancelToken.subscribe(o);if(e.signal){e.signal.aborted?o():e.signal.addEventListener("abort",o)}}const u=parseProtocol(c);if(u&&$.protocols.indexOf(u)===-1){n(new AxiosError("Unsupported protocol "+u+":",AxiosError.ERR_BAD_REQUEST,e));return}a.send(s||null)}))};const _e={http:ve,xhr:De};Y.forEach(_e,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const renderReason=e=>`- ${e}`;const isResolvedHandle=e=>Y.isFunction(e)||e===null||e===false;const Ne={getAdapter:e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let n;let s;const i={};for(let r=0;r`adapter ${e} `+(t===false?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified";throw new AxiosError(`There is no suitable adapter to dispatch the request `+n,"ERR_NOT_SUPPORT")}return s},adapters:_e};function throwIfCancellationRequested(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new CanceledError(null,e)}}function dispatchRequest(e){throwIfCancellationRequested(e);e.headers=ie.from(e.headers);e.data=transformData.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=Ne.getAdapter(e.adapter||te.adapter);return t(e).then((function onAdapterResolution(t){throwIfCancellationRequested(e);t.data=transformData.call(e,e.transformResponse,t);t.headers=ie.from(t.headers);return t}),(function onAdapterRejection(t){if(!isCancel(t)){throwIfCancellationRequested(e);if(t&&t.response){t.response.data=transformData.call(e,e.transformResponse,t.response);t.response.headers=ie.from(t.response.headers)}}return Promise.reject(t)}))}const headersToObject=e=>e instanceof ie?e.toJSON():e;function mergeConfig(e,t){t=t||{};const n={};function getMergedValue(e,t,n){if(Y.isPlainObject(e)&&Y.isPlainObject(t)){return Y.merge.call({caseless:n},e,t)}else if(Y.isPlainObject(t)){return Y.merge({},t)}else if(Y.isArray(t)){return t.slice()}return t}function mergeDeepProperties(e,t,n){if(!Y.isUndefined(t)){return getMergedValue(e,t,n)}else if(!Y.isUndefined(e)){return getMergedValue(undefined,e,n)}}function valueFromConfig2(e,t){if(!Y.isUndefined(t)){return getMergedValue(undefined,t)}}function defaultToConfig2(e,t){if(!Y.isUndefined(t)){return getMergedValue(undefined,t)}else if(!Y.isUndefined(e)){return getMergedValue(undefined,e)}}function mergeDirectKeys(n,s,i){if(i in t){return getMergedValue(n,s)}else if(i in e){return getMergedValue(undefined,n)}}const s={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials: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:(e,t)=>mergeDeepProperties(headersToObject(e),headersToObject(t),true)};Y.forEach(Object.keys(Object.assign({},e,t)),(function computeConfigValue(i){const r=s[i]||mergeDeepProperties;const o=r(e[i],t[i],i);Y.isUndefined(o)&&r!==mergeDirectKeys||(n[i]=o)}));return n}const Fe={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Fe[e]=function validator(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ue={};Fe.transitional=function transitional(e,t,n){function formatMessage(e,t){return"[Axios v"+re+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,i)=>{if(e===false){throw new AxiosError(formatMessage(s," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED)}if(t&&!Ue[s]){Ue[s]=true;console.warn(formatMessage(s," has been deprecated since v"+t+" and will be removed in the near future"))}return e?e(n,s,i):true}};function assertOptions(e,t,n){if(typeof e!=="object"){throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE)}const s=Object.keys(e);let i=s.length;while(i-- >0){const r=s[i];const o=t[r];if(o){const t=e[r];const n=t===undefined||o(t,r,e);if(n!==true){throw new AxiosError("option "+r+" must be "+n,AxiosError.ERR_BAD_OPTION_VALUE)}continue}if(n!==true){throw new AxiosError("Unknown option "+r,AxiosError.ERR_BAD_OPTION)}}}const Te={assertOptions:assertOptions,validators:Fe};const Me=Te.validators;class Axios{constructor(e){this.defaults=e;this.interceptors={request:new z,response:new z}}request(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=mergeConfig(this.defaults,t);const{transitional:n,paramsSerializer:s,headers:i}=t;if(n!==undefined){Te.assertOptions(n,{silentJSONParsing:Me.transitional(Me.boolean),forcedJSONParsing:Me.transitional(Me.boolean),clarifyTimeoutError:Me.transitional(Me.boolean)},false)}if(s!=null){if(Y.isFunction(s)){t.paramsSerializer={serialize:s}}else{Te.assertOptions(s,{encode:Me.function,serialize:Me.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=i&&Y.merge(i.common,i[t.method]);i&&Y.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]}));t.headers=ie.concat(r,i);const o=[];let A=true;this.interceptors.request.forEach((function unshiftRequestInterceptors(e){if(typeof e.runWhen==="function"&&e.runWhen(t)===false){return}A=A&&e.synchronous;o.unshift(e.fulfilled,e.rejected)}));const a=[];this.interceptors.response.forEach((function pushResponseInterceptors(e){a.push(e.fulfilled,e.rejected)}));let c;let u=0;let l;if(!A){const e=[dispatchRequest.bind(this),undefined];e.unshift.apply(e,o);e.push.apply(e,a);l=e.length;c=Promise.resolve(t);while(u{if(!n._listeners)return;let t=n._listeners.length;while(t-- >0){n._listeners[t](e)}n._listeners=null}));this.promise.then=e=>{let t;const s=new Promise((e=>{n.subscribe(e);t=e})).then(e);s.cancel=function reject(){n.unsubscribe(t)};return s};e((function cancel(e,s,i){if(n.reason){return}n.reason=new CanceledError(e,s,i);t(n.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}}unsubscribe(e){if(!this._listeners){return}const t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}}static source(){let e;const t=new CancelToken((function executor(t){e=t}));return{token:t,cancel:e}}}const Oe=CancelToken;function spread(e){return function wrap(t){return e.apply(null,t)}}function isAxiosError(e){return Y.isObject(e)&&e.isAxiosError===true}const Pe={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(Pe).forEach((([e,t])=>{Pe[t]=e}));const Je=Pe;function createInstance(e){const t=new Le(e);const n=bind(Le.prototype.request,t);Y.extend(n,Le.prototype,t,{allOwnKeys:true});Y.extend(n,t,null,{allOwnKeys:true});n.create=function create(t){return createInstance(mergeConfig(e,t))};return n}const He=createInstance(te);He.Axios=Le;He.CanceledError=CanceledError;He.CancelToken=Oe;He.isCancel=isCancel;He.VERSION=re;He.toFormData=toFormData;He.AxiosError=AxiosError;He.Cancel=He.CanceledError;He.all=function all(e){return Promise.all(e)};He.spread=spread;He.isAxiosError=isAxiosError;He.mergeConfig=mergeConfig;He.AxiosHeaders=ie;He.formToJSON=e=>formDataToJSON(Y.isHTMLForm(e)?new FormData(e):e);He.getAdapter=Ne.getAdapter;He.HttpStatusCode=Je;He.default=He;e.exports=He},3765:e=>{"use strict";e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"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/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+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/at+jwt":{"source":"iana"},"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-dynamic-event-message":{"source":"iana"},"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","charset":"UTF-8","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/captive+json":{"source":"iana","compressible":true},"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/city+json":{"source":"iana","compressible":true},"application/clr":{"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,"extensions":["cpl"]},"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/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"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/dots+cbor":{"source":"iana"},"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":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"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/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","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","charset":"UTF-8","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/jscalendar+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/lpf+zip":{"source":"iana","compressible":false},"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":{"source":"iana","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,"extensions":["mpf"]},"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/missing-blocks+cbor-seq":{"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},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","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","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"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/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"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","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","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","charset":"UTF-8","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.cyn":{"source":"iana","charset":"7-BIT"},"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/pvd+json":{"source":"iana","compressible":true},"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/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"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-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"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/spdx+json":{"source":"iana","compressible":true},"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/td+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/token-introspection+jwt":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"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,"extensions":["td"]},"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.5gnas":{"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.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"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.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"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.s1ap":{"source":"iana"},"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.cmoca-cmresource":{"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-cmtable":{"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.age":{"source":"iana","extensions":["age"]},"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.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"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":["key"]},"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.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"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.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"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.dbf":{"source":"iana","extensions":["dbf"]},"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.dvbisl+xml":{"source":"iana","compressible":true},"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.eclipse.ditto+json":{"source":"iana","compressible":true},"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.eu.kasparian.car+json":{"source":"iana","compressible":true},"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.familysearch.gedcom+zip":{"source":"iana","compressible":false},"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.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"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.slides":{"source":"iana"},"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.hl7cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"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","extensions":["mvt"]},"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.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"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.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"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.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"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+cbor":{"source":"iana"},"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","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","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.opentimestamps.ots":{"source":"iana"},"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","extensions":["rar"]},"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.resilient.logic":{"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.sar":{"source":"iana"},"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.seis+json":{"source":"iana","compressible":true},"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.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"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.snesdev-page-table":{"source":"iana"},"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.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","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","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","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.veritone.aion+json":{"source":"iana","compressible":true},"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","charset":"UTF-8","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.dpp":{"source":"iana"},"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":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"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-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"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-pki-message":{"source":"iana"},"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":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"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},"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":["xsl","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","extensions":["amr"]},"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/mhas":{"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","opus"]},"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/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"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/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"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","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"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/ktx2":{"source":"iana","extensions":["ktx2"]},"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","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"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.pco.b16":{"source":"iana","extensions":["b16"]},"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/e57":{"source":"iana"},"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/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/step":{"source":"iana"},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"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.pytha.pyox":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"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/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"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/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"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","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"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/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"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","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"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.hans":{"source":"iana"},"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","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"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":{"compressible":true,"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/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"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","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"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/scip":{"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/vp9":{"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}}')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var n=__webpack_module_cache__[e]={exports:{}};var s=true;try{__webpack_modules__[e].call(n.exports,n,n.exports,__nccwpck_require__);s=false}finally{if(s)delete __webpack_module_cache__[e]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(4822);module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/.github/actions/invite-user/package-lock.json b/.github/actions/invite-user/package-lock.json new file mode 100644 index 00000000..c53e20ba --- /dev/null +++ b/.github/actions/invite-user/package-lock.json @@ -0,0 +1,217 @@ +{ + "name": "invite-user", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "invite-user", + "version": "1.0.0", + "dependencies": { + "@actions/core": "^1.10.0", + "@vercel/ncc": "^0.34.0", + "auth0": "^4.1.0", + "axios": "^1.6.0" + }, + "devDependencies": { + "typescript": "^5.2.2" + } + }, + "node_modules/@actions/core": { + "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/http-client": { + "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", + "undici": "^5.25.4" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@vercel/ncc": { + "version": "0.34.0", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.34.0.tgz", + "integrity": "sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A==", + "bin": { + "ncc": "dist/ncc/cli.js" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/auth0": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/auth0/-/auth0-4.1.0.tgz", + "integrity": "sha512-1CpjWPOuWPAhQZy46/T/jOViy1WXhytmdlZji693ZpBfugYw181+JXfKLzjea59oKmo4HFctD05cec7xGdysfQ==", + "dependencies": { + "jose": "^4.13.2", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/auth0/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/axios": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "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==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "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": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": 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==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jose": { + "version": "4.15.4", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.4.tgz", + "integrity": "sha512-W+oqK4H+r5sITxfxpSU+MMdr/YSWGvgZMQDIsNoBDGGy4i7GBPTtvFKibQzW06n3U3TqHjhvBJsirShsEJ6eeQ==", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "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==", + "engines": { + "node": ">= 0.6" + } + }, + "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==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "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==" + }, + "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/typescript": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici": { + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.27.0.tgz", + "integrity": "sha512-l3ydWhlhOJzMVOYkymLykcRRXqbUaQriERtR70B9LzNkZ4bX52Fc8wbTDneMiwo8T+AemZXvXaTx+9o5ROxrXg==", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "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==", + "bin": { + "uuid": "dist/bin/uuid" + } + } + } +} diff --git a/.github/actions/invite-user/package.json b/.github/actions/invite-user/package.json new file mode 100644 index 00000000..6e9525e6 --- /dev/null +++ b/.github/actions/invite-user/package.json @@ -0,0 +1,20 @@ +{ + "name": "invite-user", + "version": "1.0.0", + "description": "Invite a user to Shape Docs", + "main": "lib/index.js", + "author": "Shape", + "scripts": { + "build": "tsc && ncc build --minify", + "test": "jest" + }, + "dependencies": { + "@actions/core": "^1.10.0", + "@vercel/ncc": "^0.34.0", + "auth0": "^4.1.0", + "axios": "^1.6.0" + }, + "devDependencies": { + "typescript": "^5.2.2" + } +} diff --git a/.github/actions/invite-user/src/Action.ts b/.github/actions/invite-user/src/Action.ts new file mode 100644 index 00000000..07bb9023 --- /dev/null +++ b/.github/actions/invite-user/src/Action.ts @@ -0,0 +1,87 @@ +import IStateStore from "./StateStore/IStateStore" +import ILogger from "./Logger/ILogger" +import IUserClient from "./UserClient/IUserClient" +import IPasswordGenerator from "./PasswordGenerator/IPasswordGenerator" +import IRoleNameParser from "./RoleNameParser/IRoleNameParser" + +export interface ActionOptions { + readonly name: string + readonly email: string + readonly roles: string +} + +export interface ActionConfig { + readonly stateStore: IStateStore + readonly logger: ILogger + readonly userClient: IUserClient + readonly passwordGenerator: IPasswordGenerator + readonly roleNameParser: IRoleNameParser +} + +export default class Action { + private readonly stateStore: IStateStore + private readonly logger: ILogger + private readonly userClient: IUserClient + private readonly passwordGenerator: IPasswordGenerator + private readonly roleNameParser: IRoleNameParser + + constructor(config: ActionConfig) { + this.stateStore = config.stateStore + this.logger = config.logger + this.userClient = config.userClient + this.passwordGenerator = config.passwordGenerator + this.roleNameParser = config.roleNameParser + } + + async run(options: ActionOptions) { + if (!this.stateStore.isPost) { + await this.runMain(options) + this.stateStore.isPost = true + } + } + + private async runMain(options: ActionOptions) { + if (!options.name || options.name.length == 0) { + throw new Error("No name supplied.") + } + if (!options.email || options.email.length == 0) { + throw new Error("No e-mail supplied.") + } + if (!options.roles || options.roles.length == 0) { + throw new Error("No roles supplied.") + } + const roleNames = this.roleNameParser.parse(options.roles) + if (roleNames.length == 0) { + throw new Error("No roles supplied.") + } + const existingUser = await this.userClient.getUser({ email: options.email }) + let user = existingUser + if (!existingUser) { + const password = this.passwordGenerator.generatePassword() + const newUser = await this.userClient.createUser({ + name: options.name, + email: options.email, + password: password + }) + user = newUser + } + if (!user) { + throw new Error("Could not get an existing user or create a new user.") + } + const roles = await this.userClient.createRoles({ roleNames }) + if (roles.length == 0) { + throw new Error("Received an empty set of roles.") + } + const roleIDs = roles.map(e => e.id) + await this.userClient.assignRolesToUser({ + userID: user.id, + roleIDs: roleIDs + }) + if (existingUser) { + await this.userClient.sendChangePasswordEmail({ email: user.email }) + this.logger.log(`${user.id} (${user.email}) has been invited.`) + } else { + this.logger.log(`${user.id} (${user.email}) has been updated.`) + } + } +} diff --git a/.github/actions/invite-user/src/Logger/ILogger.ts b/.github/actions/invite-user/src/Logger/ILogger.ts new file mode 100644 index 00000000..5093d452 --- /dev/null +++ b/.github/actions/invite-user/src/Logger/ILogger.ts @@ -0,0 +1,4 @@ +export default interface ILogger { + log(message: string): void + error(message: string): void +} diff --git a/.github/actions/invite-user/src/Logger/Logger.ts b/.github/actions/invite-user/src/Logger/Logger.ts new file mode 100644 index 00000000..e4ea571c --- /dev/null +++ b/.github/actions/invite-user/src/Logger/Logger.ts @@ -0,0 +1,12 @@ +import * as core from "@actions/core" +import ILogger from "./ILogger" + +export default class Logger implements ILogger { + log(message: string) { + console.log(message) + } + + error(message: string) { + core.setFailed(message) + } +} diff --git a/.github/actions/invite-user/src/PasswordGenerator/IPasswordGenerator.ts b/.github/actions/invite-user/src/PasswordGenerator/IPasswordGenerator.ts new file mode 100644 index 00000000..5aa88129 --- /dev/null +++ b/.github/actions/invite-user/src/PasswordGenerator/IPasswordGenerator.ts @@ -0,0 +1,3 @@ +export default interface IPasswordGenerator { + generatePassword(): string +} diff --git a/.github/actions/invite-user/src/PasswordGenerator/PasswordGenerator.ts b/.github/actions/invite-user/src/PasswordGenerator/PasswordGenerator.ts new file mode 100644 index 00000000..69ec2793 --- /dev/null +++ b/.github/actions/invite-user/src/PasswordGenerator/PasswordGenerator.ts @@ -0,0 +1,14 @@ +import IPasswordGenerator from "./IPasswordGenerator" + +export default class PasswordGenerator implements IPasswordGenerator { + generatePassword(): string { + let pass = "" + const str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$" + const length = 18 + for (let i = 1; i <= length; i++) { + const char = Math.floor(Math.random() * str.length + 1) + pass += str.charAt(char) + } + return pass + } +} diff --git a/.github/actions/invite-user/src/RoleNameParser/IRoleNameParser.ts b/.github/actions/invite-user/src/RoleNameParser/IRoleNameParser.ts new file mode 100644 index 00000000..c235ecef --- /dev/null +++ b/.github/actions/invite-user/src/RoleNameParser/IRoleNameParser.ts @@ -0,0 +1,3 @@ +export default interface IRoleNameParser { + parse(roleNames: string): string[] +} diff --git a/.github/actions/invite-user/src/RoleNameParser/RoleNameParser.ts b/.github/actions/invite-user/src/RoleNameParser/RoleNameParser.ts new file mode 100644 index 00000000..94621838 --- /dev/null +++ b/.github/actions/invite-user/src/RoleNameParser/RoleNameParser.ts @@ -0,0 +1,9 @@ +import IRoleNameParser from "./IRoleNameParser" + +export default class RoleNameParser implements IRoleNameParser { + parse(roleNames: string): string[] { + return roleNames.split(",") + .map(e => e.trim().toLowerCase()) + .filter(e => e.length > 0) + } +} diff --git a/.github/actions/invite-user/src/StateStore/IStateStore.ts b/.github/actions/invite-user/src/StateStore/IStateStore.ts new file mode 100644 index 00000000..8dad4e68 --- /dev/null +++ b/.github/actions/invite-user/src/StateStore/IStateStore.ts @@ -0,0 +1,3 @@ +export default interface IStateStore { + isPost: boolean +} diff --git a/.github/actions/invite-user/src/StateStore/KeyValueStateStore.ts b/.github/actions/invite-user/src/StateStore/KeyValueStateStore.ts new file mode 100644 index 00000000..1d883334 --- /dev/null +++ b/.github/actions/invite-user/src/StateStore/KeyValueStateStore.ts @@ -0,0 +1,27 @@ +import IStateStore from "./IStateStore" + +export interface KeyValueStateWriterReader { + getState(name: string): string | null + saveState(name: string, value: any | null): void +} + +const KEY = { + IS_POST: "isPost" +} + +export default class KeyValueStateStore implements IStateStore { + private writerReader: KeyValueStateWriterReader + + constructor(writerReader: KeyValueStateWriterReader) { + this.writerReader = writerReader + this.isPost = false + } + + get isPost(): boolean { + return !!this.writerReader.getState(KEY.IS_POST) + } + + set isPost(isPost: boolean) { + this.writerReader.saveState(KEY.IS_POST, isPost) + } +} diff --git a/.github/actions/invite-user/src/UserClient/Auth0UserClient.ts b/.github/actions/invite-user/src/UserClient/Auth0UserClient.ts new file mode 100644 index 00000000..a81e01ce --- /dev/null +++ b/.github/actions/invite-user/src/UserClient/Auth0UserClient.ts @@ -0,0 +1,119 @@ +import axios from "axios" +import { ManagementClient } from "auth0" +import IUserClient, { User, Role } from "./IUserClient" + +export interface Auth0UserClientConfig { + domain: string + clientId: string + clientSecret: string +} + +export default class Auth0UserClient implements IUserClient { + private readonly config: Auth0UserClientConfig + private readonly managementClient: ManagementClient + + constructor(config: Auth0UserClientConfig) { + this.config = config + this.managementClient = new ManagementClient({ + domain: config.domain, + clientId: config.clientId, + clientSecret: config.clientSecret + }) + } + + async getUser(request: { email: string }): Promise { + const response = await this.managementClient.usersByEmail.getByEmail({ + email: request.email + }) + if (response.data.length == 0) { + return null + } + const user = response.data[0] + return { + id: user.user_id, + email: user.email + } + } + + async createUser(request: { name: string, email: string, password: string }): Promise { + const response = await this.managementClient.users.create({ + connection: "Username-Password-Authentication", + name: request.name, + email: request.email, + email_verified: true, + password: request.password, + app_metadata: { + has_pending_invitation: true + } + }) + return { + id: response.data.user_id, + email: response.data.email + } + } + + async createRoles(request: { roleNames: string[] }): Promise { + const allRolesResponse = await this.managementClient.roles.getAll() + const allRoles = allRolesResponse.data + const existingRoles = allRoles.filter((role: Role) => { + return request.roleNames.includes(role.name) + }).map(role => { + return { id: role.id, name: role.name } + }) + const roleNamesToAdd = request.roleNames.filter(roleName => { + const existingRole = existingRoles.find(role => { + return role.name == roleName + }) + return existingRole == null + }) + const responses = await Promise.all(roleNamesToAdd.map(roleName => { + return this.managementClient.roles.create({ name: roleName }) + })) + const addedRoles = responses.map(response => { + return { + id: response.data.id, + name: response.data.name + } + }) + return existingRoles.concat(addedRoles) + } + + async assignRolesToUser(request: { userID: string, roleIDs: string[] }): Promise { + await this.managementClient.users.assignRoles({ + id: request.userID + }, { + roles: request.roleIDs + }) + } + + async sendChangePasswordEmail(request: { email: string }): Promise { + const token = await this.getToken() + await axios.post(this.getURL("/dbconnections/change_password"), { + email: request.email, + connection: "Username-Password-Authentication" + }, { + headers: { + "Authorization": `Bearer ${token}`, + "Content-Type": "application/json" + } + }) + } + + private async getToken(): Promise { + const response = await axios.post(this.getURL("/oauth/token"), { + "grant_type": "client_credentials", + "client_id": this.config.clientId, + "client_secret": this.config.clientSecret, + "audience": `https://${this.config.domain}/api/v2/` + }, { + headers: { + "Content-Type": "application/x-www-form-urlencoded" + } + }) + return response.data.access_token + } + + private getURL(path: string): string { + return `https://${this.config.domain}${path}` + } +} diff --git a/.github/actions/invite-user/src/UserClient/IUserClient.ts b/.github/actions/invite-user/src/UserClient/IUserClient.ts new file mode 100644 index 00000000..7e0b6613 --- /dev/null +++ b/.github/actions/invite-user/src/UserClient/IUserClient.ts @@ -0,0 +1,17 @@ +export type User = { + readonly id: string + readonly email: string +} + +export type Role = { + readonly id: string + readonly name: string +} + +export default interface IUserClient { + getUser(request: { email: string }): Promise + createUser(request: { name: string, email: string, password: string }): Promise + createRoles(request: { roleNames: string[] }): Promise + assignRolesToUser(request: { userID: string, roleIDs: string[] }): Promise + sendChangePasswordEmail(request: { email: string }): Promise +} diff --git a/.github/actions/invite-user/src/getOptions.ts b/.github/actions/invite-user/src/getOptions.ts new file mode 100644 index 00000000..ae6dcd20 --- /dev/null +++ b/.github/actions/invite-user/src/getOptions.ts @@ -0,0 +1,10 @@ +import * as core from "@actions/core" +import { ActionOptions } from "./Action" + +export default function getOptions(): ActionOptions { + return { + name: core.getInput("name"), + email: core.getInput("email"), + roles: core.getInput("roles") + } +} diff --git a/.github/actions/invite-user/src/index.ts b/.github/actions/invite-user/src/index.ts new file mode 100644 index 00000000..71bd61b3 --- /dev/null +++ b/.github/actions/invite-user/src/index.ts @@ -0,0 +1,42 @@ +import * as core from "@actions/core" +import Action from "./Action" +import Auth0UserClient from "./UserClient/Auth0UserClient" +import getOptions from "./getOptions" +import Logger from "./Logger/Logger" +import KeyValueStateStore from "./StateStore/KeyValueStateStore" +import PasswordGenerator from "./PasswordGenerator/PasswordGenerator" +import RoleNameParser from "./RoleNameParser/RoleNameParser" + +const { + AUTH0_MANAGEMENT_CLIENT_ID, + AUTH0_MANAGEMENT_CLIENT_SECRET, + AUTH0_MANAGEMENT_CLIENT_DOMAIN +} = process.env + +if (!AUTH0_MANAGEMENT_CLIENT_ID || AUTH0_MANAGEMENT_CLIENT_ID.length == 0) { + throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.") +} else if (!AUTH0_MANAGEMENT_CLIENT_SECRET || AUTH0_MANAGEMENT_CLIENT_SECRET.length == 0) { + throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.") +} else if (!AUTH0_MANAGEMENT_CLIENT_DOMAIN || AUTH0_MANAGEMENT_CLIENT_DOMAIN.length == 0) { + throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.") +} + +const stateStore = new KeyValueStateStore(core) +const logger = new Logger() +const userClient = new Auth0UserClient({ + clientId: AUTH0_MANAGEMENT_CLIENT_ID, + clientSecret: AUTH0_MANAGEMENT_CLIENT_SECRET, + domain: AUTH0_MANAGEMENT_CLIENT_DOMAIN +}) +const passwordGenerator = new PasswordGenerator() +const roleNameParser = new RoleNameParser() +const action = new Action({ + stateStore, + logger, + userClient, + passwordGenerator, + roleNameParser +}) +action.run(getOptions()).catch((err: Error) => { + logger.error(err.toString()) +}) diff --git a/.github/actions/invite-user/tsconfig.json b/.github/actions/invite-user/tsconfig.json new file mode 100644 index 00000000..816d6560 --- /dev/null +++ b/.github/actions/invite-user/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "lib": ["es6"], + "outDir": "./lib", + "rootDir": "./src", + "declaration": true, + "strict": true, + "noImplicitAny": false, + "esModuleInterop": true, + "skipLibCheck": true + }, + "exclude": ["__test__", "lib", "node_modules"] +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8f322f0d..a38f3252 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +.github/actions/invite-user/lib From c4497864b9f2d324f0b1ca24649c10adac27133b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 17:45:34 +0100 Subject: [PATCH 12/53] Uses invite-user action --- .github/workflows/invite-guest.yml | 118 ++--------------------------- 1 file changed, 5 insertions(+), 113 deletions(-) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index 5aee2e8b..d2790a4e 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -30,17 +30,11 @@ jobs: - name: Configure for Production if: "${{ github.event.inputs.environment == 'production' }}" run: | - echo "AUTH0_TENANT=shape-docs" >> $GITHUB_ENV - echo "AUTH0_REGION=eu" >> $GITHUB_ENV - echo "REDIRECT_URL=https://docs.shapetools.io" >> $GITHUB_ENV echo "AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client ID/password" >> $GITHUB_ENV echo "AUTH0_MANAGEMENT_CLIENT_SECRET_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client Secret/password" >> $GITHUB_ENV - name: Configure for Staging if: "${{ github.event.inputs.environment == 'staging' }}" run: | - echo "AUTH0_TENANT=shape-docs-dev" >> $GITHUB_ENV - echo "AUTH0_REGION=eu" >> $GITHUB_ENV - echo "REDIRECT_URL=https://staging.docs.shapetools.io" >> $GITHUB_ENV echo "AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client ID Staging/password" >> $GITHUB_ENV echo "AUTH0_MANAGEMENT_CLIENT_SECRET_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client Secret Staging/password" >> $GITHUB_ENV - name: Install Secrets @@ -52,110 +46,8 @@ jobs: echo "::add-mask::${AUTH0_MANAGEMENT_CLIENT_ID}" echo "::add-mask::${AUTH0_MANAGEMENT_CLIENT_SECRET}" - name: Send Invitation - run: | - AUTH0_MANAGEMENT_DOMAIN="${AUTH0_TENANT}.${AUTH0_REGION}.auth0.com" - USER_NAME="${{ github.event.inputs.name }}" - USER_EMAIL="${{ github.event.inputs.email }}" - USER_PASSWORD=$(openssl rand -base64 18) - STR_ROLES="${{ github.event.inputs.roles }}" - - # Get a token to use when authorizing against Auth0's Management API. - TOKEN_RESPONSE=$( - curl --silent --request POST\ - --url "https://${AUTH0_MANAGEMENT_DOMAIN}/oauth/token"\ - --header "Content-Type: application/x-www-form-urlencoded"\ - --data grant_type=client_credentials\ - --data "client_id=${AUTH0_MANAGEMENT_CLIENT_ID}"\ - --data "client_secret=${AUTH0_MANAGEMENT_CLIENT_SECRET}"\ - --data "audience=https://${AUTH0_MANAGEMENT_DOMAIN}/api/v2/" - ) - TOKEN=$(echo $TOKEN_RESPONSE | jq -r .access_token) - - # Get existing user with the email. - URLENCODED_USER_EMAIL=$(jq -rn --arg USER_EMAIL "${USER_EMAIL}" '$USER_EMAIL|@uri') - GET_USER_RESPONSE=$( - curl --silent --request GET\ - --url "https://${AUTH0_MANAGEMENT_DOMAIN}/api/v2/users-by-email?email=${URLENCODED_USER_EMAIL}"\ - --header "Authorization: Bearer ${TOKEN}" - ) - EXISTING_USER_ID=$(echo $GET_USER_RESPONSE | jq -r ".[] | .user_id") - USER_ID=$EXISTING_USER_ID - - if [ -z "$EXISTING_USER_ID" ]; then - # User does not exist so we create it with the random password. - CREATE_USER_REQUEST_BODY=$( - jq -n '{"connection":"Username-Password-Authentication","name":$USER_NAME,"email":$USER_EMAIL,"email_verified":true,"password":$USER_PASSWORD,"app_metadata":{"has_pending_invitation":true}}'\ - --arg "USER_NAME" "${USER_NAME}"\ - --arg "USER_EMAIL" "${USER_EMAIL}"\ - --arg "USER_PASSWORD" "${USER_PASSWORD}" - ) - CREATE_USER_RESPONSE=$( - curl --silent --request POST\ - --url "https://${AUTH0_MANAGEMENT_DOMAIN}/api/v2/users"\ - --header "Authorization: Bearer ${TOKEN}"\ - --header "Content-Type: application/json"\ - --data "${CREATE_USER_REQUEST_BODY}" - ) - USER_ID=$(echo $CREATE_USER_RESPONSE | jq -r ".user_id") - fi - - # Create all the roles. - IFS=',' read -ra UNTRIMMED_ROLES <<< "$STR_ROLES" - for role in "${UNTRIMMED_ROLES[@]}"; do - trimmed_role=$(echo "$role" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - lowercase_role=$(echo "${trimmed_role}" | awk '{print tolower($0)}') - ROLES+=("$lowercase_role") - done - for role in "${ROLES[@]}"; do - body=$(jq -n '{"name":$ROLE,"description":$ROLE}' --arg "ROLE" "${role}") - curl --silent --request POST\ - --url "https://${AUTH0_MANAGEMENT_DOMAIN}/api/v2/roles"\ - --header "Authorization: Bearer ${TOKEN}"\ - --header "Content-Type: application/json"\ - --data "${body}"\ - -o /dev/null - done - - # Find IDs of roles to assign - ROLES_RESPONSE=$( - curl --silent --request GET\ - --url "https://${AUTH0_MANAGEMENT_DOMAIN}/api/v2/roles"\ - --header "Authorization: Bearer ${TOKEN}"\ - ) - JSON_ROLES=$(printf '%s\n' "${ROLES[@]}" | jq -R . | jq -s .) - ROLE_LIST=$(echo $JSON_ROLES | jq -r 'map("\"\(.)\"") | join(",")') - ROLE_IDS=$(echo "${ROLES_RESPONSE}" | jq 'map(select(.name | IN('"${ROLE_LIST}"')).id)') - - # Assign roles using IDs - ASSIGN_ROLES_REQUEST_BODY=$(jq -n '{"roles":$ROLE_IDS}' --argjson "ROLE_IDS" "${ROLE_IDS}") - curl --silent --request POST\ - --url "https://${AUTH0_MANAGEMENT_DOMAIN}/api/v2/users/${USER_ID}/roles"\ - --header "Authorization: Bearer ${TOKEN}"\ - --header "Content-Type: application/json"\ - --data "${ASSIGN_ROLES_REQUEST_BODY}" - - URLENCODED_USER_ID=$(jq -rn --arg USER_ID "${USER_ID}" '$USER_ID|@uri') - USER_MANAGEMENT_URL="https://manage.auth0.com/dashboard/${AUTH0_REGION}/${AUTH0_TENANT}/users/${URLENCODED_USER_ID}" - if [ -z "$EXISTING_USER_ID" ]; then - # Send the user an e-mail asking to change their password. - PASSWORD_CHANGE_REQUEST_BODY=$( - jq -n '{"email": $USER_EMAIL,"connection": "Username-Password-Authentication"}'\ - --arg "USER_EMAIL" "${USER_EMAIL}" - ) - curl --silent --request POST\ - --url "https://${AUTH0_MANAGEMENT_DOMAIN}/dbconnections/change_password"\ - --header "Authorization: Bearer ${TOKEN}"\ - --header "Content-Type: application/json"\ - --data "${PASSWORD_CHANGE_REQUEST_BODY}"\ - -o /dev/null - - echo "::group::Created User" - echo "${USER_NAME} (${USER_EMAIL}) has been invited and can be managed by visiting:" - echo $USER_MANAGEMENT_URL - echo "::endgroup::" - else - echo "::group::Updated User" - echo "${USER_NAME} (${USER_EMAIL}) was already invited but has been updated and can be managed by visiting:" - echo $USER_MANAGEMENT_URL - echo "::endgroup::" - fi + uses: ../actions/invite-user + with: + name: ${{ github.event.inputs.name }} + email: ${{ github.event.inputs.email }} + roles: ${{ github.event.inputs.roles }} From 0e7a714ffe5109cefe4c384891b1dad6c9943fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 17:47:50 +0100 Subject: [PATCH 13/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index d2790a4e..631757f3 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -46,7 +46,7 @@ jobs: echo "::add-mask::${AUTH0_MANAGEMENT_CLIENT_ID}" echo "::add-mask::${AUTH0_MANAGEMENT_CLIENT_SECRET}" - name: Send Invitation - uses: ../actions/invite-user + uses: ./.github/actions/invite-user with: name: ${{ github.event.inputs.name }} email: ${{ github.event.inputs.email }} From ec49d1cb78001134d1bf243f785014a05d46c5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 17:51:27 +0100 Subject: [PATCH 14/53] Updates action description --- .github/actions/invite-user/action.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/actions/invite-user/action.yml b/.github/actions/invite-user/action.yml index 668b0b2c..027846ef 100644 --- a/.github/actions/invite-user/action.yml +++ b/.github/actions/invite-user/action.yml @@ -1,12 +1,15 @@ -name: Select Xcode Versions -description: Selects a version of Xcode. -branding: - icon: smartphone - color: blue +name: Invites User +description: Invites a user to Shape Docs. inputs: - version: - description: The version of Xcode to install. + name: + description: The name of the user. required: true + email: + description: The e-mail of the user to invite. + required: true + roles: + description: Comma-separated list of roles to assign to the user. + required: true runs: using: node16 main: dist/index.js From 7da3aa38eeea126af68e15b7f9164daaf7294aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 17:52:05 +0100 Subject: [PATCH 15/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index 631757f3..2af6283c 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -25,6 +25,8 @@ jobs: name: Invite Guest runs-on: ubuntu-latest steps: + - name: Checkout Repository + uses: actions/checkout@v4 - name: Install 1Password CLI uses: 1password/install-cli-action@v1 - name: Configure for Production From 64557ff9ba197e6e9b1ae06d3111850c4ea6d020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 17:55:38 +0100 Subject: [PATCH 16/53] Uses Node 20 --- .github/actions/invite-user/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/invite-user/action.yml b/.github/actions/invite-user/action.yml index 027846ef..35bd6095 100644 --- a/.github/actions/invite-user/action.yml +++ b/.github/actions/invite-user/action.yml @@ -11,5 +11,5 @@ inputs: description: Comma-separated list of roles to assign to the user. required: true runs: - using: node16 + using: node20 main: dist/index.js From a74f01409090bd111babfffd6cda521b81223404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 17:58:10 +0100 Subject: [PATCH 17/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index 2af6283c..9800edd0 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -34,11 +34,13 @@ jobs: run: | echo "AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client ID/password" >> $GITHUB_ENV echo "AUTH0_MANAGEMENT_CLIENT_SECRET_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client Secret/password" >> $GITHUB_ENV + echo "AUTH0_MANAGEMENT_CLIENT_DOMAIN=shape-docs-dev.eu.auth0.com" >> $GITHUB_ENV - name: Configure for Staging if: "${{ github.event.inputs.environment == 'staging' }}" run: | echo "AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client ID Staging/password" >> $GITHUB_ENV echo "AUTH0_MANAGEMENT_CLIENT_SECRET_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client Secret Staging/password" >> $GITHUB_ENV + echo "AUTH0_MANAGEMENT_CLIENT_DOMAIN=shape-docs.eu.auth0.com" >> $GITHUB_ENV - name: Install Secrets run: | AUTH0_MANAGEMENT_CLIENT_ID=$(op read "${AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY}") From 166b8684b763e97835456eb9e62049a00353fed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 18:01:42 +0100 Subject: [PATCH 18/53] Update invite-guest.yml --- .github/workflows/invite-guest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/invite-guest.yml b/.github/workflows/invite-guest.yml index 9800edd0..e04d7347 100644 --- a/.github/workflows/invite-guest.yml +++ b/.github/workflows/invite-guest.yml @@ -34,13 +34,13 @@ jobs: run: | echo "AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client ID/password" >> $GITHUB_ENV echo "AUTH0_MANAGEMENT_CLIENT_SECRET_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client Secret/password" >> $GITHUB_ENV - echo "AUTH0_MANAGEMENT_CLIENT_DOMAIN=shape-docs-dev.eu.auth0.com" >> $GITHUB_ENV + echo "AUTH0_MANAGEMENT_CLIENT_DOMAIN=shape-docs.eu.auth0.com" >> $GITHUB_ENV - name: Configure for Staging if: "${{ github.event.inputs.environment == 'staging' }}" run: | echo "AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client ID Staging/password" >> $GITHUB_ENV echo "AUTH0_MANAGEMENT_CLIENT_SECRET_OP_KEY=op://Shape Docs GitHub Actions/Auth0 Management API Client Secret Staging/password" >> $GITHUB_ENV - echo "AUTH0_MANAGEMENT_CLIENT_DOMAIN=shape-docs.eu.auth0.com" >> $GITHUB_ENV + echo "AUTH0_MANAGEMENT_CLIENT_DOMAIN=shape-docs-dev.eu.auth0.com" >> $GITHUB_ENV - name: Install Secrets run: | AUTH0_MANAGEMENT_CLIENT_ID=$(op read "${AUTH0_MANAGEMENT_CLIENT_ID_OP_KEY}") From e2864e71d81f8f77c6849687b778c5fb61a43f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 18:03:08 +0100 Subject: [PATCH 19/53] Fixes invitation not sent --- .github/actions/invite-user/dist/index.js | 2 +- .github/actions/invite-user/src/Action.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/invite-user/dist/index.js b/.github/actions/invite-user/dist/index.js index 90452b89..96ae0374 100644 --- a/.github/actions/invite-user/dist/index.js +++ b/.github/actions/invite-user/dist/index.js @@ -1,4 +1,4 @@ -(()=>{var __webpack_modules__={3658:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});class Action{constructor(e){this.stateStore=e.stateStore;this.logger=e.logger;this.userClient=e.userClient;this.passwordGenerator=e.passwordGenerator;this.roleNameParser=e.roleNameParser}run(e){return n(this,void 0,void 0,(function*(){if(!this.stateStore.isPost){yield this.runMain(e);this.stateStore.isPost=true}}))}runMain(e){return n(this,void 0,void 0,(function*(){if(!e.name||e.name.length==0){throw new Error("No name supplied.")}if(!e.email||e.email.length==0){throw new Error("No e-mail supplied.")}if(!e.roles||e.roles.length==0){throw new Error("No roles supplied.")}const t=this.roleNameParser.parse(e.roles);if(t.length==0){throw new Error("No roles supplied.")}const n=yield this.userClient.getUser({email:e.email});let s=n;if(!n){const t=this.passwordGenerator.generatePassword();const n=yield this.userClient.createUser({name:e.name,email:e.email,password:t});s=n}if(!s){throw new Error("Could not get an existing user or create a new user.")}const i=yield this.userClient.createRoles({roleNames:t});if(i.length==0){throw new Error("Received an empty set of roles.")}const r=i.map((e=>e.id));yield this.userClient.assignRolesToUser({userID:s.id,roleIDs:r});if(n){yield this.userClient.sendChangePasswordEmail({email:s.email});this.logger.log(`${s.id} (${s.email}) has been invited.`)}else{this.logger.log(`${s.id} (${s.email}) has been updated.`)}}))}}t["default"]=Action},8245:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(n(2186));class Logger{log(e){console.log(e)}error(e){o.setFailed(e)}}t["default"]=Logger},2127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class PasswordGenerator{generatePassword(){let e="";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$";const n=18;for(let s=1;s<=n;s++){const n=Math.floor(Math.random()*t.length+1);e+=t.charAt(n)}return e}}t["default"]=PasswordGenerator},3834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class RoleNameParser{parse(e){return e.split(",").map((e=>e.trim().toLowerCase())).filter((e=>e.length>0))}}t["default"]=RoleNameParser},9531:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n={IS_POST:"isPost"};class KeyValueStateStore{constructor(e){this.writerReader=e;this.isPost=false}get isPost(){return!!this.writerReader.getState(n.IS_POST)}set isPost(e){this.writerReader.saveState(n.IS_POST,e)}}t["default"]=KeyValueStateStore},1485:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=i(n(8757));const o=n(4712);class Auth0UserClient{constructor(e){this.config=e;this.managementClient=new o.ManagementClient({domain:e.domain,clientId:e.clientId,clientSecret:e.clientSecret})}getUser(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.usersByEmail.getByEmail({email:e.email});if(t.data.length==0){return null}const n=t.data[0];return{id:n.user_id,email:n.email}}))}createUser(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.users.create({connection:"Username-Password-Authentication",name:e.name,email:e.email,email_verified:true,password:e.password,app_metadata:{has_pending_invitation:true}});return{id:t.data.user_id,email:t.data.email}}))}createRoles(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.roles.getAll();const n=t.data;const s=n.filter((t=>e.roleNames.includes(t.name))).map((e=>({id:e.id,name:e.name})));const i=e.roleNames.filter((e=>{const t=s.find((t=>t.name==e));return t==null}));const r=yield Promise.all(i.map((e=>this.managementClient.roles.create({name:e}))));const o=r.map((e=>({id:e.data.id,name:e.data.name})));return s.concat(o)}))}assignRolesToUser(e){return s(this,void 0,void 0,(function*(){yield this.managementClient.users.assignRoles({id:e.userID},{roles:e.roleIDs})}))}sendChangePasswordEmail(e){return s(this,void 0,void 0,(function*(){const t=yield this.getToken();yield r.default.post(this.getURL("/dbconnections/change_password"),{email:e.email,connection:"Username-Password-Authentication"},{headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}})}))}getToken(){return s(this,void 0,void 0,(function*(){const e=yield r.default.post(this.getURL("/oauth/token"),{grant_type:"client_credentials",client_id:this.config.clientId,client_secret:this.config.clientSecret,audience:`https://${this.config.domain}/api/v2/`},{headers:{"Content-Type":"application/x-www-form-urlencoded"}});return e.data.access_token}))}getURL(e){return`https://${this.config.domain}${e}`}}t["default"]=Auth0UserClient},8873:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(n(2186));function getOptions(){return{name:o.getInput("name"),email:o.getInput("email"),roles:o.getInput("roles")}}t["default"]=getOptions},4822:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const A=r(n(2186));const a=o(n(3658));const c=o(n(1485));const u=o(n(8873));const l=o(n(8245));const d=o(n(9531));const p=o(n(2127));const g=o(n(3834));const{AUTH0_MANAGEMENT_CLIENT_ID:h,AUTH0_MANAGEMENT_CLIENT_SECRET:f,AUTH0_MANAGEMENT_CLIENT_DOMAIN:E}=process.env;if(!h||h.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}else if(!f||f.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}else if(!E||E.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}const m=new d.default(A);const C=new l.default;const Q=new c.default({clientId:h,clientSecret:f,domain:E});const I=new p.default;const B=new g.default;const y=new a.default({stateStore:m,logger:C,userClient:Q,passwordGenerator:I,roleNameParser:B});y.run((0,u.default)()).catch((e=>{C.error(e.toString())}))},7351:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=r(n(2037));const A=n(5278);function issueCommand(e,t,n){const s=new Command(e,t,n);process.stdout.write(s.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const a="::";class Command{constructor(e,t,n){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=n}toString(){let e=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const s=this.properties[n];if(s){if(t){t=false}else{e+=","}e+=`${n}=${escapeProperty(s)}`}}}}e+=`${a}${escapeData(this.message)}`;return e}}function escapeData(e){return A.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return A.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const A=n(7351);const a=n(717);const c=n(5278);const u=r(n(2037));const l=r(n(1017));const d=n(8041);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const n=c.toCommandValue(t);process.env[e]=n;const s=process.env["GITHUB_ENV"]||"";if(s){return a.issueFileCommand("ENV",a.prepareKeyValueMessage(e,t))}A.issueCommand("set-env",{name:e},n)}t.exportVariable=exportVariable;function setSecret(e){A.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){a.issueFileCommand("PATH",e)}else{A.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${l.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const n=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!n){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return n}return n.trim()}t.getInput=getInput;function getMultilineInput(e,t){const n=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return n}return n.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const n=["true","True","TRUE"];const s=["false","False","FALSE"];const i=getInput(e,t);if(n.includes(i))return true;if(s.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const n=process.env["GITHUB_OUTPUT"]||"";if(n){return a.issueFileCommand("OUTPUT",a.prepareKeyValueMessage(e,t))}process.stdout.write(u.EOL);A.issueCommand("set-output",{name:e},c.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){A.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){A.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){A.issueCommand("error",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){A.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){A.issueCommand("notice",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){A.issue("group",e)}t.startGroup=startGroup;function endGroup(){A.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let n;try{n=yield t()}finally{endGroup()}return n}))}t.group=group;function saveState(e,t){const n=process.env["GITHUB_STATE"]||"";if(n){return a.issueFileCommand("STATE",a.prepareKeyValueMessage(e,t))}A.issueCommand("save-state",{name:e},c.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var g=n(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return g.summary}});var h=n(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return h.markdownSummary}});var f=n(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return f.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return f.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return f.toPlatformPath}})},717:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=r(n(7147));const A=r(n(2037));const a=n(5840);const c=n(5278);function issueFileCommand(e,t){const n=process.env[`GITHUB_${e}`];if(!n){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!o.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}o.appendFileSync(n,`${c.toCommandValue(t)}${A.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const n=`ghadelimiter_${a.v4()}`;const s=c.toCommandValue(t);if(e.includes(n)){throw new Error(`Unexpected input: name should not contain the delimiter "${n}"`)}if(s.includes(n)){throw new Error(`Unexpected input: value should not contain the delimiter "${n}"`)}return`${e}<<${n}${A.EOL}${s}${A.EOL}${n}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const i=n(6255);const r=n(5526);const o=n(2186);class OidcClient{static createHttpClient(e=true,t=10){const n={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new r.BearerCredentialHandler(OidcClient.getRequestToken())],n)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return s(this,void 0,void 0,(function*(){const n=OidcClient.createHttpClient();const s=yield n.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const i=(t=s.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return s(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const n=encodeURIComponent(e);t=`${t}&audience=${n}`}o.debug(`ID token url is ${t}`);const n=yield OidcClient.getCall(t);o.setSecret(n);return n}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=r(n(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,o.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const i=n(2037);const r=n(7147);const{access:o,appendFile:A,writeFile:a}=r.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return s(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield o(e,r.constants.R_OK|r.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,n={}){const s=Object.entries(n).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${s}>`}return`<${e}${s}>${t}`}write(e){return s(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const n=yield this.filePath();const s=t?a:A;yield s(n,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return s(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(i.EOL)}addCodeBlock(e,t){const n=Object.assign({},t&&{lang:t});const s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,t=false){const n=t?"ol":"ul";const s=e.map((e=>this.wrap("li",e))).join("");const i=this.wrap(n,s);return this.addRaw(i).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:n,colspan:s,rowspan:i}=e;const r=t?"th":"td";const o=Object.assign(Object.assign({},s&&{colspan:s}),i&&{rowspan:i});return this.wrap(r,n,o)})).join("");return this.wrap("tr",t)})).join("");const n=this.wrap("table",t);return this.addRaw(n).addEOL()}addDetails(e,t){const n=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(n).addEOL()}addImage(e,t,n){const{width:s,height:i}=n||{};const r=Object.assign(Object.assign({},s&&{width:s}),i&&{height:i});const o=this.wrap("img",null,Object.assign({src:e,alt:t},r));return this.addRaw(o).addEOL()}addHeading(e,t){const n=`h${t}`;const s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1";const i=this.wrap(s,e);return this.addRaw(i).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const n=Object.assign({},t&&{cite:t});const s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,t){const n=this.wrap("a",e,{href:t});return this.addRaw(n).addEOL()}}const c=new Summary;t.markdownSummary=c;t.summary=c},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},5526:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const A=r(n(3685));const a=r(n(5687));const c=r(n(9835));const u=r(n(4294));const l=n(1773);var d;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(d||(t.HttpCodes=d={}));var p;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(p||(t.Headers=p={}));var g;(function(e){e["ApplicationJson"]="application/json"})(g||(t.MediaTypes=g={}));function getProxyUrl(e){const t=c.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const f=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const E=["OPTIONS","GET","DELETE","HEAD"];const m=10;const C=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return o(this,void 0,void 0,(function*(){return new Promise((e=>o(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return o(this,void 0,void 0,(function*(){return new Promise((e=>o(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,n||{})}))}patch(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,n||{})}))}put(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,n||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,n,s){return o(this,void 0,void 0,(function*(){return this.request(e,t,n,s)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[p.Accept]=this._getExistingOrDefaultHeader(t,p.Accept,g.ApplicationJson);const n=yield this.get(e,t);return this._processResponse(n,this.requestOptions)}))}postJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.post(e,s,n);return this._processResponse(i,this.requestOptions)}))}putJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.put(e,s,n);return this._processResponse(i,this.requestOptions)}))}patchJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.patch(e,s,n);return this._processResponse(i,this.requestOptions)}))}request(e,t,n,s){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const i=new URL(t);let r=this._prepareRequest(e,i,s);const o=this._allowRetries&&E.includes(e)?this._maxRetries+1:1;let A=0;let a;do{a=yield this.requestRaw(r,n);if(a&&a.message&&a.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(a)){e=t;break}}if(e){return e.handleAuthentication(this,r,n)}else{return a}}let t=this._maxRedirects;while(a.message.statusCode&&h.includes(a.message.statusCode)&&this._allowRedirects&&t>0){const o=a.message.headers["location"];if(!o){break}const A=new URL(o);if(i.protocol==="https:"&&i.protocol!==A.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield a.readBody();if(A.hostname!==i.hostname){for(const e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}r=this._prepareRequest(e,A,s);a=yield this.requestRaw(r,n);t--}if(!a.message.statusCode||!f.includes(a.message.statusCode)){return a}A+=1;if(A{function callbackForResult(e,t){if(e){s(e)}else if(!t){s(new Error("Unknown error"))}else{n(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,n){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let s=false;function handleResult(e,t){if(!s){s=true;n(e,t)}}const i=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let r;i.on("socket",(e=>{r=e}));i.setTimeout(this._socketTimeout||3*6e4,(()=>{if(r){r.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));i.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){i.end()}));t.pipe(i)}else{i.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const n=c.getProxyUrl(t);const s=n&&n.hostname;if(!s){return}return this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){const s={};s.parsedUrl=t;const i=s.parsedUrl.protocol==="https:";s.httpModule=i?a:A;const r=i?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):r;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(n);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(s.options)}}return s}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,n){let s;if(this.requestOptions&&this.requestOptions.headers){s=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||s||n}_getAgent(e){let t;const n=c.getProxyUrl(e);const s=n&&n.hostname;if(this._keepAlive&&s){t=this._proxyAgent}if(this._keepAlive&&!s){t=this._agent}if(t){return t}const i=e.protocol==="https:";let r=100;if(this.requestOptions){r=this.requestOptions.maxSockets||A.globalAgent.maxSockets}if(n&&n.hostname){const e={maxSockets:r,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})};let s;const o=n.protocol==="https:";if(i){s=o?u.httpsOverHttps:u.httpsOverHttp}else{s=o?u.httpOverHttps:u.httpOverHttp}t=s(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:r};t=i?new a.Agent(e):new A.Agent(e);this._agent=t}if(!t){t=i?a.globalAgent:A.globalAgent}if(i&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let n;if(this._keepAlive){n=this._proxyAgentDispatcher}if(n){return n}const s=e.protocol==="https:";n=new l.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`${t.username}:${t.password}`}));this._proxyAgentDispatcher=n;if(s&&this._ignoreSslError){n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:false})}return n}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(m,e);const t=C*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((n,s)=>o(this,void 0,void 0,(function*(){const i=e.message.statusCode||0;const r={statusCode:i,result:null,headers:{}};if(i===d.NotFound){n(r)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let A;try{A=yield e.readBody();if(A&&A.length>0){if(t&&t.deserializeDates){o=JSON.parse(A,dateTimeDeserializer)}else{o=JSON.parse(A)}r.result=o}r.headers=e.message.headers}catch(e){}if(i>299){let e;if(o&&o.message){e=o.message}else if(A&&A.length>0){e=A}else{e=`Failed request: (${i})`}const t=new HttpClientError(e,i);t.result=r.result;s(t)}else{n(r)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const n=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(n){try{return new URL(n)}catch(e){if(!n.startsWith("http://")&&!n.startsWith("https://"))return new URL(`http://${n}`)}}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const n=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!n){return false}let s;if(e.port){s=Number(e.port)}else if(e.protocol==="http:"){s=80}else if(e.protocol==="https:"){s=443}const i=[e.hostname.toUpperCase()];if(typeof s==="number"){i.push(`${i[0]}:${s}`)}for(const e of n.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||i.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}},2856:(e,t,n)=>{"use strict";const s=n(4492).Writable;const i=n(7261).inherits;const r=n(8534);const o=n(8710);const A=n(333);const a=45;const c=Buffer.from("-");const u=Buffer.from("\r\n");const EMPTY_FN=function(){};function Dicer(e){if(!(this instanceof Dicer)){return new Dicer(e)}s.call(this,e);if(!e||!e.headerFirst&&typeof e.boundary!=="string"){throw new TypeError("Boundary required")}if(typeof e.boundary==="string"){this.setBoundary(e.boundary)}else{this._bparser=undefined}this._headerFirst=e.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:e.partHwm};this._pause=false;const t=this;this._hparser=new A(e);this._hparser.on("header",(function(e){t._inHeader=false;t._part.emit("header",e)}))}i(Dicer,s);Dicer.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){const e=this;process.nextTick((function(){e.emit("error",new Error("Unexpected end of multipart data"));if(e._part&&!e._ignoreData){const t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data"));e._part.push(null);process.nextTick((function(){e._realFinish=true;e.emit("finish");e._realFinish=false}));return}e._realFinish=true;e.emit("finish");e._realFinish=false}))}}else{s.prototype.emit.apply(this,arguments)}};Dicer.prototype._write=function(e,t,n){if(!this._hparser&&!this._bparser){return n()}if(this._headerFirst&&this._isPreamble){if(!this._part){this._part=new o(this._partOpts);if(this._events.preamble){this.emit("preamble",this._part)}else{this._ignore()}}const t=this._hparser.push(e);if(!this._inHeader&&t!==undefined&&t{"use strict";const s=n(5673).EventEmitter;const i=n(7261).inherits;const r=n(9692);const o=n(8534);const A=Buffer.from("\r\n\r\n");const a=/\r\n/g;const c=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function HeaderParser(e){s.call(this);e=e||{};const t=this;this.nread=0;this.maxed=false;this.npairs=0;this.maxHeaderPairs=r(e,"maxHeaderPairs",2e3);this.maxHeaderSize=r(e,"maxHeaderSize",80*1024);this.buffer="";this.header={};this.finished=false;this.ss=new o(A);this.ss.on("info",(function(e,n,s,i){if(n&&!t.maxed){if(t.nread+i-s>=t.maxHeaderSize){i=t.maxHeaderSize-t.nread+s;t.nread=t.maxHeaderSize;t.maxed=true}else{t.nread+=i-s}t.buffer+=n.toString("binary",s,i)}if(e){t._finish()}}))}i(HeaderParser,s);HeaderParser.prototype.push=function(e){const t=this.ss.push(e);if(this.finished){return t}};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 e=this.header;this.header={};this.buffer="";this.finished=true;this.nread=this.npairs=0;this.maxed=false;this.emit("header",e)};HeaderParser.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs){return}const e=this.buffer.split(a);const t=e.length;let n,s;for(var i=0;i{"use strict";const s=n(7261).inherits;const i=n(4492).Readable;function PartStream(e){i.call(this,e)}s(PartStream,i);PartStream.prototype._read=function(e){};e.exports=PartStream},8534:(e,t,n)=>{"use strict";const s=n(5673).EventEmitter;const i=n(7261).inherits;function SBMH(e){if(typeof e==="string"){e=Buffer.from(e)}if(!Buffer.isBuffer(e)){throw new TypeError("The needle has to be a String or a Buffer.")}const t=e.length;if(t===0){throw new Error("The needle cannot be an empty String/Buffer.")}if(t>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(t);this._lookbehind_size=0;this._needle=e;this._bufpos=0;this._lookbehind=Buffer.alloc(t);for(var n=0;n=0){this.emit("info",false,this._lookbehind,0,this._lookbehind_size);this._lookbehind_size=0}else{const n=this._lookbehind_size+r;if(n>0){this.emit("info",false,this._lookbehind,0,n)}this._lookbehind.copy(this._lookbehind,0,n,this._lookbehind_size-n);this._lookbehind_size-=n;e.copy(this._lookbehind,this._lookbehind_size);this._lookbehind_size+=t;this._bufpos=t;return t}}r+=(r>=0)*this._bufpos;if(e.indexOf(n,r)!==-1){r=e.indexOf(n,r);++this.matches;if(r>0){this.emit("info",true,e,this._bufpos,r)}else{this.emit("info",true)}return this._bufpos=r+s}else{r=t-s}while(r0){this.emit("info",false,e,this._bufpos,r{"use strict";const s=n(4492).Writable;const{inherits:i}=n(7261);const r=n(2856);const o=n(415);const A=n(6780);const a=n(4426);function Busboy(e){if(!(this instanceof Busboy)){return new Busboy(e)}if(typeof e!=="object"){throw new TypeError("Busboy expected an options-Object.")}if(typeof e.headers!=="object"){throw new TypeError("Busboy expected an options-Object with headers-attribute.")}if(typeof e.headers["content-type"]!=="string"){throw new TypeError("Missing Content-Type-header.")}const{headers:t,...n}=e;this.opts={autoDestroy:false,...n};s.call(this,this.opts);this._done=false;this._parser=this.getParserByHeaders(t);this._finished=false}i(Busboy,s);Busboy.prototype.emit=function(e){if(e==="finish"){if(!this._done){this._parser?.end();return}else if(this._finished){return}this._finished=true}s.prototype.emit.apply(this,arguments)};Busboy.prototype.getParserByHeaders=function(e){const t=a(e["content-type"]);const n={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:t,preservePath:this.opts.preservePath};if(o.detect.test(t[0])){return new o(this,n)}if(A.detect.test(t[0])){return new A(this,n)}throw new Error("Unsupported Content-Type.")};Busboy.prototype._write=function(e,t,n){this._parser.write(e,n)};e.exports=Busboy;e.exports["default"]=Busboy;e.exports.Busboy=Busboy;e.exports.Dicer=r},415:(e,t,n)=>{"use strict";const{Readable:s}=n(4492);const{inherits:i}=n(7261);const r=n(2856);const o=n(4426);const A=n(9136);const a=n(496);const c=n(9692);const u=/^boundary$/i;const l=/^form-data$/i;const d=/^charset$/i;const p=/^filename$/i;const g=/^name$/i;Multipart.detect=/^multipart\/form-data/i;function Multipart(e,t){let n;let s;const i=this;let h;const f=t.limits;const E=t.isPartAFile||((e,t,n)=>t==="application/octet-stream"||n!==undefined);const m=t.parsedConType||[];const C=t.defCharset||"utf8";const Q=t.preservePath;const I={highWaterMark:t.fileHwm};for(n=0,s=m.length;nR){i.parser.removeListener("part",onPart);i.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(N){const e=N;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(r){let c;let u;let h;let f;let m;let R;let v=0;if(r["content-type"]){h=o(r["content-type"][0]);if(h[0]){c=h[0].toLowerCase();for(n=0,s=h.length;ny){const s=y-v+e.length;if(s>0){n.push(e.slice(0,s))}n.truncated=true;n.bytesRead=y;t.removeAllListeners("data");n.emit("limit");return}else if(!n.push(e)){i._pause=true}n.bytesRead=v};F=function(){_=undefined;n.push(null)}}else{if(x===w){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++x;++D;let n="";let s=false;N=t;k=function(e){if((v+=e.length)>B){const i=B-(v-e.length);n+=e.toString("binary",0,i);s=true;t.removeAllListeners("data")}else{n+=e.toString("binary")}};F=function(){N=undefined;if(n.length){n=A(n,"binary",f)}e.emit("field",u,n,false,s,m,c);--D;checkFinished()}}t._readableState.sync=false;t.on("data",k);t.on("end",F)})).on("error",(function(e){if(_){_.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){F=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const n=this.parser.write(e);if(n&&!this._pause){t()}else{this._needDrain=!n;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){s.call(this,e);this.bytesRead=0;this.truncated=false}i(FileStream,s);FileStream.prototype._read=function(e){};e.exports=Multipart},6780:(e,t,n)=>{"use strict";const s=n(9730);const i=n(9136);const r=n(9692);const o=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const n=t.limits;const i=t.parsedConType;this.boy=e;this.fieldSizeLimit=r(n,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=r(n,"fieldNameSize",100);this.fieldsLimit=r(n,"fields",Infinity);let A;for(var a=0,c=i.length;ao){this._key+=this.decoder.write(e.toString("binary",o,n))}this._state="val";this._hitLimit=false;this._checkingBytes=true;this._val="";this._bytesVal=0;this._valTrunc=false;this.decoder.reset();o=n+1}else if(s!==undefined){++this._fields;let n;const r=this._keyTrunc;if(s>o){n=this._key+=this.decoder.write(e.toString("binary",o,s))}else{n=this._key}this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();if(n.length){this.boy.emit("field",i(n,"binary",this.charset),"",r,false)}o=s+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(r>o){this._key+=this.decoder.write(e.toString("binary",o,r))}o=r;if((this._bytesKey=this._key.length)===this.fieldNameSizeLimit){this._checkingBytes=false;this._keyTrunc=true}}else{if(oo){this._val+=this.decoder.write(e.toString("binary",o,s))}this.boy.emit("field",i(this._key,"binary",this.charset),i(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();o=s+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(r>o){this._val+=this.decoder.write(e.toString("binary",o,r))}o=r;if(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit){this._checkingBytes=false;this._valTrunc=true}}else{if(o0){this.boy.emit("field",i(this._key,"binary",this.charset),"",this._keyTrunc,false)}else if(this._state==="val"){this.boy.emit("field",i(this._key,"binary",this.charset),i(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc)}this.boy._done=true;this.boy.emit("finish")};e.exports=UrlEncoded},9730:e=>{"use strict";const t=/\+/g;const n=[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(e){e=e.replace(t," ");let s="";let i=0;let r=0;const o=e.length;for(;ir){s+=e.substring(r,i);r=i}this.buffer="";++r}}if(r{"use strict";e.exports=function basename(e){if(typeof e!=="string"){return""}for(var t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===".."||e==="."?"":e}}return e===".."||e==="."?"":e}},9136:e=>{"use strict";const t=new TextDecoder("utf-8");const n=new Map([["utf-8",t],["utf8",t]]);function decodeText(e,t,s){if(e){if(n.has(s)){try{return n.get(s).decode(Buffer.from(e,t))}catch(e){}}else{try{n.set(s,new TextDecoder(s));return n.get(s).decode(Buffer.from(e,t))}catch(e){}}}return e}e.exports=decodeText},9692:e=>{"use strict";e.exports=function getLimit(e,t,n){if(!e||e[t]===undefined||e[t]===null){return n}if(typeof e[t]!=="number"||isNaN(e[t])){throw new TypeError("Limit "+t+" is not a valid number")}return e[t]}},4426:(e,t,n)=>{"use strict";const s=n(9136);const i=/%([a-fA-F0-9]{2})/g;function encodedReplacer(e,t){return String.fromCharCode(parseInt(t,16))}function parseParams(e){const t=[];let n="key";let r="";let o=false;let A=false;let a=0;let c="";for(var u=0,l=e.length;u{e.exports={parallel:n(8210),serial:n(445),serialOrdered:n(3578)}},1700:e=>{e.exports=abort;function abort(e){Object.keys(e.jobs).forEach(clean.bind(e));e.jobs={}}function clean(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}},2794:(e,t,n)=>{var s=n(5295);e.exports=async;function async(e){var t=false;s((function(){t=true}));return function async_callback(n,i){if(t){e(n,i)}else{s((function nextTick_callback(){e(n,i)}))}}}},5295:e=>{e.exports=defer;function defer(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}},9023:(e,t,n)=>{var s=n(2794),i=n(1700);e.exports=iterate;function iterate(e,t,n,s){var r=n["keyedList"]?n["keyedList"][n.index]:n.index;n.jobs[r]=runJob(t,r,e[r],(function(e,t){if(!(r in n.jobs)){return}delete n.jobs[r];if(e){i(n)}else{n.results[r]=t}s(e,n.results)}))}function runJob(e,t,n,i){var r;if(e.length==2){r=e(n,s(i))}else{r=e(n,t,s(i))}return r}},2474:e=>{e.exports=state;function state(e,t){var n=!Array.isArray(e),s={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};if(t){s.keyedList.sort(n?t:function(n,s){return t(e[n],e[s])})}return s}},7942:(e,t,n)=>{var s=n(1700),i=n(2794);e.exports=terminator;function terminator(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;s(this);i(e)(null,this.results)}},8210:(e,t,n)=>{var s=n(9023),i=n(2474),r=n(7942);e.exports=parallel;function parallel(e,t,n){var o=i(e);while(o.index<(o["keyedList"]||e).length){s(e,t,o,(function(e,t){if(e){n(e,t);return}if(Object.keys(o.jobs).length===0){n(null,o.results);return}}));o.index++}return r.bind(o,n)}},445:(e,t,n)=>{var s=n(3578);e.exports=serial;function serial(e,t,n){return s(e,t,null,n)}},3578:(e,t,n)=>{var s=n(9023),i=n(2474),r=n(7942);e.exports=serialOrdered;e.exports.ascending=ascending;e.exports.descending=descending;function serialOrdered(e,t,n,o){var A=i(e,n);s(e,t,A,(function iteratorHandler(n,i){if(n){o(n,i);return}A.index++;if(A.index<(A["keyedList"]||e).length){s(e,t,A,iteratorHandler);return}o(null,A.results)}));return r.bind(A,o)}function ascending(e,t){return et?1:0}function descending(e,t){return-1*ascending(e,t)}},6008:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return A.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return r.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return a.default}});var s=_interopRequireDefault(n(272));var i=_interopRequireDefault(n(4867));var r=_interopRequireDefault(n(1537));var o=_interopRequireDefault(n(1453));var A=_interopRequireDefault(n(588));var a=_interopRequireDefault(n(5440));var c=_interopRequireDefault(n(2092));var u=_interopRequireDefault(n(61));var l=_interopRequireDefault(n(1855));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},1774:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("md5").update(e).digest()}var i=md5;t["default"]=i},5056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i={randomUUID:s.default.randomUUID};t["default"]=i},588:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n="00000000-0000-0000-0000-000000000000";t["default"]=n},1855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}let t;const n=new Uint8Array(16);n[0]=(t=parseInt(e.slice(0,8),16))>>>24;n[1]=t>>>16&255;n[2]=t>>>8&255;n[3]=t&255;n[4]=(t=parseInt(e.slice(9,13),16))>>>8;n[5]=t&255;n[6]=(t=parseInt(e.slice(14,18),16))>>>8;n[7]=t&255;n[8]=(t=parseInt(e.slice(19,23),16))>>>8;n[9]=t&255;n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;n[11]=t/4294967296&255;n[12]=t>>>24&255;n[13]=t>>>16&255;n[14]=t>>>8&255;n[15]=t&255;return n}var i=parse;t["default"]=i},2822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=/^(?:[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;t["default"]=n},2378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=new Uint8Array(256);let r=i.length;function rng(){if(r>i.length-16){s.default.randomFillSync(i);r=0}return i.slice(r,r+=16)}},2732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("sha1").update(e).digest()}var i=sha1;t["default"]=i},61:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;t.unsafeStringify=unsafeStringify;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=[];for(let e=0;e<256;++e){i.push((e+256).toString(16).slice(1))}function unsafeStringify(e,t=0){return i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]}function stringify(e,t=0){const n=unsafeStringify(e,t);if(!(0,s.default)(n)){throw TypeError("Stringified UUID is invalid")}return n}var r=stringify;t["default"]=r},272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2378));var i=n(61);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let r;let o;let A=0;let a=0;function v1(e,t,n){let c=t&&n||0;const u=t||new Array(16);e=e||{};let l=e.node||r;let d=e.clockseq!==undefined?e.clockseq:o;if(l==null||d==null){const t=e.random||(e.rng||s.default)();if(l==null){l=r=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=o=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let g=e.nsecs!==undefined?e.nsecs:a+1;const h=p-A+(g-a)/1e4;if(h<0&&e.clockseq===undefined){d=d+1&16383}if((h<0||p>A)&&e.nsecs===undefined){g=0}if(g>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}A=p;a=g;o=d;p+=122192928e5;const f=((p&268435455)*1e4+g)%4294967296;u[c++]=f>>>24&255;u[c++]=f>>>16&255;u[c++]=f>>>8&255;u[c++]=f&255;const E=p/4294967296*1e4&268435455;u[c++]=E>>>8&255;u[c++]=E&255;u[c++]=E>>>24&15|16;u[c++]=E>>>16&255;u[c++]=d>>>8|128;u[c++]=d&255;for(let e=0;e<6;++e){u[c+e]=l[e]}return t||(0,i.unsafeStringify)(u)}var c=v1;t["default"]=c},4867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6222));var i=_interopRequireDefault(n(1774));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v3",48,i.default);var o=r;t["default"]=o},6222:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.URL=t.DNS=void 0;t["default"]=v35;var s=n(61);var i=_interopRequireDefault(n(1855));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(5056));var i=_interopRequireDefault(n(2378));var r=n(61);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,n){if(s.default.randomUUID&&!t&&!e){return s.default.randomUUID()}e=e||{};const o=e.random||(e.rng||i.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){n=n||0;for(let e=0;e<16;++e){t[n+e]=o[e]}return t}return(0,r.unsafeStringify)(o)}var o=v4;t["default"]=o},1453:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6222));var i=_interopRequireDefault(n(2732));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v5",80,i.default);var o=r;t["default"]=o},2092:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2822));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&s.default.test(e)}var i=validate;t["default"]=i},5440:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.slice(14,15),16)}var i=version;t["default"]=i},5443:(e,t,n)=>{var s=n(3837);var i=n(2781).Stream;var r=n(8611);e.exports=CombinedStream;function CombinedStream(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}s.inherits(CombinedStream,i);CombinedStream.create=function(e){var t=new this;e=e||{};for(var n in e){t[n]=e[n]}return t};CombinedStream.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};CombinedStream.prototype.append=function(e){var t=CombinedStream.isStreamLike(e);if(t){if(!(e instanceof r)){var n=r.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=n}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};CombinedStream.prototype.pipe=function(e,t){i.prototype.pipe.call(this,e,t);this.resume();return e};CombinedStream.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};CombinedStream.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(e){var t=CombinedStream.isStreamLike(e);if(t){e.on("data",this._checkDataSize.bind(this));this._handleErrors(e)}this._pipeNext(e)}.bind(this))};CombinedStream.prototype._pipeNext=function(e){this._currentStream=e;var t=CombinedStream.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var n=e;this.write(n);this._getNext()};CombinedStream.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))};CombinedStream.prototype.write=function(e){this.emit("data",e)};CombinedStream.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};CombinedStream.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}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")};CombinedStream.prototype.destroy=function(){this._reset();this.emit("close")};CombinedStream.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};CombinedStream.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};CombinedStream.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize}));if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};CombinedStream.prototype._emitError=function(e){this._reset();this.emit("error",e)}},8611:(e,t,n)=>{var s=n(2781).Stream;var i=n(3837);e.exports=DelayedStream;function DelayedStream(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}i.inherits(DelayedStream,s);DelayedStream.create=function(e,t){var n=new this;t=t||{};for(var s in t){n[s]=t[s]}n.source=e;var i=e.emit;e.emit=function(){n._handleEmit(arguments);return i.apply(e,arguments)};e.on("error",(function(){}));if(n.pauseStream){e.pause()}return n};Object.defineProperty(DelayedStream.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});DelayedStream.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};DelayedStream.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};DelayedStream.prototype.pause=function(){this.source.pause()};DelayedStream.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};DelayedStream.prototype.pipe=function(){var e=s.prototype.pipe.apply(this,arguments);this.resume();return e};DelayedStream.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};DelayedStream.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},1133:(e,t,n)=>{var s;e.exports=function(){if(!s){try{s=n(6167)("follow-redirects")}catch(e){}if(typeof s!=="function"){s=function(){}}}s.apply(null,arguments)}},7707:(e,t,n)=>{var s=n(7310);var i=s.URL;var r=n(3685);var o=n(5687);var A=n(2781).Writable;var a=n(9491);var c=n(1133);var u=["abort","aborted","connect","error","socket","timeout"];var l=Object.create(null);u.forEach((function(e){l[e]=function(t,n,s){this._redirectable.emit(e,t,n,s)}}));var d=createErrorType("ERR_INVALID_URL","Invalid URL",TypeError);var p=createErrorType("ERR_FR_REDIRECTION_FAILURE","Redirected request failed");var g=createErrorType("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded");var h=createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit");var f=createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");var E=A.prototype.destroy||noop;function RedirectableRequest(e,t){A.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var n=this;this._onNativeResponse=function(e){n._processResponse(e)};this._performRequest()}RedirectableRequest.prototype=Object.create(A.prototype);RedirectableRequest.prototype.abort=function(){destroyRequest(this._currentRequest);this._currentRequest.abort();this.emit("abort")};RedirectableRequest.prototype.destroy=function(e){destroyRequest(this._currentRequest,e);E.call(this,e);return this};RedirectableRequest.prototype.write=function(e,t,n){if(this._ending){throw new f}if(!isString(e)&&!isBuffer(e)){throw new TypeError("data should be a string, Buffer or Uint8Array")}if(isFunction(t)){n=t;t=null}if(e.length===0){if(n){n()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,n)}else{this.emit("error",new h);this.abort()}};RedirectableRequest.prototype.end=function(e,t,n){if(isFunction(e)){n=e;e=t=null}else if(isFunction(t)){n=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,n)}else{var s=this;var i=this._currentRequest;this.write(e,t,(function(){s._ended=true;i.end(null,null,n)}));this._ending=true}};RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};RedirectableRequest.prototype.setTimeout=function(e,t){var n=this;function destroyOnTimeout(t){t.setTimeout(e);t.removeListener("timeout",t.destroy);t.addListener("timeout",t.destroy)}function startTimer(t){if(n._timeout){clearTimeout(n._timeout)}n._timeout=setTimeout((function(){n.emit("timeout");clearTimer()}),e);destroyOnTimeout(t)}function clearTimer(){if(n._timeout){clearTimeout(n._timeout);n._timeout=null}n.removeListener("abort",clearTimer);n.removeListener("error",clearTimer);n.removeListener("response",clearTimer);n.removeListener("close",clearTimer);if(t){n.removeListener("timeout",t)}if(!n.socket){n._currentRequest.removeListener("socket",startTimer)}}if(t){this.on("timeout",t)}if(this.socket){startTimer(this.socket)}else{this._currentRequest.once("socket",startTimer)}this.on("socket",destroyOnTimeout);this.on("abort",clearTimer);this.on("error",clearTimer);this.on("response",clearTimer);this.on("close",clearTimer);return this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){RedirectableRequest.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}}));["aborted","connection","socket"].forEach((function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})}));RedirectableRequest.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){this.emit("error",new TypeError("Unsupported protocol "+e));return}if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var r of u){i.on(r,l[r])}this._currentUrl=/^\//.test(this._options.path)?s.format(this._options):this._options.path;if(this._isRedirect){var o=0;var A=this;var a=this._requestBodyBuffers;(function writeNext(e){if(i===A._currentRequest){if(e){A.emit("error",e)}else if(o=400){e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[];return}destroyRequest(this._currentRequest);e.destroy();if(++this._redirectCount>this._options.maxRedirects){this.emit("error",new g);return}var i;var r=this._options.beforeRedirect;if(r){i=Object.assign({Host:e.req.getHeader("host")},this._options.headers)}var o=this._options.method;if((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method)){this._options.method="GET";this._requestBodyBuffers=[];removeMatchingHeaders(/^content-/i,this._options.headers)}var A=removeMatchingHeaders(/^host$/i,this._options.headers);var a=s.parse(this._currentUrl);var u=A||a.host;var l=/^\w+:/.test(n)?this._currentUrl:s.format(Object.assign(a,{host:u}));var d;try{d=s.resolve(l,n)}catch(e){this.emit("error",new p({cause:e}));return}c("redirecting to",d);this._isRedirect=true;var h=s.parse(d);Object.assign(this._options,h);if(h.protocol!==a.protocol&&h.protocol!=="https:"||h.host!==u&&!isSubdomain(h.host,u)){removeMatchingHeaders(/^(?:authorization|cookie)$/i,this._options.headers)}if(isFunction(r)){var f={headers:e.headers,statusCode:t};var E={url:l,method:o,headers:i};try{r(this._options,f,E)}catch(e){this.emit("error",e);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new p({cause:e}))}};function wrap(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var n={};Object.keys(e).forEach((function(r){var o=r+":";var A=n[o]=e[r];var u=t[r]=Object.create(A);function request(e,r,A){if(isString(e)){var u;try{u=urlToOptions(new i(e))}catch(t){u=s.parse(e)}if(!isString(u.protocol)){throw new d({input:e})}e=u}else if(i&&e instanceof i){e=urlToOptions(e)}else{A=r;r=e;e={protocol:o}}if(isFunction(r)){A=r;r=null}r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r);r.nativeProtocols=n;if(!isString(r.host)&&!isString(r.hostname)){r.hostname="::1"}a.equal(r.protocol,o,"protocol mismatch");c("options",r);return new RedirectableRequest(r,A)}function get(e,t,n){var s=u.request(e,t,n);s.end();return s}Object.defineProperties(u,{request:{value:request,configurable:true,enumerable:true,writable:true},get:{value:get,configurable:true,enumerable:true,writable:true}})}));return t}function noop(){}function urlToOptions(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};if(e.port!==""){t.port=Number(e.port)}return t}function removeMatchingHeaders(e,t){var n;for(var s in t){if(e.test(s)){n=t[s];delete t[s]}}return n===null||typeof n==="undefined"?undefined:String(n).trim()}function createErrorType(e,t,n){function CustomError(n){Error.captureStackTrace(this,this.constructor);Object.assign(this,n||{});this.code=e;this.message=this.cause?t+": "+this.cause.message:t}CustomError.prototype=new(n||Error);CustomError.prototype.constructor=CustomError;CustomError.prototype.name="Error ["+e+"]";return CustomError}function destroyRequest(e,t){for(var n of u){e.removeListener(n,l[n])}e.on("error",noop);e.destroy(t)}function isSubdomain(e,t){a(isString(e)&&isString(t));var n=e.length-t.length-1;return n>0&&e[n]==="."&&e.endsWith(t)}function isString(e){return typeof e==="string"||e instanceof String}function isFunction(e){return typeof e==="function"}function isBuffer(e){return typeof e==="object"&&"length"in e}e.exports=wrap({http:r,https:o});e.exports.wrap=wrap},4334:(e,t,n)=>{var s=n(5443);var i=n(3837);var r=n(1017);var o=n(3685);var A=n(5687);var a=n(7310).parse;var c=n(7147);var u=n(2781).Stream;var l=n(3583);var d=n(4812);var p=n(7142);e.exports=FormData;i.inherits(FormData,s);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];s.call(this);e=e||{};for(var t in e){this[t]=e[t]}}FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,n){n=n||{};if(typeof n=="string"){n={filename:n}}var r=s.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(i.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,n);var A=this._multiPartFooter();r(o);r(t);r(A);this._trackLength(o,t,n)};FormData.prototype._trackLength=function(e,t,n){var s=0;if(n.knownLength!=null){s+=+n.knownLength}else if(Buffer.isBuffer(t)){s=t.length}else if(typeof t==="string"){s=Buffer.byteLength(t)}this._valueLength+=s;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof u)){return}if(!n.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{c.stat(e.path,(function(n,s){var i;if(n){t(n);return}i=s.size-(e.start?e.start:0);t(null,i)}))}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",(function(n){e.pause();t(null,+n.headers["content-length"])}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,n){if(typeof n.header=="string"){return n.header}var s=this._getContentDisposition(t,n);var i=this._getContentType(t,n);var r="";var o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(s||[]),"Content-Type":[].concat(i||[])};if(typeof n.header=="object"){p(o,n.header)}var A;for(var a in o){if(!o.hasOwnProperty(a))continue;A=o[a];if(A==null){continue}if(!Array.isArray(A)){A=[A]}if(A.length){r+=a+": "+A.join("; ")+FormData.LINE_BREAK}}return"--"+this.getBoundary()+FormData.LINE_BREAK+r+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var n,s;if(typeof t.filepath==="string"){n=r.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){n=r.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){n=r.basename(e.client._httpMessage.path||"")}if(n){s='filename="'+n+'"'}return s};FormData.prototype._getContentType=function(e,t){var n=t.contentType;if(!n&&e.name){n=l.lookup(e.name)}if(!n&&e.path){n=l.lookup(e.path)}if(!n&&e.readable&&e.hasOwnProperty("httpVersion")){n=e.headers["content-type"]}if(!n&&(t.filepath||t.filename)){n=l.lookup(t.filepath||t.filename)}if(!n&&typeof e=="object"){n=FormData.DEFAULT_CONTENT_TYPE}return n};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var n=this._streams.length===0;if(n){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){n[t.toLowerCase()]=e[t]}}return n};FormData.prototype.setBoundary=function(e){this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var n=0,s=this._streams.length;n{e.exports=function(e,t){Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]}));return e}},4061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.cryptoRuntime=t.base64url=t.generateSecret=t.generateKeyPair=t.errors=t.decodeJwt=t.decodeProtectedHeader=t.importJWK=t.importX509=t.importPKCS8=t.importSPKI=t.exportJWK=t.exportSPKI=t.exportPKCS8=t.UnsecuredJWT=t.createRemoteJWKSet=t.createLocalJWKSet=t.EmbeddedJWK=t.calculateJwkThumbprintUri=t.calculateJwkThumbprint=t.EncryptJWT=t.SignJWT=t.GeneralSign=t.FlattenedSign=t.CompactSign=t.FlattenedEncrypt=t.CompactEncrypt=t.jwtDecrypt=t.jwtVerify=t.generalVerify=t.flattenedVerify=t.compactVerify=t.GeneralEncrypt=t.generalDecrypt=t.flattenedDecrypt=t.compactDecrypt=void 0;var s=n(7651);Object.defineProperty(t,"compactDecrypt",{enumerable:true,get:function(){return s.compactDecrypt}});var i=n(7566);Object.defineProperty(t,"flattenedDecrypt",{enumerable:true,get:function(){return i.flattenedDecrypt}});var r=n(5684);Object.defineProperty(t,"generalDecrypt",{enumerable:true,get:function(){return r.generalDecrypt}});var o=n(3992);Object.defineProperty(t,"GeneralEncrypt",{enumerable:true,get:function(){return o.GeneralEncrypt}});var A=n(5212);Object.defineProperty(t,"compactVerify",{enumerable:true,get:function(){return A.compactVerify}});var a=n(2095);Object.defineProperty(t,"flattenedVerify",{enumerable:true,get:function(){return a.flattenedVerify}});var c=n(4975);Object.defineProperty(t,"generalVerify",{enumerable:true,get:function(){return c.generalVerify}});var u=n(9887);Object.defineProperty(t,"jwtVerify",{enumerable:true,get:function(){return u.jwtVerify}});var l=n(3378);Object.defineProperty(t,"jwtDecrypt",{enumerable:true,get:function(){return l.jwtDecrypt}});var d=n(6203);Object.defineProperty(t,"CompactEncrypt",{enumerable:true,get:function(){return d.CompactEncrypt}});var p=n(1555);Object.defineProperty(t,"FlattenedEncrypt",{enumerable:true,get:function(){return p.FlattenedEncrypt}});var g=n(8257);Object.defineProperty(t,"CompactSign",{enumerable:true,get:function(){return g.CompactSign}});var h=n(4825);Object.defineProperty(t,"FlattenedSign",{enumerable:true,get:function(){return h.FlattenedSign}});var f=n(4268);Object.defineProperty(t,"GeneralSign",{enumerable:true,get:function(){return f.GeneralSign}});var E=n(8882);Object.defineProperty(t,"SignJWT",{enumerable:true,get:function(){return E.SignJWT}});var m=n(960);Object.defineProperty(t,"EncryptJWT",{enumerable:true,get:function(){return m.EncryptJWT}});var C=n(3494);Object.defineProperty(t,"calculateJwkThumbprint",{enumerable:true,get:function(){return C.calculateJwkThumbprint}});Object.defineProperty(t,"calculateJwkThumbprintUri",{enumerable:true,get:function(){return C.calculateJwkThumbprintUri}});var Q=n(1751);Object.defineProperty(t,"EmbeddedJWK",{enumerable:true,get:function(){return Q.EmbeddedJWK}});var I=n(9970);Object.defineProperty(t,"createLocalJWKSet",{enumerable:true,get:function(){return I.createLocalJWKSet}});var B=n(9035);Object.defineProperty(t,"createRemoteJWKSet",{enumerable:true,get:function(){return B.createRemoteJWKSet}});var y=n(8568);Object.defineProperty(t,"UnsecuredJWT",{enumerable:true,get:function(){return y.UnsecuredJWT}});var b=n(465);Object.defineProperty(t,"exportPKCS8",{enumerable:true,get:function(){return b.exportPKCS8}});Object.defineProperty(t,"exportSPKI",{enumerable:true,get:function(){return b.exportSPKI}});Object.defineProperty(t,"exportJWK",{enumerable:true,get:function(){return b.exportJWK}});var w=n(4230);Object.defineProperty(t,"importSPKI",{enumerable:true,get:function(){return w.importSPKI}});Object.defineProperty(t,"importPKCS8",{enumerable:true,get:function(){return w.importPKCS8}});Object.defineProperty(t,"importX509",{enumerable:true,get:function(){return w.importX509}});Object.defineProperty(t,"importJWK",{enumerable:true,get:function(){return w.importJWK}});var R=n(3991);Object.defineProperty(t,"decodeProtectedHeader",{enumerable:true,get:function(){return R.decodeProtectedHeader}});var v=n(5611);Object.defineProperty(t,"decodeJwt",{enumerable:true,get:function(){return v.decodeJwt}});t.errors=n(4419);var k=n(1036);Object.defineProperty(t,"generateKeyPair",{enumerable:true,get:function(){return k.generateKeyPair}});var S=n(6617);Object.defineProperty(t,"generateSecret",{enumerable:true,get:function(){return S.generateSecret}});t.base64url=n(3238);var x=n(1173);Object.defineProperty(t,"cryptoRuntime",{enumerable:true,get:function(){return x.default}})},7651:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.compactDecrypt=void 0;const s=n(7566);const i=n(4419);const r=n(1691);async function compactDecrypt(e,t,n){if(e instanceof Uint8Array){e=r.decoder.decode(e)}if(typeof e!=="string"){throw new i.JWEInvalid("Compact JWE must be a string or Uint8Array")}const{0:o,1:A,2:a,3:c,4:u,length:l}=e.split(".");if(l!==5){throw new i.JWEInvalid("Invalid Compact JWE")}const d=await(0,s.flattenedDecrypt)({ciphertext:c,iv:a||undefined,protected:o||undefined,tag:u||undefined,encrypted_key:A||undefined},t,n);const p={plaintext:d.plaintext,protectedHeader:d.protectedHeader};if(typeof t==="function"){return{...p,key:d.key}}return p}t.compactDecrypt=compactDecrypt},6203:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CompactEncrypt=void 0;const s=n(1555);class CompactEncrypt{constructor(e){this._flattened=new s.FlattenedEncrypt(e)}setContentEncryptionKey(e){this._flattened.setContentEncryptionKey(e);return this}setInitializationVector(e){this._flattened.setInitializationVector(e);return this}setProtectedHeader(e){this._flattened.setProtectedHeader(e);return this}setKeyManagementParameters(e){this._flattened.setKeyManagementParameters(e);return this}async encrypt(e,t){const n=await this._flattened.encrypt(e,t);return[n.protected,n.encrypted_key,n.iv,n.ciphertext,n.tag].join(".")}}t.CompactEncrypt=CompactEncrypt},7566:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.flattenedDecrypt=void 0;const s=n(518);const i=n(6137);const r=n(7022);const o=n(4419);const A=n(6063);const a=n(9127);const c=n(6127);const u=n(1691);const l=n(3987);const d=n(863);const p=n(5148);async function flattenedDecrypt(e,t,n){var g;if(!(0,a.default)(e)){throw new o.JWEInvalid("Flattened JWE must be an object")}if(e.protected===undefined&&e.header===undefined&&e.unprotected===undefined){throw new o.JWEInvalid("JOSE Header missing")}if(typeof e.iv!=="string"){throw new o.JWEInvalid("JWE Initialization Vector missing or incorrect type")}if(typeof e.ciphertext!=="string"){throw new o.JWEInvalid("JWE Ciphertext missing or incorrect type")}if(typeof e.tag!=="string"){throw new o.JWEInvalid("JWE Authentication Tag missing or incorrect type")}if(e.protected!==undefined&&typeof e.protected!=="string"){throw new o.JWEInvalid("JWE Protected Header incorrect type")}if(e.encrypted_key!==undefined&&typeof e.encrypted_key!=="string"){throw new o.JWEInvalid("JWE Encrypted Key incorrect type")}if(e.aad!==undefined&&typeof e.aad!=="string"){throw new o.JWEInvalid("JWE AAD incorrect type")}if(e.header!==undefined&&!(0,a.default)(e.header)){throw new o.JWEInvalid("JWE Shared Unprotected Header incorrect type")}if(e.unprotected!==undefined&&!(0,a.default)(e.unprotected)){throw new o.JWEInvalid("JWE Per-Recipient Unprotected Header incorrect type")}let h;if(e.protected){try{const t=(0,s.decode)(e.protected);h=JSON.parse(u.decoder.decode(t))}catch{throw new o.JWEInvalid("JWE Protected Header is invalid")}}if(!(0,A.default)(h,e.header,e.unprotected)){throw new o.JWEInvalid("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint")}const f={...h,...e.header,...e.unprotected};(0,d.default)(o.JWEInvalid,new Map,n===null||n===void 0?void 0:n.crit,h,f);if(f.zip!==undefined){if(!h||!h.zip){throw new o.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}if(f.zip!=="DEF"){throw new o.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}}const{alg:E,enc:m}=f;if(typeof E!=="string"||!E){throw new o.JWEInvalid("missing JWE Algorithm (alg) in JWE Header")}if(typeof m!=="string"||!m){throw new o.JWEInvalid("missing JWE Encryption Algorithm (enc) in JWE Header")}const C=n&&(0,p.default)("keyManagementAlgorithms",n.keyManagementAlgorithms);const Q=n&&(0,p.default)("contentEncryptionAlgorithms",n.contentEncryptionAlgorithms);if(C&&!C.has(E)){throw new o.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed')}if(Q&&!Q.has(m)){throw new o.JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter not allowed')}let I;if(e.encrypted_key!==undefined){try{I=(0,s.decode)(e.encrypted_key)}catch{throw new o.JWEInvalid("Failed to base64url decode the encrypted_key")}}let B=false;if(typeof t==="function"){t=await t(h,e);B=true}let y;try{y=await(0,c.default)(E,t,I,f,n)}catch(e){if(e instanceof TypeError||e instanceof o.JWEInvalid||e instanceof o.JOSENotSupported){throw e}y=(0,l.default)(m)}let b;let w;try{b=(0,s.decode)(e.iv)}catch{throw new o.JWEInvalid("Failed to base64url decode the iv")}try{w=(0,s.decode)(e.tag)}catch{throw new o.JWEInvalid("Failed to base64url decode the tag")}const R=u.encoder.encode((g=e.protected)!==null&&g!==void 0?g:"");let v;if(e.aad!==undefined){v=(0,u.concat)(R,u.encoder.encode("."),u.encoder.encode(e.aad))}else{v=R}let k;try{k=(0,s.decode)(e.ciphertext)}catch{throw new o.JWEInvalid("Failed to base64url decode the ciphertext")}let S=await(0,i.default)(m,y,k,b,w,v);if(f.zip==="DEF"){S=await((n===null||n===void 0?void 0:n.inflateRaw)||r.inflate)(S)}const x={plaintext:S};if(e.protected!==undefined){x.protectedHeader=h}if(e.aad!==undefined){try{x.additionalAuthenticatedData=(0,s.decode)(e.aad)}catch{throw new o.JWEInvalid("Failed to base64url decode the aad")}}if(e.unprotected!==undefined){x.sharedUnprotectedHeader=e.unprotected}if(e.header!==undefined){x.unprotectedHeader=e.header}if(B){return{...x,key:t}}return x}t.flattenedDecrypt=flattenedDecrypt},1555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FlattenedEncrypt=t.unprotected=void 0;const s=n(518);const i=n(6476);const r=n(7022);const o=n(4630);const A=n(3286);const a=n(4419);const c=n(6063);const u=n(1691);const l=n(863);t.unprotected=Symbol();class FlattenedEncrypt{constructor(e){if(!(e instanceof Uint8Array)){throw new TypeError("plaintext must be an instance of Uint8Array")}this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters){throw new TypeError("setKeyManagementParameters can only be called once")}this._keyManagementParameters=e;return this}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader){throw new TypeError("setSharedUnprotectedHeader can only be called once")}this._sharedUnprotectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}setContentEncryptionKey(e){if(this._cek){throw new TypeError("setContentEncryptionKey can only be called once")}this._cek=e;return this}setInitializationVector(e){if(this._iv){throw new TypeError("setInitializationVector can only be called once")}this._iv=e;return this}async encrypt(e,n){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader){throw new a.JWEInvalid("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()")}if(!(0,c.default)(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader)){throw new a.JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint")}const d={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};(0,l.default)(a.JWEInvalid,new Map,n===null||n===void 0?void 0:n.crit,this._protectedHeader,d);if(d.zip!==undefined){if(!this._protectedHeader||!this._protectedHeader.zip){throw new a.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}if(d.zip!=="DEF"){throw new a.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}}const{alg:p,enc:g}=d;if(typeof p!=="string"||!p){throw new a.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid')}if(typeof g!=="string"||!g){throw new a.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid')}let h;if(p==="dir"){if(this._cek){throw new TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}}else if(p==="ECDH-ES"){if(this._cek){throw new TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement")}}let f;{let s;({cek:f,encryptedKey:h,parameters:s}=await(0,A.default)(p,g,e,this._cek,this._keyManagementParameters));if(s){if(n&&t.unprotected in n){if(!this._unprotectedHeader){this.setUnprotectedHeader(s)}else{this._unprotectedHeader={...this._unprotectedHeader,...s}}}else{if(!this._protectedHeader){this.setProtectedHeader(s)}else{this._protectedHeader={...this._protectedHeader,...s}}}}}this._iv||(this._iv=(0,o.default)(g));let E;let m;let C;if(this._protectedHeader){m=u.encoder.encode((0,s.encode)(JSON.stringify(this._protectedHeader)))}else{m=u.encoder.encode("")}if(this._aad){C=(0,s.encode)(this._aad);E=(0,u.concat)(m,u.encoder.encode("."),u.encoder.encode(C))}else{E=m}let Q;let I;if(d.zip==="DEF"){const e=await((n===null||n===void 0?void 0:n.deflateRaw)||r.deflate)(this._plaintext);({ciphertext:Q,tag:I}=await(0,i.default)(g,e,f,this._iv,E))}else{({ciphertext:Q,tag:I}=await(0,i.default)(g,this._plaintext,f,this._iv,E))}const B={ciphertext:(0,s.encode)(Q),iv:(0,s.encode)(this._iv),tag:(0,s.encode)(I)};if(h){B.encrypted_key=(0,s.encode)(h)}if(C){B.aad=C}if(this._protectedHeader){B.protected=u.decoder.decode(m)}if(this._sharedUnprotectedHeader){B.unprotected=this._sharedUnprotectedHeader}if(this._unprotectedHeader){B.header=this._unprotectedHeader}return B}}t.FlattenedEncrypt=FlattenedEncrypt},5684:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generalDecrypt=void 0;const s=n(7566);const i=n(4419);const r=n(9127);async function generalDecrypt(e,t,n){if(!(0,r.default)(e)){throw new i.JWEInvalid("General JWE must be an object")}if(!Array.isArray(e.recipients)||!e.recipients.every(r.default)){throw new i.JWEInvalid("JWE Recipients missing or incorrect type")}if(!e.recipients.length){throw new i.JWEInvalid("JWE Recipients has no members")}for(const i of e.recipients){try{return await(0,s.flattenedDecrypt)({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:i.encrypted_key,header:i.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,n)}catch{}}throw new i.JWEDecryptionFailed}t.generalDecrypt=generalDecrypt},3992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GeneralEncrypt=void 0;const s=n(1555);const i=n(4419);const r=n(3987);const o=n(6063);const A=n(3286);const a=n(518);const c=n(863);class IndividualRecipient{constructor(e,t,n){this.parent=e;this.key=t;this.options=n}setUnprotectedHeader(e){if(this.unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this.unprotectedHeader=e;return this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class GeneralEncrypt{constructor(e){this._recipients=[];this._plaintext=e}addRecipient(e,t){const n=new IndividualRecipient(this,e,{crit:t===null||t===void 0?void 0:t.crit});this._recipients.push(n);return n}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setSharedUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}async encrypt(e){var t,n,u;if(!this._recipients.length){throw new i.JWEInvalid("at least one recipient must be added")}e={deflateRaw:e===null||e===void 0?void 0:e.deflateRaw};if(this._recipients.length===1){const[t]=this._recipients;const n=await new s.FlattenedEncrypt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options,...e});let i={ciphertext:n.ciphertext,iv:n.iv,recipients:[{}],tag:n.tag};if(n.aad)i.aad=n.aad;if(n.protected)i.protected=n.protected;if(n.unprotected)i.unprotected=n.unprotected;if(n.encrypted_key)i.recipients[0].encrypted_key=n.encrypted_key;if(n.header)i.recipients[0].header=n.header;return i}let l;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EmbeddedJWK=void 0;const s=n(4230);const i=n(9127);const r=n(4419);async function EmbeddedJWK(e,t){const n={...e,...t===null||t===void 0?void 0:t.header};if(!(0,i.default)(n.jwk)){throw new r.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object')}const o=await(0,s.importJWK)({...n.jwk,ext:true},n.alg,true);if(o instanceof Uint8Array||o.type!=="public"){throw new r.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key')}return o}t.EmbeddedJWK=EmbeddedJWK},3494:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.calculateJwkThumbprintUri=t.calculateJwkThumbprint=void 0;const s=n(2355);const i=n(518);const r=n(4419);const o=n(1691);const A=n(9127);const check=(e,t)=>{if(typeof e!=="string"||!e){throw new r.JWKInvalid(`${t} missing or invalid`)}};async function calculateJwkThumbprint(e,t){if(!(0,A.default)(e)){throw new TypeError("JWK must be an object")}t!==null&&t!==void 0?t:t="sha256";if(t!=="sha256"&&t!=="sha384"&&t!=="sha512"){throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"')}let n;switch(e.kty){case"EC":check(e.crv,'"crv" (Curve) Parameter');check(e.x,'"x" (X Coordinate) Parameter');check(e.y,'"y" (Y Coordinate) Parameter');n={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":check(e.crv,'"crv" (Subtype of Key Pair) Parameter');check(e.x,'"x" (Public Key) Parameter');n={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":check(e.e,'"e" (Exponent) Parameter');check(e.n,'"n" (Modulus) Parameter');n={e:e.e,kty:e.kty,n:e.n};break;case"oct":check(e.k,'"k" (Key Value) Parameter');n={k:e.k,kty:e.kty};break;default:throw new r.JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported')}const a=o.encoder.encode(JSON.stringify(n));return(0,i.encode)(await(0,s.default)(t,a))}t.calculateJwkThumbprint=calculateJwkThumbprint;async function calculateJwkThumbprintUri(e,t){t!==null&&t!==void 0?t:t="sha256";const n=await calculateJwkThumbprint(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${n}`}t.calculateJwkThumbprintUri=calculateJwkThumbprintUri},9970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createLocalJWKSet=t.LocalJWKSet=t.isJWKSLike=void 0;const s=n(4230);const i=n(4419);const r=n(9127);function getKtyFromAlg(e){switch(typeof e==="string"&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new i.JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set')}}function isJWKSLike(e){return e&&typeof e==="object"&&Array.isArray(e.keys)&&e.keys.every(isJWKLike)}t.isJWKSLike=isJWKSLike;function isJWKLike(e){return(0,r.default)(e)}function clone(e){if(typeof structuredClone==="function"){return structuredClone(e)}return JSON.parse(JSON.stringify(e))}class LocalJWKSet{constructor(e){this._cached=new WeakMap;if(!isJWKSLike(e)){throw new i.JWKSInvalid("JSON Web Key Set malformed")}this._jwks=clone(e)}async getKey(e,t){const{alg:n,kid:s}={...e,...t===null||t===void 0?void 0:t.header};const r=getKtyFromAlg(n);const o=this._jwks.keys.filter((e=>{let t=r===e.kty;if(t&&typeof s==="string"){t=s===e.kid}if(t&&typeof e.alg==="string"){t=n===e.alg}if(t&&typeof e.use==="string"){t=e.use==="sig"}if(t&&Array.isArray(e.key_ops)){t=e.key_ops.includes("verify")}if(t&&n==="EdDSA"){t=e.crv==="Ed25519"||e.crv==="Ed448"}if(t){switch(n){case"ES256":t=e.crv==="P-256";break;case"ES256K":t=e.crv==="secp256k1";break;case"ES384":t=e.crv==="P-384";break;case"ES512":t=e.crv==="P-521";break}}return t}));const{0:A,length:a}=o;if(a===0){throw new i.JWKSNoMatchingKey}else if(a!==1){const e=new i.JWKSMultipleMatchingKeys;const{_cached:t}=this;e[Symbol.asyncIterator]=async function*(){for(const e of o){try{yield await importWithAlgCache(t,e,n)}catch{continue}}};throw e}return importWithAlgCache(this._cached,A,n)}}t.LocalJWKSet=LocalJWKSet;async function importWithAlgCache(e,t,n){const r=e.get(t)||e.set(t,{}).get(t);if(r[n]===undefined){const e=await(0,s.importJWK)({...t,ext:true},n);if(e instanceof Uint8Array||e.type!=="public"){throw new i.JWKSInvalid("JSON Web Key Set members must be public keys")}r[n]=e}return r[n]}function createLocalJWKSet(e){const t=new LocalJWKSet(e);return async function(e,n){return t.getKey(e,n)}}t.createLocalJWKSet=createLocalJWKSet},9035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createRemoteJWKSet=void 0;const s=n(3650);const i=n(4419);const r=n(9970);function isCloudflareWorkers(){return typeof WebSocketPair!=="undefined"||typeof navigator!=="undefined"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime!=="undefined"&&EdgeRuntime==="vercel"}class RemoteJWKSet extends r.LocalJWKSet{constructor(e,t){super({keys:[]});this._jwks=undefined;if(!(e instanceof URL)){throw new TypeError("url must be an instance of URL")}this._url=new URL(e.href);this._options={agent:t===null||t===void 0?void 0:t.agent,headers:t===null||t===void 0?void 0:t.headers};this._timeoutDuration=typeof(t===null||t===void 0?void 0:t.timeoutDuration)==="number"?t===null||t===void 0?void 0:t.timeoutDuration:5e3;this._cooldownDuration=typeof(t===null||t===void 0?void 0:t.cooldownDuration)==="number"?t===null||t===void 0?void 0:t.cooldownDuration:3e4;this._cacheMaxAge=typeof(t===null||t===void 0?void 0:t.cacheMaxAge)==="number"?t===null||t===void 0?void 0:t.cacheMaxAge:6e5}coolingDown(){return typeof this._jwksTimestamp==="number"?Date.now(){if(!(0,r.isJWKSLike)(e)){throw new i.JWKSInvalid("JSON Web Key Set malformed")}this._jwks={keys:e.keys};this._jwksTimestamp=Date.now();this._pendingFetch=undefined})).catch((e=>{this._pendingFetch=undefined;throw e})));await this._pendingFetch}}function createRemoteJWKSet(e,t){const n=new RemoteJWKSet(e,t);return async function(e,t){return n.getKey(e,t)}}t.createRemoteJWKSet=createRemoteJWKSet},8257:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CompactSign=void 0;const s=n(4825);class CompactSign{constructor(e){this._flattened=new s.FlattenedSign(e)}setProtectedHeader(e){this._flattened.setProtectedHeader(e);return this}async sign(e,t){const n=await this._flattened.sign(e,t);if(n.payload===undefined){throw new TypeError("use the flattened module for creating JWS with b64: false")}return`${n.protected}.${n.payload}.${n.signature}`}}t.CompactSign=CompactSign},5212:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.compactVerify=void 0;const s=n(2095);const i=n(4419);const r=n(1691);async function compactVerify(e,t,n){if(e instanceof Uint8Array){e=r.decoder.decode(e)}if(typeof e!=="string"){throw new i.JWSInvalid("Compact JWS must be a string or Uint8Array")}const{0:o,1:A,2:a,length:c}=e.split(".");if(c!==3){throw new i.JWSInvalid("Invalid Compact JWS")}const u=await(0,s.flattenedVerify)({payload:A,protected:o,signature:a},t,n);const l={payload:u.payload,protectedHeader:u.protectedHeader};if(typeof t==="function"){return{...l,key:u.key}}return l}t.compactVerify=compactVerify},4825:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FlattenedSign=void 0;const s=n(518);const i=n(9935);const r=n(6063);const o=n(4419);const A=n(1691);const a=n(6241);const c=n(863);class FlattenedSign{constructor(e){if(!(e instanceof Uint8Array)){throw new TypeError("payload must be an instance of Uint8Array")}this._payload=e}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader){throw new o.JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()")}if(!(0,r.default)(this._protectedHeader,this._unprotectedHeader)){throw new o.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint")}const n={...this._protectedHeader,...this._unprotectedHeader};const u=(0,c.default)(o.JWSInvalid,new Map([["b64",true]]),t===null||t===void 0?void 0:t.crit,this._protectedHeader,n);let l=true;if(u.has("b64")){l=this._protectedHeader.b64;if(typeof l!=="boolean"){throw new o.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}}const{alg:d}=n;if(typeof d!=="string"||!d){throw new o.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid')}(0,a.default)(d,e,"sign");let p=this._payload;if(l){p=A.encoder.encode((0,s.encode)(p))}let g;if(this._protectedHeader){g=A.encoder.encode((0,s.encode)(JSON.stringify(this._protectedHeader)))}else{g=A.encoder.encode("")}const h=(0,A.concat)(g,A.encoder.encode("."),p);const f=await(0,i.default)(d,e,h);const E={signature:(0,s.encode)(f),payload:""};if(l){E.payload=A.decoder.decode(p)}if(this._unprotectedHeader){E.header=this._unprotectedHeader}if(this._protectedHeader){E.protected=A.decoder.decode(g)}return E}}t.FlattenedSign=FlattenedSign},2095:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.flattenedVerify=void 0;const s=n(518);const i=n(3569);const r=n(4419);const o=n(1691);const A=n(6063);const a=n(9127);const c=n(6241);const u=n(863);const l=n(5148);async function flattenedVerify(e,t,n){var d;if(!(0,a.default)(e)){throw new r.JWSInvalid("Flattened JWS must be an object")}if(e.protected===undefined&&e.header===undefined){throw new r.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members')}if(e.protected!==undefined&&typeof e.protected!=="string"){throw new r.JWSInvalid("JWS Protected Header incorrect type")}if(e.payload===undefined){throw new r.JWSInvalid("JWS Payload missing")}if(typeof e.signature!=="string"){throw new r.JWSInvalid("JWS Signature missing or incorrect type")}if(e.header!==undefined&&!(0,a.default)(e.header)){throw new r.JWSInvalid("JWS Unprotected Header incorrect type")}let p={};if(e.protected){try{const t=(0,s.decode)(e.protected);p=JSON.parse(o.decoder.decode(t))}catch{throw new r.JWSInvalid("JWS Protected Header is invalid")}}if(!(0,A.default)(p,e.header)){throw new r.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint")}const g={...p,...e.header};const h=(0,u.default)(r.JWSInvalid,new Map([["b64",true]]),n===null||n===void 0?void 0:n.crit,p,g);let f=true;if(h.has("b64")){f=p.b64;if(typeof f!=="boolean"){throw new r.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}}const{alg:E}=g;if(typeof E!=="string"||!E){throw new r.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid')}const m=n&&(0,l.default)("algorithms",n.algorithms);if(m&&!m.has(E)){throw new r.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed')}if(f){if(typeof e.payload!=="string"){throw new r.JWSInvalid("JWS Payload must be a string")}}else if(typeof e.payload!=="string"&&!(e.payload instanceof Uint8Array)){throw new r.JWSInvalid("JWS Payload must be a string or an Uint8Array instance")}let C=false;if(typeof t==="function"){t=await t(p,e);C=true}(0,c.default)(E,t,"verify");const Q=(0,o.concat)(o.encoder.encode((d=e.protected)!==null&&d!==void 0?d:""),o.encoder.encode("."),typeof e.payload==="string"?o.encoder.encode(e.payload):e.payload);let I;try{I=(0,s.decode)(e.signature)}catch{throw new r.JWSInvalid("Failed to base64url decode the signature")}const B=await(0,i.default)(E,t,I,Q);if(!B){throw new r.JWSSignatureVerificationFailed}let y;if(f){try{y=(0,s.decode)(e.payload)}catch{throw new r.JWSInvalid("Failed to base64url decode the payload")}}else if(typeof e.payload==="string"){y=o.encoder.encode(e.payload)}else{y=e.payload}const b={payload:y};if(e.protected!==undefined){b.protectedHeader=p}if(e.header!==undefined){b.unprotectedHeader=e.header}if(C){return{...b,key:t}}return b}t.flattenedVerify=flattenedVerify},4268:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GeneralSign=void 0;const s=n(4825);const i=n(4419);class IndividualSignature{constructor(e,t,n){this.parent=e;this.key=t;this.options=n}setProtectedHeader(e){if(this.protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this.protectedHeader=e;return this}setUnprotectedHeader(e){if(this.unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this.unprotectedHeader=e;return this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class GeneralSign{constructor(e){this._signatures=[];this._payload=e}addSignature(e,t){const n=new IndividualSignature(this,e,t);this._signatures.push(n);return n}async sign(){if(!this._signatures.length){throw new i.JWSInvalid("at least one signature must be added")}const e={signatures:[],payload:""};for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generalVerify=void 0;const s=n(2095);const i=n(4419);const r=n(9127);async function generalVerify(e,t,n){if(!(0,r.default)(e)){throw new i.JWSInvalid("General JWS must be an object")}if(!Array.isArray(e.signatures)||!e.signatures.every(r.default)){throw new i.JWSInvalid("JWS Signatures missing or incorrect type")}for(const i of e.signatures){try{return await(0,s.flattenedVerify)({header:i.header,payload:e.payload,protected:i.protected,signature:i.signature},t,n)}catch{}}throw new i.JWSSignatureVerificationFailed}t.generalVerify=generalVerify},3378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwtDecrypt=void 0;const s=n(7651);const i=n(7274);const r=n(4419);async function jwtDecrypt(e,t,n){const o=await(0,s.compactDecrypt)(e,t,n);const A=(0,i.default)(o.protectedHeader,o.plaintext,n);const{protectedHeader:a}=o;if(a.iss!==undefined&&a.iss!==A.iss){throw new r.JWTClaimValidationFailed('replicated "iss" claim header parameter mismatch',"iss","mismatch")}if(a.sub!==undefined&&a.sub!==A.sub){throw new r.JWTClaimValidationFailed('replicated "sub" claim header parameter mismatch',"sub","mismatch")}if(a.aud!==undefined&&JSON.stringify(a.aud)!==JSON.stringify(A.aud)){throw new r.JWTClaimValidationFailed('replicated "aud" claim header parameter mismatch',"aud","mismatch")}const c={payload:A,protectedHeader:a};if(typeof t==="function"){return{...c,key:o.key}}return c}t.jwtDecrypt=jwtDecrypt},960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EncryptJWT=void 0;const s=n(6203);const i=n(1691);const r=n(1908);class EncryptJWT extends r.ProduceJWT{setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setKeyManagementParameters(e){if(this._keyManagementParameters){throw new TypeError("setKeyManagementParameters can only be called once")}this._keyManagementParameters=e;return this}setContentEncryptionKey(e){if(this._cek){throw new TypeError("setContentEncryptionKey can only be called once")}this._cek=e;return this}setInitializationVector(e){if(this._iv){throw new TypeError("setInitializationVector can only be called once")}this._iv=e;return this}replicateIssuerAsHeader(){this._replicateIssuerAsHeader=true;return this}replicateSubjectAsHeader(){this._replicateSubjectAsHeader=true;return this}replicateAudienceAsHeader(){this._replicateAudienceAsHeader=true;return this}async encrypt(e,t){const n=new s.CompactEncrypt(i.encoder.encode(JSON.stringify(this._payload)));if(this._replicateIssuerAsHeader){this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}}if(this._replicateSubjectAsHeader){this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}}if(this._replicateAudienceAsHeader){this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}}n.setProtectedHeader(this._protectedHeader);if(this._iv){n.setInitializationVector(this._iv)}if(this._cek){n.setContentEncryptionKey(this._cek)}if(this._keyManagementParameters){n.setKeyManagementParameters(this._keyManagementParameters)}return n.encrypt(e,t)}}t.EncryptJWT=EncryptJWT},1908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ProduceJWT=void 0;const s=n(4476);const i=n(9127);const r=n(7810);class ProduceJWT{constructor(e){if(!(0,i.default)(e)){throw new TypeError("JWT Claims Set MUST be an object")}this._payload=e}setIssuer(e){this._payload={...this._payload,iss:e};return this}setSubject(e){this._payload={...this._payload,sub:e};return this}setAudience(e){this._payload={...this._payload,aud:e};return this}setJti(e){this._payload={...this._payload,jti:e};return this}setNotBefore(e){if(typeof e==="number"){this._payload={...this._payload,nbf:e}}else{this._payload={...this._payload,nbf:(0,s.default)(new Date)+(0,r.default)(e)}}return this}setExpirationTime(e){if(typeof e==="number"){this._payload={...this._payload,exp:e}}else{this._payload={...this._payload,exp:(0,s.default)(new Date)+(0,r.default)(e)}}return this}setIssuedAt(e){if(typeof e==="undefined"){this._payload={...this._payload,iat:(0,s.default)(new Date)}}else{this._payload={...this._payload,iat:e}}return this}}t.ProduceJWT=ProduceJWT},8882:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SignJWT=void 0;const s=n(8257);const i=n(4419);const r=n(1691);const o=n(1908);class SignJWT extends o.ProduceJWT{setProtectedHeader(e){this._protectedHeader=e;return this}async sign(e,t){var n;const o=new s.CompactSign(r.encoder.encode(JSON.stringify(this._payload)));o.setProtectedHeader(this._protectedHeader);if(Array.isArray((n=this._protectedHeader)===null||n===void 0?void 0:n.crit)&&this._protectedHeader.crit.includes("b64")&&this._protectedHeader.b64===false){throw new i.JWTInvalid("JWTs MUST NOT use unencoded payload")}return o.sign(e,t)}}t.SignJWT=SignJWT},8568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UnsecuredJWT=void 0;const s=n(518);const i=n(1691);const r=n(4419);const o=n(7274);const A=n(1908);class UnsecuredJWT extends A.ProduceJWT{encode(){const e=s.encode(JSON.stringify({alg:"none"}));const t=s.encode(JSON.stringify(this._payload));return`${e}.${t}.`}static decode(e,t){if(typeof e!=="string"){throw new r.JWTInvalid("Unsecured JWT must be a string")}const{0:n,1:A,2:a,length:c}=e.split(".");if(c!==3||a!==""){throw new r.JWTInvalid("Invalid Unsecured JWT")}let u;try{u=JSON.parse(i.decoder.decode(s.decode(n)));if(u.alg!=="none")throw new Error}catch{throw new r.JWTInvalid("Invalid Unsecured JWT")}const l=(0,o.default)(u,s.decode(A),t);return{payload:l,header:u}}}t.UnsecuredJWT=UnsecuredJWT},9887:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwtVerify=void 0;const s=n(5212);const i=n(7274);const r=n(4419);async function jwtVerify(e,t,n){var o;const A=await(0,s.compactVerify)(e,t,n);if(((o=A.protectedHeader.crit)===null||o===void 0?void 0:o.includes("b64"))&&A.protectedHeader.b64===false){throw new r.JWTInvalid("JWTs MUST NOT use unencoded payload")}const a=(0,i.default)(A.protectedHeader,A.payload,n);const c={payload:a,protectedHeader:A.protectedHeader};if(typeof t==="function"){return{...c,key:A.key}}return c}t.jwtVerify=jwtVerify},465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.exportJWK=t.exportPKCS8=t.exportSPKI=void 0;const s=n(858);const i=n(858);const r=n(997);async function exportSPKI(e){return(0,s.toSPKI)(e)}t.exportSPKI=exportSPKI;async function exportPKCS8(e){return(0,i.toPKCS8)(e)}t.exportPKCS8=exportPKCS8;async function exportJWK(e){return(0,r.default)(e)}t.exportJWK=exportJWK},1036:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateKeyPair=void 0;const s=n(9378);async function generateKeyPair(e,t){return(0,s.generateKeyPair)(e,t)}t.generateKeyPair=generateKeyPair},6617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateSecret=void 0;const s=n(9378);async function generateSecret(e,t){return(0,s.generateSecret)(e,t)}t.generateSecret=generateSecret},4230:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.importJWK=t.importPKCS8=t.importX509=t.importSPKI=void 0;const s=n(518);const i=n(858);const r=n(2659);const o=n(4419);const A=n(9127);async function importSPKI(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN PUBLIC KEY-----")!==0){throw new TypeError('"spki" must be SPKI formatted string')}return(0,i.fromSPKI)(e,t,n)}t.importSPKI=importSPKI;async function importX509(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN CERTIFICATE-----")!==0){throw new TypeError('"x509" must be X.509 formatted string')}return(0,i.fromX509)(e,t,n)}t.importX509=importX509;async function importPKCS8(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0){throw new TypeError('"pkcs8" must be PKCS#8 formatted string')}return(0,i.fromPKCS8)(e,t,n)}t.importPKCS8=importPKCS8;async function importJWK(e,t,n){var i;if(!(0,A.default)(e)){throw new TypeError("JWK must be an object")}t||(t=e.alg);switch(e.kty){case"oct":if(typeof e.k!=="string"||!e.k){throw new TypeError('missing "k" (Key Value) Parameter value')}n!==null&&n!==void 0?n:n=e.ext!==true;if(n){return(0,r.default)({...e,alg:t,ext:(i=e.ext)!==null&&i!==void 0?i:false})}return(0,s.decode)(e.k);case"RSA":if(e.oth!==undefined){throw new o.JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported')}case"EC":case"OKP":return(0,r.default)({...e,alg:t});default:throw new o.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value')}}t.importJWK=importJWK},233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unwrap=t.wrap=void 0;const s=n(6476);const i=n(6137);const r=n(4630);const o=n(518);async function wrap(e,t,n,i){const A=e.slice(0,7);i||(i=(0,r.default)(A));const{ciphertext:a,tag:c}=await(0,s.default)(A,n,t,i,new Uint8Array(0));return{encryptedKey:a,iv:(0,o.encode)(i),tag:(0,o.encode)(c)}}t.wrap=wrap;async function unwrap(e,t,n,s,r){const o=e.slice(0,7);return(0,i.default)(o,t,n,s,r,new Uint8Array(0))}t.unwrap=unwrap},1691:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.concatKdf=t.lengthAndInput=t.uint32be=t.uint64be=t.p2s=t.concat=t.decoder=t.encoder=void 0;const s=n(2355);t.encoder=new TextEncoder;t.decoder=new TextDecoder;const i=2**32;function concat(...e){const t=e.reduce(((e,{length:t})=>e+t),0);const n=new Uint8Array(t);let s=0;e.forEach((e=>{n.set(e,s);s+=e.length}));return n}t.concat=concat;function p2s(e,n){return concat(t.encoder.encode(e),new Uint8Array([0]),n)}t.p2s=p2s;function writeUInt32BE(e,t,n){if(t<0||t>=i){throw new RangeError(`value must be >= 0 and <= ${i-1}. Received ${t}`)}e.set([t>>>24,t>>>16,t>>>8,t&255],n)}function uint64be(e){const t=Math.floor(e/i);const n=e%i;const s=new Uint8Array(8);writeUInt32BE(s,t,0);writeUInt32BE(s,n,4);return s}t.uint64be=uint64be;function uint32be(e){const t=new Uint8Array(4);writeUInt32BE(t,e);return t}t.uint32be=uint32be;function lengthAndInput(e){return concat(uint32be(e.length),e)}t.lengthAndInput=lengthAndInput;async function concatKdf(e,t,n){const i=Math.ceil((t>>3)/32);const r=new Uint8Array(i*32);for(let t=0;t>3)}t.concatKdf=concatKdf},3987:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.bitLength=void 0;const s=n(4419);const i=n(5770);function bitLength(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new s.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}t.bitLength=bitLength;t["default"]=e=>(0,i.default)(new Uint8Array(bitLength(e)>>3))},1120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(4630);const checkIvLength=(e,t)=>{if(t.length<<3!==(0,i.bitLength)(e)){throw new s.JWEInvalid("Invalid Initialization Vector length")}};t["default"]=checkIvLength},6241:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(1146);const i=n(7947);const symmetricTypeCheck=(e,t)=>{if(t instanceof Uint8Array)return;if(!(0,i.default)(t)){throw new TypeError((0,s.withAlg)(e,t,...i.types,"Uint8Array"))}if(t.type!=="secret"){throw new TypeError(`${i.types.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}};const asymmetricTypeCheck=(e,t,n)=>{if(!(0,i.default)(t)){throw new TypeError((0,s.withAlg)(e,t,...i.types))}if(t.type==="secret"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`)}if(n==="sign"&&t.type==="public"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`)}if(n==="decrypt"&&t.type==="public"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`)}if(t.algorithm&&n==="verify"&&t.type==="private"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`)}if(t.algorithm&&n==="encrypt"&&t.type==="private"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)}};const checkKeyType=(e,t,n)=>{const s=e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e);if(s){symmetricTypeCheck(e,t)}else{asymmetricTypeCheck(e,t,n)}};t["default"]=checkKeyType},3499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function checkP2s(e){if(!(e instanceof Uint8Array)||e.length<8){throw new s.JWEInvalid("PBES2 Salt Input must be 8 or more octets")}}t["default"]=checkP2s},3386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkEncCryptoKey=t.checkSigCryptoKey=void 0;function unusable(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function isAlgorithm(e,t){return e.name===t}function getHashLength(e){return parseInt(e.name.slice(4),10)}function getNamedCurve(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function checkUsage(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const n=t.pop();e+=`one of ${t.join(", ")}, or ${n}.`}else if(t.length===2){e+=`one of ${t[0]} or ${t[1]}.`}else{e+=`${t[0]}.`}throw new TypeError(e)}}function checkSigCryptoKey(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!isAlgorithm(e.algorithm,"HMAC"))throw unusable("HMAC");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!isAlgorithm(e.algorithm,"RSASSA-PKCS1-v1_5"))throw unusable("RSASSA-PKCS1-v1_5");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!isAlgorithm(e.algorithm,"RSA-PSS"))throw unusable("RSA-PSS");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":{if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448"){throw unusable("Ed25519 or Ed448")}break}case"ES256":case"ES384":case"ES512":{if(!isAlgorithm(e.algorithm,"ECDSA"))throw unusable("ECDSA");const n=getNamedCurve(t);const s=e.algorithm.namedCurve;if(s!==n)throw unusable(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(e,n)}t.checkSigCryptoKey=checkSigCryptoKey;function checkEncCryptoKey(e,t,...n){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!isAlgorithm(e.algorithm,"AES-GCM"))throw unusable("AES-GCM");const n=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==n)throw unusable(n,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!isAlgorithm(e.algorithm,"AES-KW"))throw unusable("AES-KW");const n=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==n)throw unusable(n,"algorithm.length");break}case"ECDH":{switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw unusable("ECDH, X25519, or X448")}break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!isAlgorithm(e.algorithm,"PBKDF2"))throw unusable("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!isAlgorithm(e.algorithm,"RSA-OAEP"))throw unusable("RSA-OAEP");const n=parseInt(t.slice(9),10)||1;const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(e,n)}t.checkEncCryptoKey=checkEncCryptoKey},6127:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6083);const i=n(3706);const r=n(6898);const o=n(9526);const A=n(518);const a=n(4419);const c=n(3987);const u=n(4230);const l=n(6241);const d=n(9127);const p=n(233);async function decryptKeyManagement(e,t,n,g,h){(0,l.default)(e,t,"decrypt");switch(e){case"dir":{if(n!==undefined)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");return t}case"ECDH-ES":if(n!==undefined)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!(0,d.default)(g.epk))throw new a.JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`);if(!i.ecdhAllowed(t))throw new a.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime");const r=await(0,u.importJWK)(g.epk,e);let o;let l;if(g.apu!==undefined){if(typeof g.apu!=="string")throw new a.JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`);try{o=(0,A.decode)(g.apu)}catch{throw new a.JWEInvalid("Failed to base64url decode the apu")}}if(g.apv!==undefined){if(typeof g.apv!=="string")throw new a.JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`);try{l=(0,A.decode)(g.apv)}catch{throw new a.JWEInvalid("Failed to base64url decode the apv")}}const p=await i.deriveKey(r,t,e==="ECDH-ES"?g.enc:e,e==="ECDH-ES"?(0,c.bitLength)(g.enc):parseInt(e.slice(-5,-2),10),o,l);if(e==="ECDH-ES")return p;if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,s.unwrap)(e.slice(-6),p,n)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,o.decrypt)(e,t,n)}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");if(typeof g.p2c!=="number")throw new a.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`);const s=(h===null||h===void 0?void 0:h.maxPBES2Count)||1e4;if(g.p2c>s)throw new a.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds`);if(typeof g.p2s!=="string")throw new a.JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`);let i;try{i=(0,A.decode)(g.p2s)}catch{throw new a.JWEInvalid("Failed to base64url decode the p2s")}return(0,r.decrypt)(e,t,n,g.p2c,i)}case"A128KW":case"A192KW":case"A256KW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,s.unwrap)(e,t,n)}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");if(typeof g.iv!=="string")throw new a.JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`);if(typeof g.tag!=="string")throw new a.JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`);let s;try{s=(0,A.decode)(g.iv)}catch{throw new a.JWEInvalid("Failed to base64url decode the iv")}let i;try{i=(0,A.decode)(g.tag)}catch{throw new a.JWEInvalid("Failed to base64url decode the tag")}return(0,p.unwrap)(e,t,n,s,i)}default:{throw new a.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}}t["default"]=decryptKeyManagement},3286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6083);const i=n(3706);const r=n(6898);const o=n(9526);const A=n(518);const a=n(3987);const c=n(4419);const u=n(465);const l=n(6241);const d=n(233);async function encryptKeyManagement(e,t,n,p,g={}){let h;let f;let E;(0,l.default)(e,n,"encrypt");switch(e){case"dir":{E=n;break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!i.ecdhAllowed(n)){throw new c.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime")}const{apu:r,apv:o}=g;let{epk:l}=g;l||(l=(await i.generateEpk(n)).privateKey);const{x:d,y:m,crv:C,kty:Q}=await(0,u.exportJWK)(l);const I=await i.deriveKey(n,l,e==="ECDH-ES"?t:e,e==="ECDH-ES"?(0,a.bitLength)(t):parseInt(e.slice(-5,-2),10),r,o);f={epk:{x:d,crv:C,kty:Q}};if(Q==="EC")f.epk.y=m;if(r)f.apu=(0,A.encode)(r);if(o)f.apv=(0,A.encode)(o);if(e==="ECDH-ES"){E=I;break}E=p||(0,a.default)(t);const B=e.slice(-6);h=await(0,s.wrap)(B,I,E);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{E=p||(0,a.default)(t);h=await(0,o.encrypt)(e,n,E);break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{E=p||(0,a.default)(t);const{p2c:s,p2s:i}=g;({encryptedKey:h,...f}=await(0,r.encrypt)(e,n,E,s,i));break}case"A128KW":case"A192KW":case"A256KW":{E=p||(0,a.default)(t);h=await(0,s.wrap)(e,n,E);break}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{E=p||(0,a.default)(t);const{iv:s}=g;({encryptedKey:h,...f}=await(0,d.wrap)(e,n,E,s));break}default:{throw new c.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}return{cek:E,encryptedKey:h,parameters:f}}t["default"]=encryptKeyManagement},4476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=e=>Math.floor(e.getTime()/1e3)},1146:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.withAlg=void 0;function message(e,t,...n){if(n.length>2){const t=n.pop();e+=`one of type ${n.join(", ")}, or ${t}.`}else if(n.length===2){e+=`one of type ${n[0]} or ${n[1]}.`}else{e+=`of type ${n[0]}.`}if(t==null){e+=` Received ${t}`}else if(typeof t==="function"&&t.name){e+=` Received function ${t.name}`}else if(typeof t==="object"&&t!=null){if(t.constructor&&t.constructor.name){e+=` Received an instance of ${t.constructor.name}`}}return e}t["default"]=(e,...t)=>message("Key must be ",e,...t);function withAlg(e,t,...n){return message(`Key for the ${e} algorithm must be `,t,...n)}t.withAlg=withAlg},6063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const isDisjoint=(...e)=>{const t=e.filter(Boolean);if(t.length===0||t.length===1){return true}let n;for(const e of t){const t=Object.keys(e);if(!n||n.size===0){n=new Set(t);continue}for(const e of t){if(n.has(e)){return false}n.add(e)}}return true};t["default"]=isDisjoint},9127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function isObjectLike(e){return typeof e==="object"&&e!==null}function isObject(e){if(!isObjectLike(e)||Object.prototype.toString.call(e)!=="[object Object]"){return false}if(Object.getPrototypeOf(e)===null){return true}let t=e;while(Object.getPrototypeOf(t)!==null){t=Object.getPrototypeOf(t)}return Object.getPrototypeOf(e)===t}t["default"]=isObject},4630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.bitLength=void 0;const s=n(4419);const i=n(5770);function bitLength(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new s.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}t.bitLength=bitLength;t["default"]=e=>(0,i.default)(new Uint8Array(bitLength(e)>>3))},7274:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(1691);const r=n(4476);const o=n(7810);const A=n(9127);const normalizeTyp=e=>e.toLowerCase().replace(/^application\//,"");const checkAudiencePresence=(e,t)=>{if(typeof e==="string"){return t.includes(e)}if(Array.isArray(e)){return t.some(Set.prototype.has.bind(new Set(e)))}return false};t["default"]=(e,t,n={})=>{const{typ:a}=n;if(a&&(typeof e.typ!=="string"||normalizeTyp(e.typ)!==normalizeTyp(a))){throw new s.JWTClaimValidationFailed('unexpected "typ" JWT header value',"typ","check_failed")}let c;try{c=JSON.parse(i.decoder.decode(t))}catch{}if(!(0,A.default)(c)){throw new s.JWTInvalid("JWT Claims Set must be a top-level JSON object")}const{requiredClaims:u=[],issuer:l,subject:d,audience:p,maxTokenAge:g}=n;if(g!==undefined)u.push("iat");if(p!==undefined)u.push("aud");if(d!==undefined)u.push("sub");if(l!==undefined)u.push("iss");for(const e of new Set(u.reverse())){if(!(e in c)){throw new s.JWTClaimValidationFailed(`missing required "${e}" claim`,e,"missing")}}if(l&&!(Array.isArray(l)?l:[l]).includes(c.iss)){throw new s.JWTClaimValidationFailed('unexpected "iss" claim value',"iss","check_failed")}if(d&&c.sub!==d){throw new s.JWTClaimValidationFailed('unexpected "sub" claim value',"sub","check_failed")}if(p&&!checkAudiencePresence(c.aud,typeof p==="string"?[p]:p)){throw new s.JWTClaimValidationFailed('unexpected "aud" claim value',"aud","check_failed")}let h;switch(typeof n.clockTolerance){case"string":h=(0,o.default)(n.clockTolerance);break;case"number":h=n.clockTolerance;break;case"undefined":h=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:f}=n;const E=(0,r.default)(f||new Date);if((c.iat!==undefined||g)&&typeof c.iat!=="number"){throw new s.JWTClaimValidationFailed('"iat" claim must be a number',"iat","invalid")}if(c.nbf!==undefined){if(typeof c.nbf!=="number"){throw new s.JWTClaimValidationFailed('"nbf" claim must be a number',"nbf","invalid")}if(c.nbf>E+h){throw new s.JWTClaimValidationFailed('"nbf" claim timestamp check failed',"nbf","check_failed")}}if(c.exp!==undefined){if(typeof c.exp!=="number"){throw new s.JWTClaimValidationFailed('"exp" claim must be a number',"exp","invalid")}if(c.exp<=E-h){throw new s.JWTExpired('"exp" claim timestamp check failed',"exp","check_failed")}}if(g){const e=E-c.iat;const t=typeof g==="number"?g:(0,o.default)(g);if(e-h>t){throw new s.JWTExpired('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed")}if(e<0-h){throw new s.JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}}return c}},7810:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=60;const s=n*60;const i=s*24;const r=i*7;const o=i*365.25;const A=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i;t["default"]=e=>{const t=A.exec(e);if(!t){throw new TypeError("Invalid time period format")}const a=parseFloat(t[1]);const c=t[2].toLowerCase();switch(c){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(a);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(a*n);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(a*s);case"day":case"days":case"d":return Math.round(a*i);case"week":case"weeks":case"w":return Math.round(a*r);default:return Math.round(a*o)}}},5148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const validateAlgorithms=(e,t)=>{if(t!==undefined&&(!Array.isArray(t)||t.some((e=>typeof e!=="string")))){throw new TypeError(`"${e}" option must be an array of strings`)}if(!t){return undefined}return new Set(t)};t["default"]=validateAlgorithms},863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function validateCrit(e,t,n,i,r){if(r.crit!==undefined&&i.crit===undefined){throw new e('"crit" (Critical) Header Parameter MUST be integrity protected')}if(!i||i.crit===undefined){return new Set}if(!Array.isArray(i.crit)||i.crit.length===0||i.crit.some((e=>typeof e!=="string"||e.length===0))){throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present')}let o;if(n!==undefined){o=new Map([...Object.entries(n),...t.entries()])}else{o=t}for(const t of i.crit){if(!o.has(t)){throw new s.JOSENotSupported(`Extension Header Parameter "${t}" is not recognized`)}if(r[t]===undefined){throw new e(`Extension Header Parameter "${t}" is missing`)}else if(o.get(t)&&i[t]===undefined){throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}}return new Set(i.crit)}t["default"]=validateCrit},6083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unwrap=t.wrap=void 0;const s=n(4300);const i=n(6113);const r=n(4419);const o=n(1691);const A=n(6852);const a=n(3386);const c=n(2768);const u=n(1146);const l=n(4618);const d=n(7947);function checkKeySize(e,t){if(e.symmetricKeySize<<3!==parseInt(t.slice(1,4),10)){throw new TypeError(`Invalid key size for alg: ${t}`)}}function ensureKeyObject(e,t,n){if((0,c.default)(e)){return e}if(e instanceof Uint8Array){return(0,i.createSecretKey)(e)}if((0,A.isCryptoKey)(e)){(0,a.checkEncCryptoKey)(e,t,n);return i.KeyObject.from(e)}throw new TypeError((0,u.default)(e,...d.types,"Uint8Array"))}const wrap=(e,t,n)=>{const A=parseInt(e.slice(1,4),10);const a=`aes${A}-wrap`;if(!(0,l.default)(a)){throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}const c=ensureKeyObject(t,e,"wrapKey");checkKeySize(c,e);const u=(0,i.createCipheriv)(a,c,s.Buffer.alloc(8,166));return(0,o.concat)(u.update(n),u.final())};t.wrap=wrap;const unwrap=(e,t,n)=>{const A=parseInt(e.slice(1,4),10);const a=`aes${A}-wrap`;if(!(0,l.default)(a)){throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}const c=ensureKeyObject(t,e,"unwrapKey");checkKeySize(c,e);const u=(0,i.createDecipheriv)(a,c,s.Buffer.alloc(8,166));return(0,o.concat)(u.update(n),u.final())};t.unwrap=unwrap},858:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.fromX509=t.fromSPKI=t.fromPKCS8=t.toPKCS8=t.toSPKI=void 0;const s=n(6113);const i=n(4300);const r=n(6852);const o=n(2768);const A=n(1146);const a=n(7947);const genericExport=(e,t,n)=>{let i;if((0,r.isCryptoKey)(n)){if(!n.extractable){throw new TypeError("CryptoKey is not extractable")}i=s.KeyObject.from(n)}else if((0,o.default)(n)){i=n}else{throw new TypeError((0,A.default)(n,...a.types))}if(i.type!==e){throw new TypeError(`key is not a ${e} key`)}return i.export({format:"pem",type:t})};const toSPKI=e=>genericExport("public","spki",e);t.toSPKI=toSPKI;const toPKCS8=e=>genericExport("private","pkcs8",e);t.toPKCS8=toPKCS8;const fromPKCS8=e=>(0,s.createPrivateKey)({key:i.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,""),"base64"),type:"pkcs8",format:"der"});t.fromPKCS8=fromPKCS8;const fromSPKI=e=>(0,s.createPublicKey)({key:i.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,""),"base64"),type:"spki",format:"der"});t.fromSPKI=fromSPKI;const fromX509=e=>(0,s.createPublicKey)({key:e,type:"spki",format:"pem"});t.fromX509=fromX509},3888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=2;const s=48;class Asn1SequenceDecoder{constructor(e){if(e[0]!==s){throw new TypeError}this.buffer=e;this.offset=1;const t=this.decodeLength();if(t!==e.length-this.offset){throw new TypeError}}decodeLength(){let e=this.buffer[this.offset++];if(e&128){const t=e&~128;e=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4300);const i=n(4419);const r=2;const o=3;const A=4;const a=48;const c=s.Buffer.from([0]);const u=s.Buffer.from([r]);const l=s.Buffer.from([o]);const d=s.Buffer.from([a]);const p=s.Buffer.from([A]);const encodeLength=e=>{if(e<128)return s.Buffer.from([e]);const t=s.Buffer.alloc(5);t.writeUInt32BE(e,1);let n=1;while(t[n]===0)n++;t[n-1]=128|5-n;return t.slice(n-1)};const g=new Map([["P-256",s.Buffer.from("06 08 2A 86 48 CE 3D 03 01 07".replace(/ /g,""),"hex")],["secp256k1",s.Buffer.from("06 05 2B 81 04 00 0A".replace(/ /g,""),"hex")],["P-384",s.Buffer.from("06 05 2B 81 04 00 22".replace(/ /g,""),"hex")],["P-521",s.Buffer.from("06 05 2B 81 04 00 23".replace(/ /g,""),"hex")],["ecPublicKey",s.Buffer.from("06 07 2A 86 48 CE 3D 02 01".replace(/ /g,""),"hex")],["X25519",s.Buffer.from("06 03 2B 65 6E".replace(/ /g,""),"hex")],["X448",s.Buffer.from("06 03 2B 65 6F".replace(/ /g,""),"hex")],["Ed25519",s.Buffer.from("06 03 2B 65 70".replace(/ /g,""),"hex")],["Ed448",s.Buffer.from("06 03 2B 65 71".replace(/ /g,""),"hex")]]);class DumbAsn1Encoder{constructor(){this.length=0;this.elements=[]}oidFor(e){const t=g.get(e);if(!t){throw new i.JOSENotSupported("Invalid or unsupported OID")}this.elements.push(t);this.length+=t.length}zero(){this.elements.push(u,s.Buffer.from([1]),c);this.length+=3}one(){this.elements.push(u,s.Buffer.from([1]),s.Buffer.from([1]));this.length+=3}unsignedInteger(e){if(e[0]&128){const t=encodeLength(e.length+1);this.elements.push(u,t,c,e);this.length+=2+t.length+e.length}else{let t=0;while(e[t]===0&&(e[t+1]&128)===0)t++;const n=encodeLength(e.length-t);this.elements.push(u,encodeLength(e.length-t),e.slice(t));this.length+=1+n.length+e.length-t}}octStr(e){const t=encodeLength(e.length);this.elements.push(p,encodeLength(e.length),e);this.length+=1+t.length+e.length}bitStr(e){const t=encodeLength(e.length+1);this.elements.push(l,encodeLength(e.length+1),c,e);this.length+=1+t.length+e.length+1}add(e){this.elements.push(e);this.length+=e.length}end(e=d){const t=encodeLength(this.length);return s.Buffer.concat([e,t,...this.elements],1+t.length+this.length)}}t["default"]=DumbAsn1Encoder},518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=t.encodeBase64=t.decodeBase64=void 0;const s=n(4300);const i=n(1691);let r;function normalize(e){let t=e;if(t instanceof Uint8Array){t=i.decoder.decode(t)}return t}if(s.Buffer.isEncoding("base64url")){t.encode=r=e=>s.Buffer.from(e).toString("base64url")}else{t.encode=r=e=>s.Buffer.from(e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}const decodeBase64=e=>s.Buffer.from(e,"base64");t.decodeBase64=decodeBase64;const encodeBase64=e=>s.Buffer.from(e).toString("base64");t.encodeBase64=encodeBase64;const decode=e=>s.Buffer.from(normalize(e),"base64");t.decode=decode},4519:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1691);function cbcTag(e,t,n,r,o,A){const a=(0,i.concat)(e,t,n,(0,i.uint64be)(e.length<<3));const c=(0,s.createHmac)(`sha${r}`,o);c.update(a);return c.digest().slice(0,A>>3)}t["default"]=cbcTag},4047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(2768);const checkCekLength=(e,t)=>{let n;switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":n=parseInt(e.slice(-3),10);break;case"A128GCM":case"A192GCM":case"A256GCM":n=parseInt(e.slice(1,4),10);break;default:throw new s.JOSENotSupported(`Content Encryption Algorithm ${e} is not supported either by JOSE or your javascript runtime`)}if(t instanceof Uint8Array){const e=t.byteLength<<3;if(e!==n){throw new s.JWEInvalid(`Invalid Content Encryption Key length. Expected ${n} bits, got ${e} bits`)}return}if((0,i.default)(t)&&t.type==="secret"){const e=t.symmetricKeySize<<3;if(e!==n){throw new s.JWEInvalid(`Invalid Content Encryption Key length. Expected ${n} bits, got ${e} bits`)}return}throw new TypeError("Invalid Content Encryption Key type")};t["default"]=checkCekLength},122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setModulusLength=t.weakMap=void 0;t.weakMap=new WeakMap;const getLength=(e,t)=>{let n=e.readUInt8(1);if((n&128)===0){if(t===0){return n}return getLength(e.subarray(2+n),t-1)}const s=n&127;n=0;for(let t=0;t{const n=e.readUInt8(1);if((n&128)===0){return getLength(e.subarray(2),t)}const s=n&127;return getLength(e.subarray(2+s),t)};const getModulusLength=e=>{var n,s;if(t.weakMap.has(e)){return t.weakMap.get(e)}const i=(s=(n=e.asymmetricKeyDetails)===null||n===void 0?void 0:n.modulusLength)!==null&&s!==void 0?s:getLengthOfSeqIndex(e.export({format:"der",type:"pkcs1"}),e.type==="private"?1:0)-1<<3;t.weakMap.set(e,i);return i};const setModulusLength=(e,n)=>{t.weakMap.set(e,n)};t.setModulusLength=setModulusLength;t["default"]=(e,t)=>{if(getModulusLength(e)<2048){throw new TypeError(`${t} requires key modulusLength to be 2048 bits or larger`)}}},4618:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);let i;t["default"]=e=>{i||(i=new Set((0,s.getCiphers)()));return i.has(e)}},6137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1120);const r=n(4047);const o=n(1691);const A=n(4419);const a=n(5390);const c=n(4519);const u=n(6852);const l=n(3386);const d=n(2768);const p=n(1146);const g=n(4618);const h=n(7947);function cbcDecrypt(e,t,n,i,r,u){const l=parseInt(e.slice(1,4),10);if((0,d.default)(t)){t=t.export()}const p=t.subarray(l>>3);const h=t.subarray(0,l>>3);const f=parseInt(e.slice(-3),10);const E=`aes-${l}-cbc`;if(!(0,g.default)(E)){throw new A.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const m=(0,c.default)(u,i,n,f,h,l);let C;try{C=(0,a.default)(r,m)}catch{}if(!C){throw new A.JWEDecryptionFailed}let Q;try{const e=(0,s.createDecipheriv)(E,p,i);Q=(0,o.concat)(e.update(n),e.final())}catch{}if(!Q){throw new A.JWEDecryptionFailed}return Q}function gcmDecrypt(e,t,n,i,r,o){const a=parseInt(e.slice(1,4),10);const c=`aes-${a}-gcm`;if(!(0,g.default)(c)){throw new A.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}try{const e=(0,s.createDecipheriv)(c,t,i,{authTagLength:16});e.setAuthTag(r);if(o.byteLength){e.setAAD(o,{plaintextLength:n.length})}const A=e.update(n);e.final();return A}catch{throw new A.JWEDecryptionFailed}}const decrypt=(e,t,n,o,a,c)=>{let g;if((0,u.isCryptoKey)(t)){(0,l.checkEncCryptoKey)(t,e,"decrypt");g=s.KeyObject.from(t)}else if(t instanceof Uint8Array||(0,d.default)(t)){g=t}else{throw new TypeError((0,p.default)(t,...h.types,"Uint8Array"))}(0,r.default)(e,g);(0,i.default)(e,o);switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return cbcDecrypt(e,g,n,o,a,c);case"A128GCM":case"A192GCM":case"A256GCM":return gcmDecrypt(e,g,n,o,a,c);default:throw new A.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}};t["default"]=decrypt},2355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const digest=(e,t)=>(0,s.createHash)(e).update(t).digest();t["default"]=digest},4965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function dsaDigest(e){switch(e){case"PS256":case"RS256":case"ES256":case"ES256K":return"sha256";case"PS384":case"RS384":case"ES384":return"sha384";case"PS512":case"RS512":case"ES512":return"sha512";case"EdDSA":return undefined;default:throw new s.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=dsaDigest},3706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ecdhAllowed=t.generateEpk=t.deriveKey=void 0;const s=n(6113);const i=n(3837);const r=n(9302);const o=n(1691);const A=n(4419);const a=n(6852);const c=n(3386);const u=n(2768);const l=n(1146);const d=n(7947);const p=(0,i.promisify)(s.generateKeyPair);async function deriveKey(e,t,n,i,r=new Uint8Array(0),A=new Uint8Array(0)){let p;if((0,a.isCryptoKey)(e)){(0,c.checkEncCryptoKey)(e,"ECDH");p=s.KeyObject.from(e)}else if((0,u.default)(e)){p=e}else{throw new TypeError((0,l.default)(e,...d.types))}let g;if((0,a.isCryptoKey)(t)){(0,c.checkEncCryptoKey)(t,"ECDH","deriveBits");g=s.KeyObject.from(t)}else if((0,u.default)(t)){g=t}else{throw new TypeError((0,l.default)(t,...d.types))}const h=(0,o.concat)((0,o.lengthAndInput)(o.encoder.encode(n)),(0,o.lengthAndInput)(r),(0,o.lengthAndInput)(A),(0,o.uint32be)(i));const f=(0,s.diffieHellman)({privateKey:g,publicKey:p});return(0,o.concatKdf)(f,i,h)}t.deriveKey=deriveKey;async function generateEpk(e){let t;if((0,a.isCryptoKey)(e)){t=s.KeyObject.from(e)}else if((0,u.default)(e)){t=e}else{throw new TypeError((0,l.default)(e,...d.types))}switch(t.asymmetricKeyType){case"x25519":return p("x25519");case"x448":{return p("x448")}case"ec":{const e=(0,r.default)(t);return p("ec",{namedCurve:e})}default:throw new A.JOSENotSupported("Invalid or unsupported EPK")}}t.generateEpk=generateEpk;const ecdhAllowed=e=>["P-256","P-384","P-521","X25519","X448"].includes((0,r.default)(e));t.ecdhAllowed=ecdhAllowed},6476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1120);const r=n(4047);const o=n(1691);const A=n(4519);const a=n(6852);const c=n(3386);const u=n(2768);const l=n(1146);const d=n(4419);const p=n(4618);const g=n(7947);function cbcEncrypt(e,t,n,i,r){const a=parseInt(e.slice(1,4),10);if((0,u.default)(n)){n=n.export()}const c=n.subarray(a>>3);const l=n.subarray(0,a>>3);const g=`aes-${a}-cbc`;if(!(0,p.default)(g)){throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const h=(0,s.createCipheriv)(g,c,i);const f=(0,o.concat)(h.update(t),h.final());const E=parseInt(e.slice(-3),10);const m=(0,A.default)(r,i,f,E,l,a);return{ciphertext:f,tag:m}}function gcmEncrypt(e,t,n,i,r){const o=parseInt(e.slice(1,4),10);const A=`aes-${o}-gcm`;if(!(0,p.default)(A)){throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const a=(0,s.createCipheriv)(A,n,i,{authTagLength:16});if(r.byteLength){a.setAAD(r,{plaintextLength:t.length})}const c=a.update(t);a.final();const u=a.getAuthTag();return{ciphertext:c,tag:u}}const encrypt=(e,t,n,o,A)=>{let p;if((0,a.isCryptoKey)(n)){(0,c.checkEncCryptoKey)(n,e,"encrypt");p=s.KeyObject.from(n)}else if(n instanceof Uint8Array||(0,u.default)(n)){p=n}else{throw new TypeError((0,l.default)(n,...g.types,"Uint8Array"))}(0,r.default)(e,p);(0,i.default)(e,o);switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return cbcEncrypt(e,t,p,o,A);case"A128GCM":case"A192GCM":case"A256GCM":return gcmEncrypt(e,t,p,o,A);default:throw new d.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}};t["default"]=encrypt},3650:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(3685);const i=n(5687);const r=n(2361);const o=n(4419);const A=n(1691);const fetchJwks=async(e,t,n)=>{let a;switch(e.protocol){case"https:":a=i.get;break;case"http:":a=s.get;break;default:throw new TypeError("Unsupported URL protocol.")}const{agent:c,headers:u}=n;const l=a(e.href,{agent:c,timeout:t,headers:u});const[d]=await Promise.race([(0,r.once)(l,"response"),(0,r.once)(l,"timeout")]);if(!d){l.destroy();throw new o.JWKSTimeout}if(d.statusCode!==200){throw new o.JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response")}const p=[];for await(const e of d){p.push(e)}try{return JSON.parse(A.decoder.decode((0,A.concat)(...p)))}catch{throw new o.JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON")}};t["default"]=fetchJwks},9737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwkImport=t.jwkExport=t.rsaPssParams=t.oneShotCallback=void 0;const[n,s]=process.versions.node.split(".").map((e=>parseInt(e,10)));t.oneShotCallback=n>=16||n===15&&s>=13;t.rsaPssParams=!("electron"in process.versions)&&(n>=17||n===16&&s>=9);t.jwkExport=n>=16||n===15&&s>=9;t.jwkImport=n>=16||n===15&&s>=12},9378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateKeyPair=t.generateSecret=void 0;const s=n(6113);const i=n(3837);const r=n(5770);const o=n(122);const A=n(4419);const a=(0,i.promisify)(s.generateKeyPair);async function generateSecret(e,t){let n;switch(e){case"HS256":case"HS384":case"HS512":case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":n=parseInt(e.slice(-3),10);break;case"A128KW":case"A192KW":case"A256KW":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":n=parseInt(e.slice(1,4),10);break;default:throw new A.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return(0,s.createSecretKey)((0,r.default)(new Uint8Array(n>>3)))}t.generateSecret=generateSecret;async function generateKeyPair(e,t){var n,s;switch(e){case"RS256":case"RS384":case"RS512":case"PS256":case"PS384":case"PS512":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":case"RSA1_5":{const e=(n=t===null||t===void 0?void 0:t.modulusLength)!==null&&n!==void 0?n:2048;if(typeof e!=="number"||e<2048){throw new A.JOSENotSupported("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used")}const s=await a("rsa",{modulusLength:e,publicExponent:65537});(0,o.setModulusLength)(s.privateKey,e);(0,o.setModulusLength)(s.publicKey,e);return s}case"ES256":return a("ec",{namedCurve:"P-256"});case"ES256K":return a("ec",{namedCurve:"secp256k1"});case"ES384":return a("ec",{namedCurve:"P-384"});case"ES512":return a("ec",{namedCurve:"P-521"});case"EdDSA":{switch(t===null||t===void 0?void 0:t.crv){case undefined:case"Ed25519":return a("ed25519");case"Ed448":return a("ed448");default:throw new A.JOSENotSupported("Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448")}}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":const e=(s=t===null||t===void 0?void 0:t.crv)!==null&&s!==void 0?s:"P-256";switch(e){case undefined:case"P-256":case"P-384":case"P-521":return a("ec",{namedCurve:e});case"X25519":return a("x25519");case"X448":return a("x448");default:throw new A.JOSENotSupported("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}default:throw new A.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}}t.generateKeyPair=generateKeyPair},9302:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setCurve=t.weakMap=void 0;const s=n(4300);const i=n(6113);const r=n(4419);const o=n(6852);const A=n(2768);const a=n(1146);const c=n(7947);const u=s.Buffer.from([42,134,72,206,61,3,1,7]);const l=s.Buffer.from([43,129,4,0,34]);const d=s.Buffer.from([43,129,4,0,35]);const p=s.Buffer.from([43,129,4,0,10]);t.weakMap=new WeakMap;const namedCurveToJOSE=e=>{switch(e){case"prime256v1":return"P-256";case"secp384r1":return"P-384";case"secp521r1":return"P-521";case"secp256k1":return"secp256k1";default:throw new r.JOSENotSupported("Unsupported key curve for this operation")}};const getNamedCurve=(e,n)=>{var s;let g;if((0,o.isCryptoKey)(e)){g=i.KeyObject.from(e)}else if((0,A.default)(e)){g=e}else{throw new TypeError((0,a.default)(e,...c.types))}if(g.type==="secret"){throw new TypeError('only "private" or "public" type keys can be used for this operation')}switch(g.asymmetricKeyType){case"ed25519":case"ed448":return`Ed${g.asymmetricKeyType.slice(2)}`;case"x25519":case"x448":return`X${g.asymmetricKeyType.slice(1)}`;case"ec":{if(t.weakMap.has(g)){return t.weakMap.get(g)}let e=(s=g.asymmetricKeyDetails)===null||s===void 0?void 0:s.namedCurve;if(!e&&g.type==="private"){e=getNamedCurve((0,i.createPublicKey)(g),true)}else if(!e){const t=g.export({format:"der",type:"spki"});const n=t[1]<128?14:15;const s=t[n];const i=t.slice(n+1,n+1+s);if(i.equals(u)){e="prime256v1"}else if(i.equals(l)){e="secp384r1"}else if(i.equals(d)){e="secp521r1"}else if(i.equals(p)){e="secp256k1"}else{throw new r.JOSENotSupported("Unsupported key curve for this operation")}}if(n)return e;const o=namedCurveToJOSE(e);t.weakMap.set(g,o);return o}default:throw new TypeError("Invalid asymmetric key type for this operation")}};function setCurve(e,n){t.weakMap.set(e,n)}t.setCurve=setCurve;t["default"]=getNamedCurve},3170:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(6852);const r=n(3386);const o=n(1146);const A=n(7947);function getSignVerifyKey(e,t,n){if(t instanceof Uint8Array){if(!e.startsWith("HS")){throw new TypeError((0,o.default)(t,...A.types))}return(0,s.createSecretKey)(t)}if(t instanceof s.KeyObject){return t}if((0,i.isCryptoKey)(t)){(0,r.checkSigCryptoKey)(t,e,n);return s.KeyObject.from(t)}throw new TypeError((0,o.default)(t,...A.types,"Uint8Array"))}t["default"]=getSignVerifyKey},3811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function hmacDigest(e){switch(e){case"HS256":return"sha256";case"HS384":return"sha384";case"HS512":return"sha512";default:throw new s.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=hmacDigest},7947:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.types=void 0;const s=n(6852);const i=n(2768);t["default"]=e=>(0,i.default)(e)||(0,s.isCryptoKey)(e);const r=["KeyObject"];t.types=r;if(globalThis.CryptoKey||(s.default===null||s.default===void 0?void 0:s.default.CryptoKey)){r.push("CryptoKey")}},2768:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);t["default"]=i.types.isKeyObject?e=>i.types.isKeyObject(e):e=>e!=null&&e instanceof s.KeyObject},2659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4300);const i=n(6113);const r=n(518);const o=n(4419);const A=n(9302);const a=n(122);const c=n(3341);const u=n(9737);const parse=e=>{if(u.jwkImport&&e.kty!=="oct"){return e.d?(0,i.createPrivateKey)({format:"jwk",key:e}):(0,i.createPublicKey)({format:"jwk",key:e})}switch(e.kty){case"oct":{return(0,i.createSecretKey)((0,r.decode)(e.k))}case"RSA":{const t=new c.default;const n=e.d!==undefined;const r=s.Buffer.from(e.n,"base64");const o=s.Buffer.from(e.e,"base64");if(n){t.zero();t.unsignedInteger(r);t.unsignedInteger(o);t.unsignedInteger(s.Buffer.from(e.d,"base64"));t.unsignedInteger(s.Buffer.from(e.p,"base64"));t.unsignedInteger(s.Buffer.from(e.q,"base64"));t.unsignedInteger(s.Buffer.from(e.dp,"base64"));t.unsignedInteger(s.Buffer.from(e.dq,"base64"));t.unsignedInteger(s.Buffer.from(e.qi,"base64"))}else{t.unsignedInteger(r);t.unsignedInteger(o)}const A=t.end();const u={key:A,format:"der",type:"pkcs1"};const l=n?(0,i.createPrivateKey)(u):(0,i.createPublicKey)(u);(0,a.setModulusLength)(l,r.length<<3);return l}case"EC":{const t=new c.default;const n=e.d!==undefined;const r=s.Buffer.concat([s.Buffer.alloc(1,4),s.Buffer.from(e.x,"base64"),s.Buffer.from(e.y,"base64")]);if(n){t.zero();const n=new c.default;n.oidFor("ecPublicKey");n.oidFor(e.crv);t.add(n.end());const o=new c.default;o.one();o.octStr(s.Buffer.from(e.d,"base64"));const a=new c.default;a.bitStr(r);const u=a.end(s.Buffer.from([161]));o.add(u);const l=o.end();const d=new c.default;d.add(l);const p=d.end(s.Buffer.from([4]));t.add(p);const g=t.end();const h=(0,i.createPrivateKey)({key:g,format:"der",type:"pkcs8"});(0,A.setCurve)(h,e.crv);return h}const o=new c.default;o.oidFor("ecPublicKey");o.oidFor(e.crv);t.add(o.end());t.bitStr(r);const a=t.end();const u=(0,i.createPublicKey)({key:a,format:"der",type:"spki"});(0,A.setCurve)(u,e.crv);return u}case"OKP":{const t=new c.default;const n=e.d!==undefined;if(n){t.zero();const n=new c.default;n.oidFor(e.crv);t.add(n.end());const r=new c.default;r.octStr(s.Buffer.from(e.d,"base64"));const o=r.end(s.Buffer.from([4]));t.add(o);const A=t.end();return(0,i.createPrivateKey)({key:A,format:"der",type:"pkcs8"})}const r=new c.default;r.oidFor(e.crv);t.add(r.end());t.bitStr(s.Buffer.from(e.x,"base64"));const o=t.end();return(0,i.createPublicKey)({key:o,format:"der",type:"spki"})}default:throw new o.JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}};t["default"]=parse},997:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(518);const r=n(3888);const o=n(4419);const A=n(9302);const a=n(6852);const c=n(2768);const u=n(1146);const l=n(7947);const d=n(9737);const keyToJWK=e=>{let t;if((0,a.isCryptoKey)(e)){if(!e.extractable){throw new TypeError("CryptoKey is not extractable")}t=s.KeyObject.from(e)}else if((0,c.default)(e)){t=e}else if(e instanceof Uint8Array){return{kty:"oct",k:(0,i.encode)(e)}}else{throw new TypeError((0,u.default)(e,...l.types,"Uint8Array"))}if(d.jwkExport){if(t.type!=="secret"&&!["rsa","ec","ed25519","x25519","ed448","x448"].includes(t.asymmetricKeyType)){throw new o.JOSENotSupported("Unsupported key asymmetricKeyType")}return t.export({format:"jwk"})}switch(t.type){case"secret":return{kty:"oct",k:(0,i.encode)(t.export())};case"private":case"public":{switch(t.asymmetricKeyType){case"rsa":{const e=t.export({format:"der",type:"pkcs1"});const n=new r.default(e);if(t.type==="private"){n.unsignedInteger()}const s=(0,i.encode)(n.unsignedInteger());const o=(0,i.encode)(n.unsignedInteger());let A;if(t.type==="private"){A={d:(0,i.encode)(n.unsignedInteger()),p:(0,i.encode)(n.unsignedInteger()),q:(0,i.encode)(n.unsignedInteger()),dp:(0,i.encode)(n.unsignedInteger()),dq:(0,i.encode)(n.unsignedInteger()),qi:(0,i.encode)(n.unsignedInteger())}}n.end();return{kty:"RSA",n:s,e:o,...A}}case"ec":{const e=(0,A.default)(t);let n;let r;let a;switch(e){case"secp256k1":n=64;r=31+2;a=-1;break;case"P-256":n=64;r=34+2;a=-1;break;case"P-384":n=96;r=33+2;a=-3;break;case"P-521":n=132;r=33+2;a=-3;break;default:throw new o.JOSENotSupported("Unsupported curve")}if(t.type==="public"){const s=t.export({type:"spki",format:"der"});return{kty:"EC",crv:e,x:(0,i.encode)(s.subarray(-n,-n/2)),y:(0,i.encode)(s.subarray(-n/2))}}const c=t.export({type:"pkcs8",format:"der"});if(c.length<100){r+=a}return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(c.subarray(r,r+n/2))}}case"ed25519":case"x25519":{const e=(0,A.default)(t);if(t.type==="public"){const n=t.export({type:"spki",format:"der"});return{kty:"OKP",crv:e,x:(0,i.encode)(n.subarray(-32))}}const n=t.export({type:"pkcs8",format:"der"});return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(n.subarray(-32))}}case"ed448":case"x448":{const e=(0,A.default)(t);if(t.type==="public"){const n=t.export({type:"spki",format:"der"});return{kty:"OKP",crv:e,x:(0,i.encode)(n.subarray(e==="Ed448"?-57:-56))}}const n=t.export({type:"pkcs8",format:"der"});return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(n.subarray(e==="Ed448"?-57:-56))}}default:throw new o.JOSENotSupported("Unsupported key asymmetricKeyType")}}default:throw new o.JOSENotSupported("Unsupported key type")}};t["default"]=keyToJWK},2413:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(9302);const r=n(4419);const o=n(122);const A=n(9737);const a={padding:s.constants.RSA_PKCS1_PSS_PADDING,saltLength:s.constants.RSA_PSS_SALTLEN_DIGEST};const c=new Map([["ES256","P-256"],["ES256K","secp256k1"],["ES384","P-384"],["ES512","P-521"]]);function keyForCrypto(e,t){switch(e){case"EdDSA":if(!["ed25519","ed448"].includes(t.asymmetricKeyType)){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448")}return t;case"RS256":case"RS384":case"RS512":if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,o.default)(t,e);return t;case A.rsaPssParams&&"PS256":case A.rsaPssParams&&"PS384":case A.rsaPssParams&&"PS512":if(t.asymmetricKeyType==="rsa-pss"){const{hashAlgorithm:n,mgf1HashAlgorithm:s,saltLength:i}=t.asymmetricKeyDetails;const r=parseInt(e.slice(-3),10);if(n!==undefined&&(n!==`sha${r}`||s!==n)){throw new TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}`)}if(i!==undefined&&i>r>>3){throw new TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}`)}}else if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss")}(0,o.default)(t,e);return{key:t,...a};case!A.rsaPssParams&&"PS256":case!A.rsaPssParams&&"PS384":case!A.rsaPssParams&&"PS512":if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,o.default)(t,e);return{key:t,...a};case"ES256":case"ES256K":case"ES384":case"ES512":{if(t.asymmetricKeyType!=="ec"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be ec")}const n=(0,i.default)(t);const s=c.get(e);if(n!==s){throw new TypeError(`Invalid key curve for the algorithm, its curve must be ${s}, got ${n}`)}return{dsaEncoding:"ieee-p1363",key:t}}default:throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=keyForCrypto},6898:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.encrypt=void 0;const s=n(3837);const i=n(6113);const r=n(5770);const o=n(1691);const A=n(518);const a=n(6083);const c=n(3499);const u=n(6852);const l=n(3386);const d=n(2768);const p=n(1146);const g=n(7947);const h=(0,s.promisify)(i.pbkdf2);function getPassword(e,t){if((0,d.default)(e)){return e.export()}if(e instanceof Uint8Array){return e}if((0,u.isCryptoKey)(e)){(0,l.checkEncCryptoKey)(e,t,"deriveBits","deriveKey");return i.KeyObject.from(e).export()}throw new TypeError((0,p.default)(e,...g.types,"Uint8Array"))}const encrypt=async(e,t,n,s=2048,i=(0,r.default)(new Uint8Array(16)))=>{(0,c.default)(i);const u=(0,o.p2s)(e,i);const l=parseInt(e.slice(13,16),10)>>3;const d=getPassword(t,e);const p=await h(d,u,s,l,`sha${e.slice(8,11)}`);const g=await(0,a.wrap)(e.slice(-6),p,n);return{encryptedKey:g,p2c:s,p2s:(0,A.encode)(i)}};t.encrypt=encrypt;const decrypt=async(e,t,n,s,i)=>{(0,c.default)(i);const r=(0,o.p2s)(e,i);const A=parseInt(e.slice(13,16),10)>>3;const u=getPassword(t,e);const l=await h(u,r,s,A,`sha${e.slice(8,11)}`);return(0,a.unwrap)(e.slice(-6),l,n)};t.decrypt=decrypt},5770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=n(6113);Object.defineProperty(t,"default",{enumerable:true,get:function(){return s.randomFillSync}})},9526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.encrypt=void 0;const s=n(6113);const i=n(122);const r=n(6852);const o=n(3386);const A=n(2768);const a=n(1146);const c=n(7947);const checkKey=(e,t)=>{if(e.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,i.default)(e,t)};const resolvePadding=e=>{switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return s.constants.RSA_PKCS1_OAEP_PADDING;case"RSA1_5":return s.constants.RSA_PKCS1_PADDING;default:return undefined}};const resolveOaepHash=e=>{switch(e){case"RSA-OAEP":return"sha1";case"RSA-OAEP-256":return"sha256";case"RSA-OAEP-384":return"sha384";case"RSA-OAEP-512":return"sha512";default:return undefined}};function ensureKeyObject(e,t,...n){if((0,A.default)(e)){return e}if((0,r.isCryptoKey)(e)){(0,o.checkEncCryptoKey)(e,t,...n);return s.KeyObject.from(e)}throw new TypeError((0,a.default)(e,...c.types))}const encrypt=(e,t,n)=>{const i=resolvePadding(e);const r=resolveOaepHash(e);const o=ensureKeyObject(t,e,"wrapKey","encrypt");checkKey(o,e);return(0,s.publicEncrypt)({key:o,oaepHash:r,padding:i},n)};t.encrypt=encrypt;const decrypt=(e,t,n)=>{const i=resolvePadding(e);const r=resolveOaepHash(e);const o=ensureKeyObject(t,e,"unwrapKey","decrypt");checkKey(o,e);return(0,s.privateDecrypt)({key:o,oaepHash:r,padding:i},n)};t.decrypt=decrypt},1622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]="node:crypto"},9935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);const r=n(4965);const o=n(3811);const A=n(2413);const a=n(3170);let c;if(s.sign.length>3){c=(0,i.promisify)(s.sign)}else{c=s.sign}const sign=async(e,t,n)=>{const i=(0,a.default)(e,t,"sign");if(e.startsWith("HS")){const t=s.createHmac((0,o.default)(e),i);t.update(n);return t.digest()}return c((0,r.default)(e),n,(0,A.default)(e,i))};t["default"]=sign},5390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=s.timingSafeEqual;t["default"]=i},3569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);const r=n(4965);const o=n(2413);const A=n(9935);const a=n(3170);const c=n(9737);let u;if(s.verify.length>4&&c.oneShotCallback){u=(0,i.promisify)(s.verify)}else{u=s.verify}const verify=async(e,t,n,i)=>{const c=(0,a.default)(e,t,"verify");if(e.startsWith("HS")){const t=await(0,A.default)(e,c,i);const r=n;try{return s.timingSafeEqual(r,t)}catch{return false}}const l=(0,r.default)(e);const d=(0,o.default)(e,c);try{return await u(l,i,d,n)}catch{return false}};t["default"]=verify},6852:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isCryptoKey=void 0;const s=n(6113);const i=n(3837);const r=s.webcrypto;t["default"]=r;t.isCryptoKey=i.types.isCryptoKey?e=>i.types.isCryptoKey(e):e=>false},7022:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.deflate=t.inflate=void 0;const s=n(3837);const i=n(9796);const r=(0,s.promisify)(i.inflateRaw);const o=(0,s.promisify)(i.deflateRaw);const inflate=e=>r(e);t.inflate=inflate;const deflate=e=>o(e);t.deflate=deflate},3238:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=void 0;const s=n(518);t.encode=s.encode;t.decode=s.decode},5611:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decodeJwt=void 0;const s=n(3238);const i=n(1691);const r=n(9127);const o=n(4419);function decodeJwt(e){if(typeof e!=="string")throw new o.JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:n}=e.split(".");if(n===5)throw new o.JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");if(n!==3)throw new o.JWTInvalid("Invalid JWT");if(!t)throw new o.JWTInvalid("JWTs must contain a payload");let A;try{A=(0,s.decode)(t)}catch{throw new o.JWTInvalid("Failed to base64url decode the payload")}let a;try{a=JSON.parse(i.decoder.decode(A))}catch{throw new o.JWTInvalid("Failed to parse the decoded payload as JSON")}if(!(0,r.default)(a))throw new o.JWTInvalid("Invalid JWT Claims Set");return a}t.decodeJwt=decodeJwt},3991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decodeProtectedHeader=void 0;const s=n(3238);const i=n(1691);const r=n(9127);function decodeProtectedHeader(e){let t;if(typeof e==="string"){const n=e.split(".");if(n.length===3||n.length===5){[t]=n}}else if(typeof e==="object"&&e){if("protected"in e){t=e.protected}else{throw new TypeError("Token does not contain a Protected Header")}}try{if(typeof t!=="string"||!t){throw new Error}const e=JSON.parse(i.decoder.decode((0,s.decode)(t)));if(!(0,r.default)(e)){throw new Error}return e}catch{throw new TypeError("Invalid Token or Protected Header formatting")}}t.decodeProtectedHeader=decodeProtectedHeader},4419:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JWSSignatureVerificationFailed=t.JWKSTimeout=t.JWKSMultipleMatchingKeys=t.JWKSNoMatchingKey=t.JWKSInvalid=t.JWKInvalid=t.JWTInvalid=t.JWSInvalid=t.JWEInvalid=t.JWEDecryptionFailed=t.JOSENotSupported=t.JOSEAlgNotAllowed=t.JWTExpired=t.JWTClaimValidationFailed=t.JOSEError=void 0;class JOSEError extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e);this.code="ERR_JOSE_GENERIC";this.name=this.constructor.name;(t=Error.captureStackTrace)===null||t===void 0?void 0:t.call(Error,this,this.constructor)}}t.JOSEError=JOSEError;class JWTClaimValidationFailed extends JOSEError{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t="unspecified",n="unspecified"){super(e);this.code="ERR_JWT_CLAIM_VALIDATION_FAILED";this.claim=t;this.reason=n}}t.JWTClaimValidationFailed=JWTClaimValidationFailed;class JWTExpired extends JOSEError{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t="unspecified",n="unspecified"){super(e);this.code="ERR_JWT_EXPIRED";this.claim=t;this.reason=n}}t.JWTExpired=JWTExpired;class JOSEAlgNotAllowed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}t.JOSEAlgNotAllowed=JOSEAlgNotAllowed;class JOSENotSupported extends JOSEError{constructor(){super(...arguments);this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}t.JOSENotSupported=JOSENotSupported;class JWEDecryptionFailed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWE_DECRYPTION_FAILED";this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}t.JWEDecryptionFailed=JWEDecryptionFailed;class JWEInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}t.JWEInvalid=JWEInvalid;class JWSInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}t.JWSInvalid=JWSInvalid;class JWTInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}t.JWTInvalid=JWTInvalid;class JWKInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}t.JWKInvalid=JWKInvalid;class JWKSInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}t.JWKSInvalid=JWKSInvalid;class JWKSNoMatchingKey extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_NO_MATCHING_KEY";this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}t.JWKSNoMatchingKey=JWKSNoMatchingKey;class JWKSMultipleMatchingKeys extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}t.JWKSMultipleMatchingKeys=JWKSMultipleMatchingKeys;Symbol.asyncIterator;class JWKSTimeout extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_TIMEOUT";this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}t.JWKSTimeout=JWKSTimeout;class JWSSignatureVerificationFailed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}t.JWSSignatureVerificationFailed=JWSSignatureVerificationFailed},1173:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(1622);t["default"]=s.default},7426:(e,t,n)=>{ +(()=>{var __webpack_modules__={3658:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});class Action{constructor(e){this.stateStore=e.stateStore;this.logger=e.logger;this.userClient=e.userClient;this.passwordGenerator=e.passwordGenerator;this.roleNameParser=e.roleNameParser}run(e){return n(this,void 0,void 0,(function*(){if(!this.stateStore.isPost){yield this.runMain(e);this.stateStore.isPost=true}}))}runMain(e){return n(this,void 0,void 0,(function*(){if(!e.name||e.name.length==0){throw new Error("No name supplied.")}if(!e.email||e.email.length==0){throw new Error("No e-mail supplied.")}if(!e.roles||e.roles.length==0){throw new Error("No roles supplied.")}const t=this.roleNameParser.parse(e.roles);if(t.length==0){throw new Error("No roles supplied.")}const n=yield this.userClient.getUser({email:e.email});let s=n;if(!n){const t=this.passwordGenerator.generatePassword();const n=yield this.userClient.createUser({name:e.name,email:e.email,password:t});s=n}if(!s){throw new Error("Could not get an existing user or create a new user.")}const i=yield this.userClient.createRoles({roleNames:t});if(i.length==0){throw new Error("Received an empty set of roles.")}const r=i.map((e=>e.id));yield this.userClient.assignRolesToUser({userID:s.id,roleIDs:r});if(!n){yield this.userClient.sendChangePasswordEmail({email:s.email});this.logger.log(`${s.id} (${s.email}) has been invited.`)}else{this.logger.log(`${s.id} (${s.email}) has been updated.`)}}))}}t["default"]=Action},8245:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(n(2186));class Logger{log(e){console.log(e)}error(e){o.setFailed(e)}}t["default"]=Logger},2127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class PasswordGenerator{generatePassword(){let e="";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$";const n=18;for(let s=1;s<=n;s++){const n=Math.floor(Math.random()*t.length+1);e+=t.charAt(n)}return e}}t["default"]=PasswordGenerator},3834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class RoleNameParser{parse(e){return e.split(",").map((e=>e.trim().toLowerCase())).filter((e=>e.length>0))}}t["default"]=RoleNameParser},9531:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n={IS_POST:"isPost"};class KeyValueStateStore{constructor(e){this.writerReader=e;this.isPost=false}get isPost(){return!!this.writerReader.getState(n.IS_POST)}set isPost(e){this.writerReader.saveState(n.IS_POST,e)}}t["default"]=KeyValueStateStore},1485:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=i(n(8757));const o=n(4712);class Auth0UserClient{constructor(e){this.config=e;this.managementClient=new o.ManagementClient({domain:e.domain,clientId:e.clientId,clientSecret:e.clientSecret})}getUser(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.usersByEmail.getByEmail({email:e.email});if(t.data.length==0){return null}const n=t.data[0];return{id:n.user_id,email:n.email}}))}createUser(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.users.create({connection:"Username-Password-Authentication",name:e.name,email:e.email,email_verified:true,password:e.password,app_metadata:{has_pending_invitation:true}});return{id:t.data.user_id,email:t.data.email}}))}createRoles(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.roles.getAll();const n=t.data;const s=n.filter((t=>e.roleNames.includes(t.name))).map((e=>({id:e.id,name:e.name})));const i=e.roleNames.filter((e=>{const t=s.find((t=>t.name==e));return t==null}));const r=yield Promise.all(i.map((e=>this.managementClient.roles.create({name:e}))));const o=r.map((e=>({id:e.data.id,name:e.data.name})));return s.concat(o)}))}assignRolesToUser(e){return s(this,void 0,void 0,(function*(){yield this.managementClient.users.assignRoles({id:e.userID},{roles:e.roleIDs})}))}sendChangePasswordEmail(e){return s(this,void 0,void 0,(function*(){const t=yield this.getToken();yield r.default.post(this.getURL("/dbconnections/change_password"),{email:e.email,connection:"Username-Password-Authentication"},{headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}})}))}getToken(){return s(this,void 0,void 0,(function*(){const e=yield r.default.post(this.getURL("/oauth/token"),{grant_type:"client_credentials",client_id:this.config.clientId,client_secret:this.config.clientSecret,audience:`https://${this.config.domain}/api/v2/`},{headers:{"Content-Type":"application/x-www-form-urlencoded"}});return e.data.access_token}))}getURL(e){return`https://${this.config.domain}${e}`}}t["default"]=Auth0UserClient},8873:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(n(2186));function getOptions(){return{name:o.getInput("name"),email:o.getInput("email"),roles:o.getInput("roles")}}t["default"]=getOptions},4822:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const A=r(n(2186));const a=o(n(3658));const c=o(n(1485));const u=o(n(8873));const l=o(n(8245));const d=o(n(9531));const p=o(n(2127));const g=o(n(3834));const{AUTH0_MANAGEMENT_CLIENT_ID:h,AUTH0_MANAGEMENT_CLIENT_SECRET:f,AUTH0_MANAGEMENT_CLIENT_DOMAIN:E}=process.env;if(!h||h.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}else if(!f||f.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}else if(!E||E.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}const m=new d.default(A);const C=new l.default;const Q=new c.default({clientId:h,clientSecret:f,domain:E});const I=new p.default;const B=new g.default;const y=new a.default({stateStore:m,logger:C,userClient:Q,passwordGenerator:I,roleNameParser:B});y.run((0,u.default)()).catch((e=>{C.error(e.toString())}))},7351:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=r(n(2037));const A=n(5278);function issueCommand(e,t,n){const s=new Command(e,t,n);process.stdout.write(s.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const a="::";class Command{constructor(e,t,n){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=n}toString(){let e=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const s=this.properties[n];if(s){if(t){t=false}else{e+=","}e+=`${n}=${escapeProperty(s)}`}}}}e+=`${a}${escapeData(this.message)}`;return e}}function escapeData(e){return A.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return A.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const A=n(7351);const a=n(717);const c=n(5278);const u=r(n(2037));const l=r(n(1017));const d=n(8041);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const n=c.toCommandValue(t);process.env[e]=n;const s=process.env["GITHUB_ENV"]||"";if(s){return a.issueFileCommand("ENV",a.prepareKeyValueMessage(e,t))}A.issueCommand("set-env",{name:e},n)}t.exportVariable=exportVariable;function setSecret(e){A.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){a.issueFileCommand("PATH",e)}else{A.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${l.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const n=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!n){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return n}return n.trim()}t.getInput=getInput;function getMultilineInput(e,t){const n=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return n}return n.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const n=["true","True","TRUE"];const s=["false","False","FALSE"];const i=getInput(e,t);if(n.includes(i))return true;if(s.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const n=process.env["GITHUB_OUTPUT"]||"";if(n){return a.issueFileCommand("OUTPUT",a.prepareKeyValueMessage(e,t))}process.stdout.write(u.EOL);A.issueCommand("set-output",{name:e},c.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){A.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){A.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){A.issueCommand("error",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){A.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){A.issueCommand("notice",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){A.issue("group",e)}t.startGroup=startGroup;function endGroup(){A.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let n;try{n=yield t()}finally{endGroup()}return n}))}t.group=group;function saveState(e,t){const n=process.env["GITHUB_STATE"]||"";if(n){return a.issueFileCommand("STATE",a.prepareKeyValueMessage(e,t))}A.issueCommand("save-state",{name:e},c.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var g=n(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return g.summary}});var h=n(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return h.markdownSummary}});var f=n(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return f.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return f.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return f.toPlatformPath}})},717:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=r(n(7147));const A=r(n(2037));const a=n(5840);const c=n(5278);function issueFileCommand(e,t){const n=process.env[`GITHUB_${e}`];if(!n){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!o.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}o.appendFileSync(n,`${c.toCommandValue(t)}${A.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const n=`ghadelimiter_${a.v4()}`;const s=c.toCommandValue(t);if(e.includes(n)){throw new Error(`Unexpected input: name should not contain the delimiter "${n}"`)}if(s.includes(n)){throw new Error(`Unexpected input: value should not contain the delimiter "${n}"`)}return`${e}<<${n}${A.EOL}${s}${A.EOL}${n}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const i=n(6255);const r=n(5526);const o=n(2186);class OidcClient{static createHttpClient(e=true,t=10){const n={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new r.BearerCredentialHandler(OidcClient.getRequestToken())],n)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return s(this,void 0,void 0,(function*(){const n=OidcClient.createHttpClient();const s=yield n.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const i=(t=s.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return s(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const n=encodeURIComponent(e);t=`${t}&audience=${n}`}o.debug(`ID token url is ${t}`);const n=yield OidcClient.getCall(t);o.setSecret(n);return n}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=r(n(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,o.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const i=n(2037);const r=n(7147);const{access:o,appendFile:A,writeFile:a}=r.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return s(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield o(e,r.constants.R_OK|r.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,n={}){const s=Object.entries(n).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${s}>`}return`<${e}${s}>${t}`}write(e){return s(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const n=yield this.filePath();const s=t?a:A;yield s(n,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return s(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(i.EOL)}addCodeBlock(e,t){const n=Object.assign({},t&&{lang:t});const s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,t=false){const n=t?"ol":"ul";const s=e.map((e=>this.wrap("li",e))).join("");const i=this.wrap(n,s);return this.addRaw(i).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:n,colspan:s,rowspan:i}=e;const r=t?"th":"td";const o=Object.assign(Object.assign({},s&&{colspan:s}),i&&{rowspan:i});return this.wrap(r,n,o)})).join("");return this.wrap("tr",t)})).join("");const n=this.wrap("table",t);return this.addRaw(n).addEOL()}addDetails(e,t){const n=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(n).addEOL()}addImage(e,t,n){const{width:s,height:i}=n||{};const r=Object.assign(Object.assign({},s&&{width:s}),i&&{height:i});const o=this.wrap("img",null,Object.assign({src:e,alt:t},r));return this.addRaw(o).addEOL()}addHeading(e,t){const n=`h${t}`;const s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1";const i=this.wrap(s,e);return this.addRaw(i).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const n=Object.assign({},t&&{cite:t});const s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,t){const n=this.wrap("a",e,{href:t});return this.addRaw(n).addEOL()}}const c=new Summary;t.markdownSummary=c;t.summary=c},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},5526:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const A=r(n(3685));const a=r(n(5687));const c=r(n(9835));const u=r(n(4294));const l=n(1773);var d;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(d||(t.HttpCodes=d={}));var p;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(p||(t.Headers=p={}));var g;(function(e){e["ApplicationJson"]="application/json"})(g||(t.MediaTypes=g={}));function getProxyUrl(e){const t=c.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const f=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const E=["OPTIONS","GET","DELETE","HEAD"];const m=10;const C=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return o(this,void 0,void 0,(function*(){return new Promise((e=>o(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return o(this,void 0,void 0,(function*(){return new Promise((e=>o(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,n||{})}))}patch(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,n||{})}))}put(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,n||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,n,s){return o(this,void 0,void 0,(function*(){return this.request(e,t,n,s)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[p.Accept]=this._getExistingOrDefaultHeader(t,p.Accept,g.ApplicationJson);const n=yield this.get(e,t);return this._processResponse(n,this.requestOptions)}))}postJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.post(e,s,n);return this._processResponse(i,this.requestOptions)}))}putJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.put(e,s,n);return this._processResponse(i,this.requestOptions)}))}patchJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.patch(e,s,n);return this._processResponse(i,this.requestOptions)}))}request(e,t,n,s){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const i=new URL(t);let r=this._prepareRequest(e,i,s);const o=this._allowRetries&&E.includes(e)?this._maxRetries+1:1;let A=0;let a;do{a=yield this.requestRaw(r,n);if(a&&a.message&&a.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(a)){e=t;break}}if(e){return e.handleAuthentication(this,r,n)}else{return a}}let t=this._maxRedirects;while(a.message.statusCode&&h.includes(a.message.statusCode)&&this._allowRedirects&&t>0){const o=a.message.headers["location"];if(!o){break}const A=new URL(o);if(i.protocol==="https:"&&i.protocol!==A.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield a.readBody();if(A.hostname!==i.hostname){for(const e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}r=this._prepareRequest(e,A,s);a=yield this.requestRaw(r,n);t--}if(!a.message.statusCode||!f.includes(a.message.statusCode)){return a}A+=1;if(A{function callbackForResult(e,t){if(e){s(e)}else if(!t){s(new Error("Unknown error"))}else{n(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,n){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let s=false;function handleResult(e,t){if(!s){s=true;n(e,t)}}const i=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let r;i.on("socket",(e=>{r=e}));i.setTimeout(this._socketTimeout||3*6e4,(()=>{if(r){r.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));i.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){i.end()}));t.pipe(i)}else{i.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const n=c.getProxyUrl(t);const s=n&&n.hostname;if(!s){return}return this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){const s={};s.parsedUrl=t;const i=s.parsedUrl.protocol==="https:";s.httpModule=i?a:A;const r=i?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):r;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(n);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(s.options)}}return s}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,n){let s;if(this.requestOptions&&this.requestOptions.headers){s=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||s||n}_getAgent(e){let t;const n=c.getProxyUrl(e);const s=n&&n.hostname;if(this._keepAlive&&s){t=this._proxyAgent}if(this._keepAlive&&!s){t=this._agent}if(t){return t}const i=e.protocol==="https:";let r=100;if(this.requestOptions){r=this.requestOptions.maxSockets||A.globalAgent.maxSockets}if(n&&n.hostname){const e={maxSockets:r,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})};let s;const o=n.protocol==="https:";if(i){s=o?u.httpsOverHttps:u.httpsOverHttp}else{s=o?u.httpOverHttps:u.httpOverHttp}t=s(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:r};t=i?new a.Agent(e):new A.Agent(e);this._agent=t}if(!t){t=i?a.globalAgent:A.globalAgent}if(i&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let n;if(this._keepAlive){n=this._proxyAgentDispatcher}if(n){return n}const s=e.protocol==="https:";n=new l.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`${t.username}:${t.password}`}));this._proxyAgentDispatcher=n;if(s&&this._ignoreSslError){n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:false})}return n}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(m,e);const t=C*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((n,s)=>o(this,void 0,void 0,(function*(){const i=e.message.statusCode||0;const r={statusCode:i,result:null,headers:{}};if(i===d.NotFound){n(r)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let A;try{A=yield e.readBody();if(A&&A.length>0){if(t&&t.deserializeDates){o=JSON.parse(A,dateTimeDeserializer)}else{o=JSON.parse(A)}r.result=o}r.headers=e.message.headers}catch(e){}if(i>299){let e;if(o&&o.message){e=o.message}else if(A&&A.length>0){e=A}else{e=`Failed request: (${i})`}const t=new HttpClientError(e,i);t.result=r.result;s(t)}else{n(r)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const n=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(n){try{return new URL(n)}catch(e){if(!n.startsWith("http://")&&!n.startsWith("https://"))return new URL(`http://${n}`)}}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const n=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!n){return false}let s;if(e.port){s=Number(e.port)}else if(e.protocol==="http:"){s=80}else if(e.protocol==="https:"){s=443}const i=[e.hostname.toUpperCase()];if(typeof s==="number"){i.push(`${i[0]}:${s}`)}for(const e of n.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||i.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}},2856:(e,t,n)=>{"use strict";const s=n(4492).Writable;const i=n(7261).inherits;const r=n(8534);const o=n(8710);const A=n(333);const a=45;const c=Buffer.from("-");const u=Buffer.from("\r\n");const EMPTY_FN=function(){};function Dicer(e){if(!(this instanceof Dicer)){return new Dicer(e)}s.call(this,e);if(!e||!e.headerFirst&&typeof e.boundary!=="string"){throw new TypeError("Boundary required")}if(typeof e.boundary==="string"){this.setBoundary(e.boundary)}else{this._bparser=undefined}this._headerFirst=e.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:e.partHwm};this._pause=false;const t=this;this._hparser=new A(e);this._hparser.on("header",(function(e){t._inHeader=false;t._part.emit("header",e)}))}i(Dicer,s);Dicer.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){const e=this;process.nextTick((function(){e.emit("error",new Error("Unexpected end of multipart data"));if(e._part&&!e._ignoreData){const t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data"));e._part.push(null);process.nextTick((function(){e._realFinish=true;e.emit("finish");e._realFinish=false}));return}e._realFinish=true;e.emit("finish");e._realFinish=false}))}}else{s.prototype.emit.apply(this,arguments)}};Dicer.prototype._write=function(e,t,n){if(!this._hparser&&!this._bparser){return n()}if(this._headerFirst&&this._isPreamble){if(!this._part){this._part=new o(this._partOpts);if(this._events.preamble){this.emit("preamble",this._part)}else{this._ignore()}}const t=this._hparser.push(e);if(!this._inHeader&&t!==undefined&&t{"use strict";const s=n(5673).EventEmitter;const i=n(7261).inherits;const r=n(9692);const o=n(8534);const A=Buffer.from("\r\n\r\n");const a=/\r\n/g;const c=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function HeaderParser(e){s.call(this);e=e||{};const t=this;this.nread=0;this.maxed=false;this.npairs=0;this.maxHeaderPairs=r(e,"maxHeaderPairs",2e3);this.maxHeaderSize=r(e,"maxHeaderSize",80*1024);this.buffer="";this.header={};this.finished=false;this.ss=new o(A);this.ss.on("info",(function(e,n,s,i){if(n&&!t.maxed){if(t.nread+i-s>=t.maxHeaderSize){i=t.maxHeaderSize-t.nread+s;t.nread=t.maxHeaderSize;t.maxed=true}else{t.nread+=i-s}t.buffer+=n.toString("binary",s,i)}if(e){t._finish()}}))}i(HeaderParser,s);HeaderParser.prototype.push=function(e){const t=this.ss.push(e);if(this.finished){return t}};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 e=this.header;this.header={};this.buffer="";this.finished=true;this.nread=this.npairs=0;this.maxed=false;this.emit("header",e)};HeaderParser.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs){return}const e=this.buffer.split(a);const t=e.length;let n,s;for(var i=0;i{"use strict";const s=n(7261).inherits;const i=n(4492).Readable;function PartStream(e){i.call(this,e)}s(PartStream,i);PartStream.prototype._read=function(e){};e.exports=PartStream},8534:(e,t,n)=>{"use strict";const s=n(5673).EventEmitter;const i=n(7261).inherits;function SBMH(e){if(typeof e==="string"){e=Buffer.from(e)}if(!Buffer.isBuffer(e)){throw new TypeError("The needle has to be a String or a Buffer.")}const t=e.length;if(t===0){throw new Error("The needle cannot be an empty String/Buffer.")}if(t>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(t);this._lookbehind_size=0;this._needle=e;this._bufpos=0;this._lookbehind=Buffer.alloc(t);for(var n=0;n=0){this.emit("info",false,this._lookbehind,0,this._lookbehind_size);this._lookbehind_size=0}else{const n=this._lookbehind_size+r;if(n>0){this.emit("info",false,this._lookbehind,0,n)}this._lookbehind.copy(this._lookbehind,0,n,this._lookbehind_size-n);this._lookbehind_size-=n;e.copy(this._lookbehind,this._lookbehind_size);this._lookbehind_size+=t;this._bufpos=t;return t}}r+=(r>=0)*this._bufpos;if(e.indexOf(n,r)!==-1){r=e.indexOf(n,r);++this.matches;if(r>0){this.emit("info",true,e,this._bufpos,r)}else{this.emit("info",true)}return this._bufpos=r+s}else{r=t-s}while(r0){this.emit("info",false,e,this._bufpos,r{"use strict";const s=n(4492).Writable;const{inherits:i}=n(7261);const r=n(2856);const o=n(415);const A=n(6780);const a=n(4426);function Busboy(e){if(!(this instanceof Busboy)){return new Busboy(e)}if(typeof e!=="object"){throw new TypeError("Busboy expected an options-Object.")}if(typeof e.headers!=="object"){throw new TypeError("Busboy expected an options-Object with headers-attribute.")}if(typeof e.headers["content-type"]!=="string"){throw new TypeError("Missing Content-Type-header.")}const{headers:t,...n}=e;this.opts={autoDestroy:false,...n};s.call(this,this.opts);this._done=false;this._parser=this.getParserByHeaders(t);this._finished=false}i(Busboy,s);Busboy.prototype.emit=function(e){if(e==="finish"){if(!this._done){this._parser?.end();return}else if(this._finished){return}this._finished=true}s.prototype.emit.apply(this,arguments)};Busboy.prototype.getParserByHeaders=function(e){const t=a(e["content-type"]);const n={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:t,preservePath:this.opts.preservePath};if(o.detect.test(t[0])){return new o(this,n)}if(A.detect.test(t[0])){return new A(this,n)}throw new Error("Unsupported Content-Type.")};Busboy.prototype._write=function(e,t,n){this._parser.write(e,n)};e.exports=Busboy;e.exports["default"]=Busboy;e.exports.Busboy=Busboy;e.exports.Dicer=r},415:(e,t,n)=>{"use strict";const{Readable:s}=n(4492);const{inherits:i}=n(7261);const r=n(2856);const o=n(4426);const A=n(9136);const a=n(496);const c=n(9692);const u=/^boundary$/i;const l=/^form-data$/i;const d=/^charset$/i;const p=/^filename$/i;const g=/^name$/i;Multipart.detect=/^multipart\/form-data/i;function Multipart(e,t){let n;let s;const i=this;let h;const f=t.limits;const E=t.isPartAFile||((e,t,n)=>t==="application/octet-stream"||n!==undefined);const m=t.parsedConType||[];const C=t.defCharset||"utf8";const Q=t.preservePath;const I={highWaterMark:t.fileHwm};for(n=0,s=m.length;nR){i.parser.removeListener("part",onPart);i.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(N){const e=N;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(r){let c;let u;let h;let f;let m;let R;let v=0;if(r["content-type"]){h=o(r["content-type"][0]);if(h[0]){c=h[0].toLowerCase();for(n=0,s=h.length;ny){const s=y-v+e.length;if(s>0){n.push(e.slice(0,s))}n.truncated=true;n.bytesRead=y;t.removeAllListeners("data");n.emit("limit");return}else if(!n.push(e)){i._pause=true}n.bytesRead=v};F=function(){_=undefined;n.push(null)}}else{if(x===w){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++x;++D;let n="";let s=false;N=t;k=function(e){if((v+=e.length)>B){const i=B-(v-e.length);n+=e.toString("binary",0,i);s=true;t.removeAllListeners("data")}else{n+=e.toString("binary")}};F=function(){N=undefined;if(n.length){n=A(n,"binary",f)}e.emit("field",u,n,false,s,m,c);--D;checkFinished()}}t._readableState.sync=false;t.on("data",k);t.on("end",F)})).on("error",(function(e){if(_){_.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){F=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const n=this.parser.write(e);if(n&&!this._pause){t()}else{this._needDrain=!n;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){s.call(this,e);this.bytesRead=0;this.truncated=false}i(FileStream,s);FileStream.prototype._read=function(e){};e.exports=Multipart},6780:(e,t,n)=>{"use strict";const s=n(9730);const i=n(9136);const r=n(9692);const o=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const n=t.limits;const i=t.parsedConType;this.boy=e;this.fieldSizeLimit=r(n,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=r(n,"fieldNameSize",100);this.fieldsLimit=r(n,"fields",Infinity);let A;for(var a=0,c=i.length;ao){this._key+=this.decoder.write(e.toString("binary",o,n))}this._state="val";this._hitLimit=false;this._checkingBytes=true;this._val="";this._bytesVal=0;this._valTrunc=false;this.decoder.reset();o=n+1}else if(s!==undefined){++this._fields;let n;const r=this._keyTrunc;if(s>o){n=this._key+=this.decoder.write(e.toString("binary",o,s))}else{n=this._key}this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();if(n.length){this.boy.emit("field",i(n,"binary",this.charset),"",r,false)}o=s+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(r>o){this._key+=this.decoder.write(e.toString("binary",o,r))}o=r;if((this._bytesKey=this._key.length)===this.fieldNameSizeLimit){this._checkingBytes=false;this._keyTrunc=true}}else{if(oo){this._val+=this.decoder.write(e.toString("binary",o,s))}this.boy.emit("field",i(this._key,"binary",this.charset),i(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();o=s+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(r>o){this._val+=this.decoder.write(e.toString("binary",o,r))}o=r;if(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit){this._checkingBytes=false;this._valTrunc=true}}else{if(o0){this.boy.emit("field",i(this._key,"binary",this.charset),"",this._keyTrunc,false)}else if(this._state==="val"){this.boy.emit("field",i(this._key,"binary",this.charset),i(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc)}this.boy._done=true;this.boy.emit("finish")};e.exports=UrlEncoded},9730:e=>{"use strict";const t=/\+/g;const n=[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(e){e=e.replace(t," ");let s="";let i=0;let r=0;const o=e.length;for(;ir){s+=e.substring(r,i);r=i}this.buffer="";++r}}if(r{"use strict";e.exports=function basename(e){if(typeof e!=="string"){return""}for(var t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===".."||e==="."?"":e}}return e===".."||e==="."?"":e}},9136:e=>{"use strict";const t=new TextDecoder("utf-8");const n=new Map([["utf-8",t],["utf8",t]]);function decodeText(e,t,s){if(e){if(n.has(s)){try{return n.get(s).decode(Buffer.from(e,t))}catch(e){}}else{try{n.set(s,new TextDecoder(s));return n.get(s).decode(Buffer.from(e,t))}catch(e){}}}return e}e.exports=decodeText},9692:e=>{"use strict";e.exports=function getLimit(e,t,n){if(!e||e[t]===undefined||e[t]===null){return n}if(typeof e[t]!=="number"||isNaN(e[t])){throw new TypeError("Limit "+t+" is not a valid number")}return e[t]}},4426:(e,t,n)=>{"use strict";const s=n(9136);const i=/%([a-fA-F0-9]{2})/g;function encodedReplacer(e,t){return String.fromCharCode(parseInt(t,16))}function parseParams(e){const t=[];let n="key";let r="";let o=false;let A=false;let a=0;let c="";for(var u=0,l=e.length;u{e.exports={parallel:n(8210),serial:n(445),serialOrdered:n(3578)}},1700:e=>{e.exports=abort;function abort(e){Object.keys(e.jobs).forEach(clean.bind(e));e.jobs={}}function clean(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}},2794:(e,t,n)=>{var s=n(5295);e.exports=async;function async(e){var t=false;s((function(){t=true}));return function async_callback(n,i){if(t){e(n,i)}else{s((function nextTick_callback(){e(n,i)}))}}}},5295:e=>{e.exports=defer;function defer(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}},9023:(e,t,n)=>{var s=n(2794),i=n(1700);e.exports=iterate;function iterate(e,t,n,s){var r=n["keyedList"]?n["keyedList"][n.index]:n.index;n.jobs[r]=runJob(t,r,e[r],(function(e,t){if(!(r in n.jobs)){return}delete n.jobs[r];if(e){i(n)}else{n.results[r]=t}s(e,n.results)}))}function runJob(e,t,n,i){var r;if(e.length==2){r=e(n,s(i))}else{r=e(n,t,s(i))}return r}},2474:e=>{e.exports=state;function state(e,t){var n=!Array.isArray(e),s={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};if(t){s.keyedList.sort(n?t:function(n,s){return t(e[n],e[s])})}return s}},7942:(e,t,n)=>{var s=n(1700),i=n(2794);e.exports=terminator;function terminator(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;s(this);i(e)(null,this.results)}},8210:(e,t,n)=>{var s=n(9023),i=n(2474),r=n(7942);e.exports=parallel;function parallel(e,t,n){var o=i(e);while(o.index<(o["keyedList"]||e).length){s(e,t,o,(function(e,t){if(e){n(e,t);return}if(Object.keys(o.jobs).length===0){n(null,o.results);return}}));o.index++}return r.bind(o,n)}},445:(e,t,n)=>{var s=n(3578);e.exports=serial;function serial(e,t,n){return s(e,t,null,n)}},3578:(e,t,n)=>{var s=n(9023),i=n(2474),r=n(7942);e.exports=serialOrdered;e.exports.ascending=ascending;e.exports.descending=descending;function serialOrdered(e,t,n,o){var A=i(e,n);s(e,t,A,(function iteratorHandler(n,i){if(n){o(n,i);return}A.index++;if(A.index<(A["keyedList"]||e).length){s(e,t,A,iteratorHandler);return}o(null,A.results)}));return r.bind(A,o)}function ascending(e,t){return et?1:0}function descending(e,t){return-1*ascending(e,t)}},6008:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return A.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return r.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return a.default}});var s=_interopRequireDefault(n(272));var i=_interopRequireDefault(n(4867));var r=_interopRequireDefault(n(1537));var o=_interopRequireDefault(n(1453));var A=_interopRequireDefault(n(588));var a=_interopRequireDefault(n(5440));var c=_interopRequireDefault(n(2092));var u=_interopRequireDefault(n(61));var l=_interopRequireDefault(n(1855));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},1774:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("md5").update(e).digest()}var i=md5;t["default"]=i},5056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i={randomUUID:s.default.randomUUID};t["default"]=i},588:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n="00000000-0000-0000-0000-000000000000";t["default"]=n},1855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}let t;const n=new Uint8Array(16);n[0]=(t=parseInt(e.slice(0,8),16))>>>24;n[1]=t>>>16&255;n[2]=t>>>8&255;n[3]=t&255;n[4]=(t=parseInt(e.slice(9,13),16))>>>8;n[5]=t&255;n[6]=(t=parseInt(e.slice(14,18),16))>>>8;n[7]=t&255;n[8]=(t=parseInt(e.slice(19,23),16))>>>8;n[9]=t&255;n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;n[11]=t/4294967296&255;n[12]=t>>>24&255;n[13]=t>>>16&255;n[14]=t>>>8&255;n[15]=t&255;return n}var i=parse;t["default"]=i},2822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=/^(?:[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;t["default"]=n},2378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=new Uint8Array(256);let r=i.length;function rng(){if(r>i.length-16){s.default.randomFillSync(i);r=0}return i.slice(r,r+=16)}},2732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("sha1").update(e).digest()}var i=sha1;t["default"]=i},61:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;t.unsafeStringify=unsafeStringify;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=[];for(let e=0;e<256;++e){i.push((e+256).toString(16).slice(1))}function unsafeStringify(e,t=0){return i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]}function stringify(e,t=0){const n=unsafeStringify(e,t);if(!(0,s.default)(n)){throw TypeError("Stringified UUID is invalid")}return n}var r=stringify;t["default"]=r},272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2378));var i=n(61);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let r;let o;let A=0;let a=0;function v1(e,t,n){let c=t&&n||0;const u=t||new Array(16);e=e||{};let l=e.node||r;let d=e.clockseq!==undefined?e.clockseq:o;if(l==null||d==null){const t=e.random||(e.rng||s.default)();if(l==null){l=r=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=o=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let g=e.nsecs!==undefined?e.nsecs:a+1;const h=p-A+(g-a)/1e4;if(h<0&&e.clockseq===undefined){d=d+1&16383}if((h<0||p>A)&&e.nsecs===undefined){g=0}if(g>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}A=p;a=g;o=d;p+=122192928e5;const f=((p&268435455)*1e4+g)%4294967296;u[c++]=f>>>24&255;u[c++]=f>>>16&255;u[c++]=f>>>8&255;u[c++]=f&255;const E=p/4294967296*1e4&268435455;u[c++]=E>>>8&255;u[c++]=E&255;u[c++]=E>>>24&15|16;u[c++]=E>>>16&255;u[c++]=d>>>8|128;u[c++]=d&255;for(let e=0;e<6;++e){u[c+e]=l[e]}return t||(0,i.unsafeStringify)(u)}var c=v1;t["default"]=c},4867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6222));var i=_interopRequireDefault(n(1774));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v3",48,i.default);var o=r;t["default"]=o},6222:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.URL=t.DNS=void 0;t["default"]=v35;var s=n(61);var i=_interopRequireDefault(n(1855));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(5056));var i=_interopRequireDefault(n(2378));var r=n(61);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,n){if(s.default.randomUUID&&!t&&!e){return s.default.randomUUID()}e=e||{};const o=e.random||(e.rng||i.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){n=n||0;for(let e=0;e<16;++e){t[n+e]=o[e]}return t}return(0,r.unsafeStringify)(o)}var o=v4;t["default"]=o},1453:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6222));var i=_interopRequireDefault(n(2732));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v5",80,i.default);var o=r;t["default"]=o},2092:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2822));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&s.default.test(e)}var i=validate;t["default"]=i},5440:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.slice(14,15),16)}var i=version;t["default"]=i},5443:(e,t,n)=>{var s=n(3837);var i=n(2781).Stream;var r=n(8611);e.exports=CombinedStream;function CombinedStream(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}s.inherits(CombinedStream,i);CombinedStream.create=function(e){var t=new this;e=e||{};for(var n in e){t[n]=e[n]}return t};CombinedStream.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};CombinedStream.prototype.append=function(e){var t=CombinedStream.isStreamLike(e);if(t){if(!(e instanceof r)){var n=r.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=n}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};CombinedStream.prototype.pipe=function(e,t){i.prototype.pipe.call(this,e,t);this.resume();return e};CombinedStream.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};CombinedStream.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(e){var t=CombinedStream.isStreamLike(e);if(t){e.on("data",this._checkDataSize.bind(this));this._handleErrors(e)}this._pipeNext(e)}.bind(this))};CombinedStream.prototype._pipeNext=function(e){this._currentStream=e;var t=CombinedStream.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var n=e;this.write(n);this._getNext()};CombinedStream.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))};CombinedStream.prototype.write=function(e){this.emit("data",e)};CombinedStream.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};CombinedStream.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}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")};CombinedStream.prototype.destroy=function(){this._reset();this.emit("close")};CombinedStream.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};CombinedStream.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};CombinedStream.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize}));if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};CombinedStream.prototype._emitError=function(e){this._reset();this.emit("error",e)}},8611:(e,t,n)=>{var s=n(2781).Stream;var i=n(3837);e.exports=DelayedStream;function DelayedStream(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}i.inherits(DelayedStream,s);DelayedStream.create=function(e,t){var n=new this;t=t||{};for(var s in t){n[s]=t[s]}n.source=e;var i=e.emit;e.emit=function(){n._handleEmit(arguments);return i.apply(e,arguments)};e.on("error",(function(){}));if(n.pauseStream){e.pause()}return n};Object.defineProperty(DelayedStream.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});DelayedStream.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};DelayedStream.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};DelayedStream.prototype.pause=function(){this.source.pause()};DelayedStream.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};DelayedStream.prototype.pipe=function(){var e=s.prototype.pipe.apply(this,arguments);this.resume();return e};DelayedStream.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};DelayedStream.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},1133:(e,t,n)=>{var s;e.exports=function(){if(!s){try{s=n(6167)("follow-redirects")}catch(e){}if(typeof s!=="function"){s=function(){}}}s.apply(null,arguments)}},7707:(e,t,n)=>{var s=n(7310);var i=s.URL;var r=n(3685);var o=n(5687);var A=n(2781).Writable;var a=n(9491);var c=n(1133);var u=["abort","aborted","connect","error","socket","timeout"];var l=Object.create(null);u.forEach((function(e){l[e]=function(t,n,s){this._redirectable.emit(e,t,n,s)}}));var d=createErrorType("ERR_INVALID_URL","Invalid URL",TypeError);var p=createErrorType("ERR_FR_REDIRECTION_FAILURE","Redirected request failed");var g=createErrorType("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded");var h=createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit");var f=createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");var E=A.prototype.destroy||noop;function RedirectableRequest(e,t){A.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var n=this;this._onNativeResponse=function(e){n._processResponse(e)};this._performRequest()}RedirectableRequest.prototype=Object.create(A.prototype);RedirectableRequest.prototype.abort=function(){destroyRequest(this._currentRequest);this._currentRequest.abort();this.emit("abort")};RedirectableRequest.prototype.destroy=function(e){destroyRequest(this._currentRequest,e);E.call(this,e);return this};RedirectableRequest.prototype.write=function(e,t,n){if(this._ending){throw new f}if(!isString(e)&&!isBuffer(e)){throw new TypeError("data should be a string, Buffer or Uint8Array")}if(isFunction(t)){n=t;t=null}if(e.length===0){if(n){n()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,n)}else{this.emit("error",new h);this.abort()}};RedirectableRequest.prototype.end=function(e,t,n){if(isFunction(e)){n=e;e=t=null}else if(isFunction(t)){n=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,n)}else{var s=this;var i=this._currentRequest;this.write(e,t,(function(){s._ended=true;i.end(null,null,n)}));this._ending=true}};RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};RedirectableRequest.prototype.setTimeout=function(e,t){var n=this;function destroyOnTimeout(t){t.setTimeout(e);t.removeListener("timeout",t.destroy);t.addListener("timeout",t.destroy)}function startTimer(t){if(n._timeout){clearTimeout(n._timeout)}n._timeout=setTimeout((function(){n.emit("timeout");clearTimer()}),e);destroyOnTimeout(t)}function clearTimer(){if(n._timeout){clearTimeout(n._timeout);n._timeout=null}n.removeListener("abort",clearTimer);n.removeListener("error",clearTimer);n.removeListener("response",clearTimer);n.removeListener("close",clearTimer);if(t){n.removeListener("timeout",t)}if(!n.socket){n._currentRequest.removeListener("socket",startTimer)}}if(t){this.on("timeout",t)}if(this.socket){startTimer(this.socket)}else{this._currentRequest.once("socket",startTimer)}this.on("socket",destroyOnTimeout);this.on("abort",clearTimer);this.on("error",clearTimer);this.on("response",clearTimer);this.on("close",clearTimer);return this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){RedirectableRequest.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}}));["aborted","connection","socket"].forEach((function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})}));RedirectableRequest.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){this.emit("error",new TypeError("Unsupported protocol "+e));return}if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var r of u){i.on(r,l[r])}this._currentUrl=/^\//.test(this._options.path)?s.format(this._options):this._options.path;if(this._isRedirect){var o=0;var A=this;var a=this._requestBodyBuffers;(function writeNext(e){if(i===A._currentRequest){if(e){A.emit("error",e)}else if(o=400){e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[];return}destroyRequest(this._currentRequest);e.destroy();if(++this._redirectCount>this._options.maxRedirects){this.emit("error",new g);return}var i;var r=this._options.beforeRedirect;if(r){i=Object.assign({Host:e.req.getHeader("host")},this._options.headers)}var o=this._options.method;if((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method)){this._options.method="GET";this._requestBodyBuffers=[];removeMatchingHeaders(/^content-/i,this._options.headers)}var A=removeMatchingHeaders(/^host$/i,this._options.headers);var a=s.parse(this._currentUrl);var u=A||a.host;var l=/^\w+:/.test(n)?this._currentUrl:s.format(Object.assign(a,{host:u}));var d;try{d=s.resolve(l,n)}catch(e){this.emit("error",new p({cause:e}));return}c("redirecting to",d);this._isRedirect=true;var h=s.parse(d);Object.assign(this._options,h);if(h.protocol!==a.protocol&&h.protocol!=="https:"||h.host!==u&&!isSubdomain(h.host,u)){removeMatchingHeaders(/^(?:authorization|cookie)$/i,this._options.headers)}if(isFunction(r)){var f={headers:e.headers,statusCode:t};var E={url:l,method:o,headers:i};try{r(this._options,f,E)}catch(e){this.emit("error",e);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new p({cause:e}))}};function wrap(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var n={};Object.keys(e).forEach((function(r){var o=r+":";var A=n[o]=e[r];var u=t[r]=Object.create(A);function request(e,r,A){if(isString(e)){var u;try{u=urlToOptions(new i(e))}catch(t){u=s.parse(e)}if(!isString(u.protocol)){throw new d({input:e})}e=u}else if(i&&e instanceof i){e=urlToOptions(e)}else{A=r;r=e;e={protocol:o}}if(isFunction(r)){A=r;r=null}r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r);r.nativeProtocols=n;if(!isString(r.host)&&!isString(r.hostname)){r.hostname="::1"}a.equal(r.protocol,o,"protocol mismatch");c("options",r);return new RedirectableRequest(r,A)}function get(e,t,n){var s=u.request(e,t,n);s.end();return s}Object.defineProperties(u,{request:{value:request,configurable:true,enumerable:true,writable:true},get:{value:get,configurable:true,enumerable:true,writable:true}})}));return t}function noop(){}function urlToOptions(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};if(e.port!==""){t.port=Number(e.port)}return t}function removeMatchingHeaders(e,t){var n;for(var s in t){if(e.test(s)){n=t[s];delete t[s]}}return n===null||typeof n==="undefined"?undefined:String(n).trim()}function createErrorType(e,t,n){function CustomError(n){Error.captureStackTrace(this,this.constructor);Object.assign(this,n||{});this.code=e;this.message=this.cause?t+": "+this.cause.message:t}CustomError.prototype=new(n||Error);CustomError.prototype.constructor=CustomError;CustomError.prototype.name="Error ["+e+"]";return CustomError}function destroyRequest(e,t){for(var n of u){e.removeListener(n,l[n])}e.on("error",noop);e.destroy(t)}function isSubdomain(e,t){a(isString(e)&&isString(t));var n=e.length-t.length-1;return n>0&&e[n]==="."&&e.endsWith(t)}function isString(e){return typeof e==="string"||e instanceof String}function isFunction(e){return typeof e==="function"}function isBuffer(e){return typeof e==="object"&&"length"in e}e.exports=wrap({http:r,https:o});e.exports.wrap=wrap},4334:(e,t,n)=>{var s=n(5443);var i=n(3837);var r=n(1017);var o=n(3685);var A=n(5687);var a=n(7310).parse;var c=n(7147);var u=n(2781).Stream;var l=n(3583);var d=n(4812);var p=n(7142);e.exports=FormData;i.inherits(FormData,s);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];s.call(this);e=e||{};for(var t in e){this[t]=e[t]}}FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,n){n=n||{};if(typeof n=="string"){n={filename:n}}var r=s.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(i.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,n);var A=this._multiPartFooter();r(o);r(t);r(A);this._trackLength(o,t,n)};FormData.prototype._trackLength=function(e,t,n){var s=0;if(n.knownLength!=null){s+=+n.knownLength}else if(Buffer.isBuffer(t)){s=t.length}else if(typeof t==="string"){s=Buffer.byteLength(t)}this._valueLength+=s;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof u)){return}if(!n.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{c.stat(e.path,(function(n,s){var i;if(n){t(n);return}i=s.size-(e.start?e.start:0);t(null,i)}))}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",(function(n){e.pause();t(null,+n.headers["content-length"])}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,n){if(typeof n.header=="string"){return n.header}var s=this._getContentDisposition(t,n);var i=this._getContentType(t,n);var r="";var o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(s||[]),"Content-Type":[].concat(i||[])};if(typeof n.header=="object"){p(o,n.header)}var A;for(var a in o){if(!o.hasOwnProperty(a))continue;A=o[a];if(A==null){continue}if(!Array.isArray(A)){A=[A]}if(A.length){r+=a+": "+A.join("; ")+FormData.LINE_BREAK}}return"--"+this.getBoundary()+FormData.LINE_BREAK+r+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var n,s;if(typeof t.filepath==="string"){n=r.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){n=r.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){n=r.basename(e.client._httpMessage.path||"")}if(n){s='filename="'+n+'"'}return s};FormData.prototype._getContentType=function(e,t){var n=t.contentType;if(!n&&e.name){n=l.lookup(e.name)}if(!n&&e.path){n=l.lookup(e.path)}if(!n&&e.readable&&e.hasOwnProperty("httpVersion")){n=e.headers["content-type"]}if(!n&&(t.filepath||t.filename)){n=l.lookup(t.filepath||t.filename)}if(!n&&typeof e=="object"){n=FormData.DEFAULT_CONTENT_TYPE}return n};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var n=this._streams.length===0;if(n){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){n[t.toLowerCase()]=e[t]}}return n};FormData.prototype.setBoundary=function(e){this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var n=0,s=this._streams.length;n{e.exports=function(e,t){Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]}));return e}},4061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.cryptoRuntime=t.base64url=t.generateSecret=t.generateKeyPair=t.errors=t.decodeJwt=t.decodeProtectedHeader=t.importJWK=t.importX509=t.importPKCS8=t.importSPKI=t.exportJWK=t.exportSPKI=t.exportPKCS8=t.UnsecuredJWT=t.createRemoteJWKSet=t.createLocalJWKSet=t.EmbeddedJWK=t.calculateJwkThumbprintUri=t.calculateJwkThumbprint=t.EncryptJWT=t.SignJWT=t.GeneralSign=t.FlattenedSign=t.CompactSign=t.FlattenedEncrypt=t.CompactEncrypt=t.jwtDecrypt=t.jwtVerify=t.generalVerify=t.flattenedVerify=t.compactVerify=t.GeneralEncrypt=t.generalDecrypt=t.flattenedDecrypt=t.compactDecrypt=void 0;var s=n(7651);Object.defineProperty(t,"compactDecrypt",{enumerable:true,get:function(){return s.compactDecrypt}});var i=n(7566);Object.defineProperty(t,"flattenedDecrypt",{enumerable:true,get:function(){return i.flattenedDecrypt}});var r=n(5684);Object.defineProperty(t,"generalDecrypt",{enumerable:true,get:function(){return r.generalDecrypt}});var o=n(3992);Object.defineProperty(t,"GeneralEncrypt",{enumerable:true,get:function(){return o.GeneralEncrypt}});var A=n(5212);Object.defineProperty(t,"compactVerify",{enumerable:true,get:function(){return A.compactVerify}});var a=n(2095);Object.defineProperty(t,"flattenedVerify",{enumerable:true,get:function(){return a.flattenedVerify}});var c=n(4975);Object.defineProperty(t,"generalVerify",{enumerable:true,get:function(){return c.generalVerify}});var u=n(9887);Object.defineProperty(t,"jwtVerify",{enumerable:true,get:function(){return u.jwtVerify}});var l=n(3378);Object.defineProperty(t,"jwtDecrypt",{enumerable:true,get:function(){return l.jwtDecrypt}});var d=n(6203);Object.defineProperty(t,"CompactEncrypt",{enumerable:true,get:function(){return d.CompactEncrypt}});var p=n(1555);Object.defineProperty(t,"FlattenedEncrypt",{enumerable:true,get:function(){return p.FlattenedEncrypt}});var g=n(8257);Object.defineProperty(t,"CompactSign",{enumerable:true,get:function(){return g.CompactSign}});var h=n(4825);Object.defineProperty(t,"FlattenedSign",{enumerable:true,get:function(){return h.FlattenedSign}});var f=n(4268);Object.defineProperty(t,"GeneralSign",{enumerable:true,get:function(){return f.GeneralSign}});var E=n(8882);Object.defineProperty(t,"SignJWT",{enumerable:true,get:function(){return E.SignJWT}});var m=n(960);Object.defineProperty(t,"EncryptJWT",{enumerable:true,get:function(){return m.EncryptJWT}});var C=n(3494);Object.defineProperty(t,"calculateJwkThumbprint",{enumerable:true,get:function(){return C.calculateJwkThumbprint}});Object.defineProperty(t,"calculateJwkThumbprintUri",{enumerable:true,get:function(){return C.calculateJwkThumbprintUri}});var Q=n(1751);Object.defineProperty(t,"EmbeddedJWK",{enumerable:true,get:function(){return Q.EmbeddedJWK}});var I=n(9970);Object.defineProperty(t,"createLocalJWKSet",{enumerable:true,get:function(){return I.createLocalJWKSet}});var B=n(9035);Object.defineProperty(t,"createRemoteJWKSet",{enumerable:true,get:function(){return B.createRemoteJWKSet}});var y=n(8568);Object.defineProperty(t,"UnsecuredJWT",{enumerable:true,get:function(){return y.UnsecuredJWT}});var b=n(465);Object.defineProperty(t,"exportPKCS8",{enumerable:true,get:function(){return b.exportPKCS8}});Object.defineProperty(t,"exportSPKI",{enumerable:true,get:function(){return b.exportSPKI}});Object.defineProperty(t,"exportJWK",{enumerable:true,get:function(){return b.exportJWK}});var w=n(4230);Object.defineProperty(t,"importSPKI",{enumerable:true,get:function(){return w.importSPKI}});Object.defineProperty(t,"importPKCS8",{enumerable:true,get:function(){return w.importPKCS8}});Object.defineProperty(t,"importX509",{enumerable:true,get:function(){return w.importX509}});Object.defineProperty(t,"importJWK",{enumerable:true,get:function(){return w.importJWK}});var R=n(3991);Object.defineProperty(t,"decodeProtectedHeader",{enumerable:true,get:function(){return R.decodeProtectedHeader}});var v=n(5611);Object.defineProperty(t,"decodeJwt",{enumerable:true,get:function(){return v.decodeJwt}});t.errors=n(4419);var k=n(1036);Object.defineProperty(t,"generateKeyPair",{enumerable:true,get:function(){return k.generateKeyPair}});var S=n(6617);Object.defineProperty(t,"generateSecret",{enumerable:true,get:function(){return S.generateSecret}});t.base64url=n(3238);var x=n(1173);Object.defineProperty(t,"cryptoRuntime",{enumerable:true,get:function(){return x.default}})},7651:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.compactDecrypt=void 0;const s=n(7566);const i=n(4419);const r=n(1691);async function compactDecrypt(e,t,n){if(e instanceof Uint8Array){e=r.decoder.decode(e)}if(typeof e!=="string"){throw new i.JWEInvalid("Compact JWE must be a string or Uint8Array")}const{0:o,1:A,2:a,3:c,4:u,length:l}=e.split(".");if(l!==5){throw new i.JWEInvalid("Invalid Compact JWE")}const d=await(0,s.flattenedDecrypt)({ciphertext:c,iv:a||undefined,protected:o||undefined,tag:u||undefined,encrypted_key:A||undefined},t,n);const p={plaintext:d.plaintext,protectedHeader:d.protectedHeader};if(typeof t==="function"){return{...p,key:d.key}}return p}t.compactDecrypt=compactDecrypt},6203:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CompactEncrypt=void 0;const s=n(1555);class CompactEncrypt{constructor(e){this._flattened=new s.FlattenedEncrypt(e)}setContentEncryptionKey(e){this._flattened.setContentEncryptionKey(e);return this}setInitializationVector(e){this._flattened.setInitializationVector(e);return this}setProtectedHeader(e){this._flattened.setProtectedHeader(e);return this}setKeyManagementParameters(e){this._flattened.setKeyManagementParameters(e);return this}async encrypt(e,t){const n=await this._flattened.encrypt(e,t);return[n.protected,n.encrypted_key,n.iv,n.ciphertext,n.tag].join(".")}}t.CompactEncrypt=CompactEncrypt},7566:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.flattenedDecrypt=void 0;const s=n(518);const i=n(6137);const r=n(7022);const o=n(4419);const A=n(6063);const a=n(9127);const c=n(6127);const u=n(1691);const l=n(3987);const d=n(863);const p=n(5148);async function flattenedDecrypt(e,t,n){var g;if(!(0,a.default)(e)){throw new o.JWEInvalid("Flattened JWE must be an object")}if(e.protected===undefined&&e.header===undefined&&e.unprotected===undefined){throw new o.JWEInvalid("JOSE Header missing")}if(typeof e.iv!=="string"){throw new o.JWEInvalid("JWE Initialization Vector missing or incorrect type")}if(typeof e.ciphertext!=="string"){throw new o.JWEInvalid("JWE Ciphertext missing or incorrect type")}if(typeof e.tag!=="string"){throw new o.JWEInvalid("JWE Authentication Tag missing or incorrect type")}if(e.protected!==undefined&&typeof e.protected!=="string"){throw new o.JWEInvalid("JWE Protected Header incorrect type")}if(e.encrypted_key!==undefined&&typeof e.encrypted_key!=="string"){throw new o.JWEInvalid("JWE Encrypted Key incorrect type")}if(e.aad!==undefined&&typeof e.aad!=="string"){throw new o.JWEInvalid("JWE AAD incorrect type")}if(e.header!==undefined&&!(0,a.default)(e.header)){throw new o.JWEInvalid("JWE Shared Unprotected Header incorrect type")}if(e.unprotected!==undefined&&!(0,a.default)(e.unprotected)){throw new o.JWEInvalid("JWE Per-Recipient Unprotected Header incorrect type")}let h;if(e.protected){try{const t=(0,s.decode)(e.protected);h=JSON.parse(u.decoder.decode(t))}catch{throw new o.JWEInvalid("JWE Protected Header is invalid")}}if(!(0,A.default)(h,e.header,e.unprotected)){throw new o.JWEInvalid("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint")}const f={...h,...e.header,...e.unprotected};(0,d.default)(o.JWEInvalid,new Map,n===null||n===void 0?void 0:n.crit,h,f);if(f.zip!==undefined){if(!h||!h.zip){throw new o.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}if(f.zip!=="DEF"){throw new o.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}}const{alg:E,enc:m}=f;if(typeof E!=="string"||!E){throw new o.JWEInvalid("missing JWE Algorithm (alg) in JWE Header")}if(typeof m!=="string"||!m){throw new o.JWEInvalid("missing JWE Encryption Algorithm (enc) in JWE Header")}const C=n&&(0,p.default)("keyManagementAlgorithms",n.keyManagementAlgorithms);const Q=n&&(0,p.default)("contentEncryptionAlgorithms",n.contentEncryptionAlgorithms);if(C&&!C.has(E)){throw new o.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed')}if(Q&&!Q.has(m)){throw new o.JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter not allowed')}let I;if(e.encrypted_key!==undefined){try{I=(0,s.decode)(e.encrypted_key)}catch{throw new o.JWEInvalid("Failed to base64url decode the encrypted_key")}}let B=false;if(typeof t==="function"){t=await t(h,e);B=true}let y;try{y=await(0,c.default)(E,t,I,f,n)}catch(e){if(e instanceof TypeError||e instanceof o.JWEInvalid||e instanceof o.JOSENotSupported){throw e}y=(0,l.default)(m)}let b;let w;try{b=(0,s.decode)(e.iv)}catch{throw new o.JWEInvalid("Failed to base64url decode the iv")}try{w=(0,s.decode)(e.tag)}catch{throw new o.JWEInvalid("Failed to base64url decode the tag")}const R=u.encoder.encode((g=e.protected)!==null&&g!==void 0?g:"");let v;if(e.aad!==undefined){v=(0,u.concat)(R,u.encoder.encode("."),u.encoder.encode(e.aad))}else{v=R}let k;try{k=(0,s.decode)(e.ciphertext)}catch{throw new o.JWEInvalid("Failed to base64url decode the ciphertext")}let S=await(0,i.default)(m,y,k,b,w,v);if(f.zip==="DEF"){S=await((n===null||n===void 0?void 0:n.inflateRaw)||r.inflate)(S)}const x={plaintext:S};if(e.protected!==undefined){x.protectedHeader=h}if(e.aad!==undefined){try{x.additionalAuthenticatedData=(0,s.decode)(e.aad)}catch{throw new o.JWEInvalid("Failed to base64url decode the aad")}}if(e.unprotected!==undefined){x.sharedUnprotectedHeader=e.unprotected}if(e.header!==undefined){x.unprotectedHeader=e.header}if(B){return{...x,key:t}}return x}t.flattenedDecrypt=flattenedDecrypt},1555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FlattenedEncrypt=t.unprotected=void 0;const s=n(518);const i=n(6476);const r=n(7022);const o=n(4630);const A=n(3286);const a=n(4419);const c=n(6063);const u=n(1691);const l=n(863);t.unprotected=Symbol();class FlattenedEncrypt{constructor(e){if(!(e instanceof Uint8Array)){throw new TypeError("plaintext must be an instance of Uint8Array")}this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters){throw new TypeError("setKeyManagementParameters can only be called once")}this._keyManagementParameters=e;return this}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader){throw new TypeError("setSharedUnprotectedHeader can only be called once")}this._sharedUnprotectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}setContentEncryptionKey(e){if(this._cek){throw new TypeError("setContentEncryptionKey can only be called once")}this._cek=e;return this}setInitializationVector(e){if(this._iv){throw new TypeError("setInitializationVector can only be called once")}this._iv=e;return this}async encrypt(e,n){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader){throw new a.JWEInvalid("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()")}if(!(0,c.default)(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader)){throw new a.JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint")}const d={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};(0,l.default)(a.JWEInvalid,new Map,n===null||n===void 0?void 0:n.crit,this._protectedHeader,d);if(d.zip!==undefined){if(!this._protectedHeader||!this._protectedHeader.zip){throw new a.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}if(d.zip!=="DEF"){throw new a.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}}const{alg:p,enc:g}=d;if(typeof p!=="string"||!p){throw new a.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid')}if(typeof g!=="string"||!g){throw new a.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid')}let h;if(p==="dir"){if(this._cek){throw new TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}}else if(p==="ECDH-ES"){if(this._cek){throw new TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement")}}let f;{let s;({cek:f,encryptedKey:h,parameters:s}=await(0,A.default)(p,g,e,this._cek,this._keyManagementParameters));if(s){if(n&&t.unprotected in n){if(!this._unprotectedHeader){this.setUnprotectedHeader(s)}else{this._unprotectedHeader={...this._unprotectedHeader,...s}}}else{if(!this._protectedHeader){this.setProtectedHeader(s)}else{this._protectedHeader={...this._protectedHeader,...s}}}}}this._iv||(this._iv=(0,o.default)(g));let E;let m;let C;if(this._protectedHeader){m=u.encoder.encode((0,s.encode)(JSON.stringify(this._protectedHeader)))}else{m=u.encoder.encode("")}if(this._aad){C=(0,s.encode)(this._aad);E=(0,u.concat)(m,u.encoder.encode("."),u.encoder.encode(C))}else{E=m}let Q;let I;if(d.zip==="DEF"){const e=await((n===null||n===void 0?void 0:n.deflateRaw)||r.deflate)(this._plaintext);({ciphertext:Q,tag:I}=await(0,i.default)(g,e,f,this._iv,E))}else{({ciphertext:Q,tag:I}=await(0,i.default)(g,this._plaintext,f,this._iv,E))}const B={ciphertext:(0,s.encode)(Q),iv:(0,s.encode)(this._iv),tag:(0,s.encode)(I)};if(h){B.encrypted_key=(0,s.encode)(h)}if(C){B.aad=C}if(this._protectedHeader){B.protected=u.decoder.decode(m)}if(this._sharedUnprotectedHeader){B.unprotected=this._sharedUnprotectedHeader}if(this._unprotectedHeader){B.header=this._unprotectedHeader}return B}}t.FlattenedEncrypt=FlattenedEncrypt},5684:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generalDecrypt=void 0;const s=n(7566);const i=n(4419);const r=n(9127);async function generalDecrypt(e,t,n){if(!(0,r.default)(e)){throw new i.JWEInvalid("General JWE must be an object")}if(!Array.isArray(e.recipients)||!e.recipients.every(r.default)){throw new i.JWEInvalid("JWE Recipients missing or incorrect type")}if(!e.recipients.length){throw new i.JWEInvalid("JWE Recipients has no members")}for(const i of e.recipients){try{return await(0,s.flattenedDecrypt)({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:i.encrypted_key,header:i.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,n)}catch{}}throw new i.JWEDecryptionFailed}t.generalDecrypt=generalDecrypt},3992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GeneralEncrypt=void 0;const s=n(1555);const i=n(4419);const r=n(3987);const o=n(6063);const A=n(3286);const a=n(518);const c=n(863);class IndividualRecipient{constructor(e,t,n){this.parent=e;this.key=t;this.options=n}setUnprotectedHeader(e){if(this.unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this.unprotectedHeader=e;return this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class GeneralEncrypt{constructor(e){this._recipients=[];this._plaintext=e}addRecipient(e,t){const n=new IndividualRecipient(this,e,{crit:t===null||t===void 0?void 0:t.crit});this._recipients.push(n);return n}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setSharedUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}async encrypt(e){var t,n,u;if(!this._recipients.length){throw new i.JWEInvalid("at least one recipient must be added")}e={deflateRaw:e===null||e===void 0?void 0:e.deflateRaw};if(this._recipients.length===1){const[t]=this._recipients;const n=await new s.FlattenedEncrypt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options,...e});let i={ciphertext:n.ciphertext,iv:n.iv,recipients:[{}],tag:n.tag};if(n.aad)i.aad=n.aad;if(n.protected)i.protected=n.protected;if(n.unprotected)i.unprotected=n.unprotected;if(n.encrypted_key)i.recipients[0].encrypted_key=n.encrypted_key;if(n.header)i.recipients[0].header=n.header;return i}let l;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EmbeddedJWK=void 0;const s=n(4230);const i=n(9127);const r=n(4419);async function EmbeddedJWK(e,t){const n={...e,...t===null||t===void 0?void 0:t.header};if(!(0,i.default)(n.jwk)){throw new r.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object')}const o=await(0,s.importJWK)({...n.jwk,ext:true},n.alg,true);if(o instanceof Uint8Array||o.type!=="public"){throw new r.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key')}return o}t.EmbeddedJWK=EmbeddedJWK},3494:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.calculateJwkThumbprintUri=t.calculateJwkThumbprint=void 0;const s=n(2355);const i=n(518);const r=n(4419);const o=n(1691);const A=n(9127);const check=(e,t)=>{if(typeof e!=="string"||!e){throw new r.JWKInvalid(`${t} missing or invalid`)}};async function calculateJwkThumbprint(e,t){if(!(0,A.default)(e)){throw new TypeError("JWK must be an object")}t!==null&&t!==void 0?t:t="sha256";if(t!=="sha256"&&t!=="sha384"&&t!=="sha512"){throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"')}let n;switch(e.kty){case"EC":check(e.crv,'"crv" (Curve) Parameter');check(e.x,'"x" (X Coordinate) Parameter');check(e.y,'"y" (Y Coordinate) Parameter');n={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":check(e.crv,'"crv" (Subtype of Key Pair) Parameter');check(e.x,'"x" (Public Key) Parameter');n={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":check(e.e,'"e" (Exponent) Parameter');check(e.n,'"n" (Modulus) Parameter');n={e:e.e,kty:e.kty,n:e.n};break;case"oct":check(e.k,'"k" (Key Value) Parameter');n={k:e.k,kty:e.kty};break;default:throw new r.JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported')}const a=o.encoder.encode(JSON.stringify(n));return(0,i.encode)(await(0,s.default)(t,a))}t.calculateJwkThumbprint=calculateJwkThumbprint;async function calculateJwkThumbprintUri(e,t){t!==null&&t!==void 0?t:t="sha256";const n=await calculateJwkThumbprint(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${n}`}t.calculateJwkThumbprintUri=calculateJwkThumbprintUri},9970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createLocalJWKSet=t.LocalJWKSet=t.isJWKSLike=void 0;const s=n(4230);const i=n(4419);const r=n(9127);function getKtyFromAlg(e){switch(typeof e==="string"&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new i.JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set')}}function isJWKSLike(e){return e&&typeof e==="object"&&Array.isArray(e.keys)&&e.keys.every(isJWKLike)}t.isJWKSLike=isJWKSLike;function isJWKLike(e){return(0,r.default)(e)}function clone(e){if(typeof structuredClone==="function"){return structuredClone(e)}return JSON.parse(JSON.stringify(e))}class LocalJWKSet{constructor(e){this._cached=new WeakMap;if(!isJWKSLike(e)){throw new i.JWKSInvalid("JSON Web Key Set malformed")}this._jwks=clone(e)}async getKey(e,t){const{alg:n,kid:s}={...e,...t===null||t===void 0?void 0:t.header};const r=getKtyFromAlg(n);const o=this._jwks.keys.filter((e=>{let t=r===e.kty;if(t&&typeof s==="string"){t=s===e.kid}if(t&&typeof e.alg==="string"){t=n===e.alg}if(t&&typeof e.use==="string"){t=e.use==="sig"}if(t&&Array.isArray(e.key_ops)){t=e.key_ops.includes("verify")}if(t&&n==="EdDSA"){t=e.crv==="Ed25519"||e.crv==="Ed448"}if(t){switch(n){case"ES256":t=e.crv==="P-256";break;case"ES256K":t=e.crv==="secp256k1";break;case"ES384":t=e.crv==="P-384";break;case"ES512":t=e.crv==="P-521";break}}return t}));const{0:A,length:a}=o;if(a===0){throw new i.JWKSNoMatchingKey}else if(a!==1){const e=new i.JWKSMultipleMatchingKeys;const{_cached:t}=this;e[Symbol.asyncIterator]=async function*(){for(const e of o){try{yield await importWithAlgCache(t,e,n)}catch{continue}}};throw e}return importWithAlgCache(this._cached,A,n)}}t.LocalJWKSet=LocalJWKSet;async function importWithAlgCache(e,t,n){const r=e.get(t)||e.set(t,{}).get(t);if(r[n]===undefined){const e=await(0,s.importJWK)({...t,ext:true},n);if(e instanceof Uint8Array||e.type!=="public"){throw new i.JWKSInvalid("JSON Web Key Set members must be public keys")}r[n]=e}return r[n]}function createLocalJWKSet(e){const t=new LocalJWKSet(e);return async function(e,n){return t.getKey(e,n)}}t.createLocalJWKSet=createLocalJWKSet},9035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createRemoteJWKSet=void 0;const s=n(3650);const i=n(4419);const r=n(9970);function isCloudflareWorkers(){return typeof WebSocketPair!=="undefined"||typeof navigator!=="undefined"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime!=="undefined"&&EdgeRuntime==="vercel"}class RemoteJWKSet extends r.LocalJWKSet{constructor(e,t){super({keys:[]});this._jwks=undefined;if(!(e instanceof URL)){throw new TypeError("url must be an instance of URL")}this._url=new URL(e.href);this._options={agent:t===null||t===void 0?void 0:t.agent,headers:t===null||t===void 0?void 0:t.headers};this._timeoutDuration=typeof(t===null||t===void 0?void 0:t.timeoutDuration)==="number"?t===null||t===void 0?void 0:t.timeoutDuration:5e3;this._cooldownDuration=typeof(t===null||t===void 0?void 0:t.cooldownDuration)==="number"?t===null||t===void 0?void 0:t.cooldownDuration:3e4;this._cacheMaxAge=typeof(t===null||t===void 0?void 0:t.cacheMaxAge)==="number"?t===null||t===void 0?void 0:t.cacheMaxAge:6e5}coolingDown(){return typeof this._jwksTimestamp==="number"?Date.now(){if(!(0,r.isJWKSLike)(e)){throw new i.JWKSInvalid("JSON Web Key Set malformed")}this._jwks={keys:e.keys};this._jwksTimestamp=Date.now();this._pendingFetch=undefined})).catch((e=>{this._pendingFetch=undefined;throw e})));await this._pendingFetch}}function createRemoteJWKSet(e,t){const n=new RemoteJWKSet(e,t);return async function(e,t){return n.getKey(e,t)}}t.createRemoteJWKSet=createRemoteJWKSet},8257:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CompactSign=void 0;const s=n(4825);class CompactSign{constructor(e){this._flattened=new s.FlattenedSign(e)}setProtectedHeader(e){this._flattened.setProtectedHeader(e);return this}async sign(e,t){const n=await this._flattened.sign(e,t);if(n.payload===undefined){throw new TypeError("use the flattened module for creating JWS with b64: false")}return`${n.protected}.${n.payload}.${n.signature}`}}t.CompactSign=CompactSign},5212:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.compactVerify=void 0;const s=n(2095);const i=n(4419);const r=n(1691);async function compactVerify(e,t,n){if(e instanceof Uint8Array){e=r.decoder.decode(e)}if(typeof e!=="string"){throw new i.JWSInvalid("Compact JWS must be a string or Uint8Array")}const{0:o,1:A,2:a,length:c}=e.split(".");if(c!==3){throw new i.JWSInvalid("Invalid Compact JWS")}const u=await(0,s.flattenedVerify)({payload:A,protected:o,signature:a},t,n);const l={payload:u.payload,protectedHeader:u.protectedHeader};if(typeof t==="function"){return{...l,key:u.key}}return l}t.compactVerify=compactVerify},4825:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FlattenedSign=void 0;const s=n(518);const i=n(9935);const r=n(6063);const o=n(4419);const A=n(1691);const a=n(6241);const c=n(863);class FlattenedSign{constructor(e){if(!(e instanceof Uint8Array)){throw new TypeError("payload must be an instance of Uint8Array")}this._payload=e}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader){throw new o.JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()")}if(!(0,r.default)(this._protectedHeader,this._unprotectedHeader)){throw new o.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint")}const n={...this._protectedHeader,...this._unprotectedHeader};const u=(0,c.default)(o.JWSInvalid,new Map([["b64",true]]),t===null||t===void 0?void 0:t.crit,this._protectedHeader,n);let l=true;if(u.has("b64")){l=this._protectedHeader.b64;if(typeof l!=="boolean"){throw new o.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}}const{alg:d}=n;if(typeof d!=="string"||!d){throw new o.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid')}(0,a.default)(d,e,"sign");let p=this._payload;if(l){p=A.encoder.encode((0,s.encode)(p))}let g;if(this._protectedHeader){g=A.encoder.encode((0,s.encode)(JSON.stringify(this._protectedHeader)))}else{g=A.encoder.encode("")}const h=(0,A.concat)(g,A.encoder.encode("."),p);const f=await(0,i.default)(d,e,h);const E={signature:(0,s.encode)(f),payload:""};if(l){E.payload=A.decoder.decode(p)}if(this._unprotectedHeader){E.header=this._unprotectedHeader}if(this._protectedHeader){E.protected=A.decoder.decode(g)}return E}}t.FlattenedSign=FlattenedSign},2095:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.flattenedVerify=void 0;const s=n(518);const i=n(3569);const r=n(4419);const o=n(1691);const A=n(6063);const a=n(9127);const c=n(6241);const u=n(863);const l=n(5148);async function flattenedVerify(e,t,n){var d;if(!(0,a.default)(e)){throw new r.JWSInvalid("Flattened JWS must be an object")}if(e.protected===undefined&&e.header===undefined){throw new r.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members')}if(e.protected!==undefined&&typeof e.protected!=="string"){throw new r.JWSInvalid("JWS Protected Header incorrect type")}if(e.payload===undefined){throw new r.JWSInvalid("JWS Payload missing")}if(typeof e.signature!=="string"){throw new r.JWSInvalid("JWS Signature missing or incorrect type")}if(e.header!==undefined&&!(0,a.default)(e.header)){throw new r.JWSInvalid("JWS Unprotected Header incorrect type")}let p={};if(e.protected){try{const t=(0,s.decode)(e.protected);p=JSON.parse(o.decoder.decode(t))}catch{throw new r.JWSInvalid("JWS Protected Header is invalid")}}if(!(0,A.default)(p,e.header)){throw new r.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint")}const g={...p,...e.header};const h=(0,u.default)(r.JWSInvalid,new Map([["b64",true]]),n===null||n===void 0?void 0:n.crit,p,g);let f=true;if(h.has("b64")){f=p.b64;if(typeof f!=="boolean"){throw new r.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}}const{alg:E}=g;if(typeof E!=="string"||!E){throw new r.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid')}const m=n&&(0,l.default)("algorithms",n.algorithms);if(m&&!m.has(E)){throw new r.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed')}if(f){if(typeof e.payload!=="string"){throw new r.JWSInvalid("JWS Payload must be a string")}}else if(typeof e.payload!=="string"&&!(e.payload instanceof Uint8Array)){throw new r.JWSInvalid("JWS Payload must be a string or an Uint8Array instance")}let C=false;if(typeof t==="function"){t=await t(p,e);C=true}(0,c.default)(E,t,"verify");const Q=(0,o.concat)(o.encoder.encode((d=e.protected)!==null&&d!==void 0?d:""),o.encoder.encode("."),typeof e.payload==="string"?o.encoder.encode(e.payload):e.payload);let I;try{I=(0,s.decode)(e.signature)}catch{throw new r.JWSInvalid("Failed to base64url decode the signature")}const B=await(0,i.default)(E,t,I,Q);if(!B){throw new r.JWSSignatureVerificationFailed}let y;if(f){try{y=(0,s.decode)(e.payload)}catch{throw new r.JWSInvalid("Failed to base64url decode the payload")}}else if(typeof e.payload==="string"){y=o.encoder.encode(e.payload)}else{y=e.payload}const b={payload:y};if(e.protected!==undefined){b.protectedHeader=p}if(e.header!==undefined){b.unprotectedHeader=e.header}if(C){return{...b,key:t}}return b}t.flattenedVerify=flattenedVerify},4268:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GeneralSign=void 0;const s=n(4825);const i=n(4419);class IndividualSignature{constructor(e,t,n){this.parent=e;this.key=t;this.options=n}setProtectedHeader(e){if(this.protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this.protectedHeader=e;return this}setUnprotectedHeader(e){if(this.unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this.unprotectedHeader=e;return this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class GeneralSign{constructor(e){this._signatures=[];this._payload=e}addSignature(e,t){const n=new IndividualSignature(this,e,t);this._signatures.push(n);return n}async sign(){if(!this._signatures.length){throw new i.JWSInvalid("at least one signature must be added")}const e={signatures:[],payload:""};for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generalVerify=void 0;const s=n(2095);const i=n(4419);const r=n(9127);async function generalVerify(e,t,n){if(!(0,r.default)(e)){throw new i.JWSInvalid("General JWS must be an object")}if(!Array.isArray(e.signatures)||!e.signatures.every(r.default)){throw new i.JWSInvalid("JWS Signatures missing or incorrect type")}for(const i of e.signatures){try{return await(0,s.flattenedVerify)({header:i.header,payload:e.payload,protected:i.protected,signature:i.signature},t,n)}catch{}}throw new i.JWSSignatureVerificationFailed}t.generalVerify=generalVerify},3378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwtDecrypt=void 0;const s=n(7651);const i=n(7274);const r=n(4419);async function jwtDecrypt(e,t,n){const o=await(0,s.compactDecrypt)(e,t,n);const A=(0,i.default)(o.protectedHeader,o.plaintext,n);const{protectedHeader:a}=o;if(a.iss!==undefined&&a.iss!==A.iss){throw new r.JWTClaimValidationFailed('replicated "iss" claim header parameter mismatch',"iss","mismatch")}if(a.sub!==undefined&&a.sub!==A.sub){throw new r.JWTClaimValidationFailed('replicated "sub" claim header parameter mismatch',"sub","mismatch")}if(a.aud!==undefined&&JSON.stringify(a.aud)!==JSON.stringify(A.aud)){throw new r.JWTClaimValidationFailed('replicated "aud" claim header parameter mismatch',"aud","mismatch")}const c={payload:A,protectedHeader:a};if(typeof t==="function"){return{...c,key:o.key}}return c}t.jwtDecrypt=jwtDecrypt},960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EncryptJWT=void 0;const s=n(6203);const i=n(1691);const r=n(1908);class EncryptJWT extends r.ProduceJWT{setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setKeyManagementParameters(e){if(this._keyManagementParameters){throw new TypeError("setKeyManagementParameters can only be called once")}this._keyManagementParameters=e;return this}setContentEncryptionKey(e){if(this._cek){throw new TypeError("setContentEncryptionKey can only be called once")}this._cek=e;return this}setInitializationVector(e){if(this._iv){throw new TypeError("setInitializationVector can only be called once")}this._iv=e;return this}replicateIssuerAsHeader(){this._replicateIssuerAsHeader=true;return this}replicateSubjectAsHeader(){this._replicateSubjectAsHeader=true;return this}replicateAudienceAsHeader(){this._replicateAudienceAsHeader=true;return this}async encrypt(e,t){const n=new s.CompactEncrypt(i.encoder.encode(JSON.stringify(this._payload)));if(this._replicateIssuerAsHeader){this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}}if(this._replicateSubjectAsHeader){this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}}if(this._replicateAudienceAsHeader){this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}}n.setProtectedHeader(this._protectedHeader);if(this._iv){n.setInitializationVector(this._iv)}if(this._cek){n.setContentEncryptionKey(this._cek)}if(this._keyManagementParameters){n.setKeyManagementParameters(this._keyManagementParameters)}return n.encrypt(e,t)}}t.EncryptJWT=EncryptJWT},1908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ProduceJWT=void 0;const s=n(4476);const i=n(9127);const r=n(7810);class ProduceJWT{constructor(e){if(!(0,i.default)(e)){throw new TypeError("JWT Claims Set MUST be an object")}this._payload=e}setIssuer(e){this._payload={...this._payload,iss:e};return this}setSubject(e){this._payload={...this._payload,sub:e};return this}setAudience(e){this._payload={...this._payload,aud:e};return this}setJti(e){this._payload={...this._payload,jti:e};return this}setNotBefore(e){if(typeof e==="number"){this._payload={...this._payload,nbf:e}}else{this._payload={...this._payload,nbf:(0,s.default)(new Date)+(0,r.default)(e)}}return this}setExpirationTime(e){if(typeof e==="number"){this._payload={...this._payload,exp:e}}else{this._payload={...this._payload,exp:(0,s.default)(new Date)+(0,r.default)(e)}}return this}setIssuedAt(e){if(typeof e==="undefined"){this._payload={...this._payload,iat:(0,s.default)(new Date)}}else{this._payload={...this._payload,iat:e}}return this}}t.ProduceJWT=ProduceJWT},8882:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SignJWT=void 0;const s=n(8257);const i=n(4419);const r=n(1691);const o=n(1908);class SignJWT extends o.ProduceJWT{setProtectedHeader(e){this._protectedHeader=e;return this}async sign(e,t){var n;const o=new s.CompactSign(r.encoder.encode(JSON.stringify(this._payload)));o.setProtectedHeader(this._protectedHeader);if(Array.isArray((n=this._protectedHeader)===null||n===void 0?void 0:n.crit)&&this._protectedHeader.crit.includes("b64")&&this._protectedHeader.b64===false){throw new i.JWTInvalid("JWTs MUST NOT use unencoded payload")}return o.sign(e,t)}}t.SignJWT=SignJWT},8568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UnsecuredJWT=void 0;const s=n(518);const i=n(1691);const r=n(4419);const o=n(7274);const A=n(1908);class UnsecuredJWT extends A.ProduceJWT{encode(){const e=s.encode(JSON.stringify({alg:"none"}));const t=s.encode(JSON.stringify(this._payload));return`${e}.${t}.`}static decode(e,t){if(typeof e!=="string"){throw new r.JWTInvalid("Unsecured JWT must be a string")}const{0:n,1:A,2:a,length:c}=e.split(".");if(c!==3||a!==""){throw new r.JWTInvalid("Invalid Unsecured JWT")}let u;try{u=JSON.parse(i.decoder.decode(s.decode(n)));if(u.alg!=="none")throw new Error}catch{throw new r.JWTInvalid("Invalid Unsecured JWT")}const l=(0,o.default)(u,s.decode(A),t);return{payload:l,header:u}}}t.UnsecuredJWT=UnsecuredJWT},9887:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwtVerify=void 0;const s=n(5212);const i=n(7274);const r=n(4419);async function jwtVerify(e,t,n){var o;const A=await(0,s.compactVerify)(e,t,n);if(((o=A.protectedHeader.crit)===null||o===void 0?void 0:o.includes("b64"))&&A.protectedHeader.b64===false){throw new r.JWTInvalid("JWTs MUST NOT use unencoded payload")}const a=(0,i.default)(A.protectedHeader,A.payload,n);const c={payload:a,protectedHeader:A.protectedHeader};if(typeof t==="function"){return{...c,key:A.key}}return c}t.jwtVerify=jwtVerify},465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.exportJWK=t.exportPKCS8=t.exportSPKI=void 0;const s=n(858);const i=n(858);const r=n(997);async function exportSPKI(e){return(0,s.toSPKI)(e)}t.exportSPKI=exportSPKI;async function exportPKCS8(e){return(0,i.toPKCS8)(e)}t.exportPKCS8=exportPKCS8;async function exportJWK(e){return(0,r.default)(e)}t.exportJWK=exportJWK},1036:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateKeyPair=void 0;const s=n(9378);async function generateKeyPair(e,t){return(0,s.generateKeyPair)(e,t)}t.generateKeyPair=generateKeyPair},6617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateSecret=void 0;const s=n(9378);async function generateSecret(e,t){return(0,s.generateSecret)(e,t)}t.generateSecret=generateSecret},4230:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.importJWK=t.importPKCS8=t.importX509=t.importSPKI=void 0;const s=n(518);const i=n(858);const r=n(2659);const o=n(4419);const A=n(9127);async function importSPKI(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN PUBLIC KEY-----")!==0){throw new TypeError('"spki" must be SPKI formatted string')}return(0,i.fromSPKI)(e,t,n)}t.importSPKI=importSPKI;async function importX509(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN CERTIFICATE-----")!==0){throw new TypeError('"x509" must be X.509 formatted string')}return(0,i.fromX509)(e,t,n)}t.importX509=importX509;async function importPKCS8(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0){throw new TypeError('"pkcs8" must be PKCS#8 formatted string')}return(0,i.fromPKCS8)(e,t,n)}t.importPKCS8=importPKCS8;async function importJWK(e,t,n){var i;if(!(0,A.default)(e)){throw new TypeError("JWK must be an object")}t||(t=e.alg);switch(e.kty){case"oct":if(typeof e.k!=="string"||!e.k){throw new TypeError('missing "k" (Key Value) Parameter value')}n!==null&&n!==void 0?n:n=e.ext!==true;if(n){return(0,r.default)({...e,alg:t,ext:(i=e.ext)!==null&&i!==void 0?i:false})}return(0,s.decode)(e.k);case"RSA":if(e.oth!==undefined){throw new o.JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported')}case"EC":case"OKP":return(0,r.default)({...e,alg:t});default:throw new o.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value')}}t.importJWK=importJWK},233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unwrap=t.wrap=void 0;const s=n(6476);const i=n(6137);const r=n(4630);const o=n(518);async function wrap(e,t,n,i){const A=e.slice(0,7);i||(i=(0,r.default)(A));const{ciphertext:a,tag:c}=await(0,s.default)(A,n,t,i,new Uint8Array(0));return{encryptedKey:a,iv:(0,o.encode)(i),tag:(0,o.encode)(c)}}t.wrap=wrap;async function unwrap(e,t,n,s,r){const o=e.slice(0,7);return(0,i.default)(o,t,n,s,r,new Uint8Array(0))}t.unwrap=unwrap},1691:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.concatKdf=t.lengthAndInput=t.uint32be=t.uint64be=t.p2s=t.concat=t.decoder=t.encoder=void 0;const s=n(2355);t.encoder=new TextEncoder;t.decoder=new TextDecoder;const i=2**32;function concat(...e){const t=e.reduce(((e,{length:t})=>e+t),0);const n=new Uint8Array(t);let s=0;e.forEach((e=>{n.set(e,s);s+=e.length}));return n}t.concat=concat;function p2s(e,n){return concat(t.encoder.encode(e),new Uint8Array([0]),n)}t.p2s=p2s;function writeUInt32BE(e,t,n){if(t<0||t>=i){throw new RangeError(`value must be >= 0 and <= ${i-1}. Received ${t}`)}e.set([t>>>24,t>>>16,t>>>8,t&255],n)}function uint64be(e){const t=Math.floor(e/i);const n=e%i;const s=new Uint8Array(8);writeUInt32BE(s,t,0);writeUInt32BE(s,n,4);return s}t.uint64be=uint64be;function uint32be(e){const t=new Uint8Array(4);writeUInt32BE(t,e);return t}t.uint32be=uint32be;function lengthAndInput(e){return concat(uint32be(e.length),e)}t.lengthAndInput=lengthAndInput;async function concatKdf(e,t,n){const i=Math.ceil((t>>3)/32);const r=new Uint8Array(i*32);for(let t=0;t>3)}t.concatKdf=concatKdf},3987:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.bitLength=void 0;const s=n(4419);const i=n(5770);function bitLength(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new s.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}t.bitLength=bitLength;t["default"]=e=>(0,i.default)(new Uint8Array(bitLength(e)>>3))},1120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(4630);const checkIvLength=(e,t)=>{if(t.length<<3!==(0,i.bitLength)(e)){throw new s.JWEInvalid("Invalid Initialization Vector length")}};t["default"]=checkIvLength},6241:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(1146);const i=n(7947);const symmetricTypeCheck=(e,t)=>{if(t instanceof Uint8Array)return;if(!(0,i.default)(t)){throw new TypeError((0,s.withAlg)(e,t,...i.types,"Uint8Array"))}if(t.type!=="secret"){throw new TypeError(`${i.types.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}};const asymmetricTypeCheck=(e,t,n)=>{if(!(0,i.default)(t)){throw new TypeError((0,s.withAlg)(e,t,...i.types))}if(t.type==="secret"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`)}if(n==="sign"&&t.type==="public"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`)}if(n==="decrypt"&&t.type==="public"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`)}if(t.algorithm&&n==="verify"&&t.type==="private"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`)}if(t.algorithm&&n==="encrypt"&&t.type==="private"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)}};const checkKeyType=(e,t,n)=>{const s=e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e);if(s){symmetricTypeCheck(e,t)}else{asymmetricTypeCheck(e,t,n)}};t["default"]=checkKeyType},3499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function checkP2s(e){if(!(e instanceof Uint8Array)||e.length<8){throw new s.JWEInvalid("PBES2 Salt Input must be 8 or more octets")}}t["default"]=checkP2s},3386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkEncCryptoKey=t.checkSigCryptoKey=void 0;function unusable(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function isAlgorithm(e,t){return e.name===t}function getHashLength(e){return parseInt(e.name.slice(4),10)}function getNamedCurve(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function checkUsage(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const n=t.pop();e+=`one of ${t.join(", ")}, or ${n}.`}else if(t.length===2){e+=`one of ${t[0]} or ${t[1]}.`}else{e+=`${t[0]}.`}throw new TypeError(e)}}function checkSigCryptoKey(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!isAlgorithm(e.algorithm,"HMAC"))throw unusable("HMAC");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!isAlgorithm(e.algorithm,"RSASSA-PKCS1-v1_5"))throw unusable("RSASSA-PKCS1-v1_5");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!isAlgorithm(e.algorithm,"RSA-PSS"))throw unusable("RSA-PSS");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":{if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448"){throw unusable("Ed25519 or Ed448")}break}case"ES256":case"ES384":case"ES512":{if(!isAlgorithm(e.algorithm,"ECDSA"))throw unusable("ECDSA");const n=getNamedCurve(t);const s=e.algorithm.namedCurve;if(s!==n)throw unusable(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(e,n)}t.checkSigCryptoKey=checkSigCryptoKey;function checkEncCryptoKey(e,t,...n){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!isAlgorithm(e.algorithm,"AES-GCM"))throw unusable("AES-GCM");const n=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==n)throw unusable(n,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!isAlgorithm(e.algorithm,"AES-KW"))throw unusable("AES-KW");const n=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==n)throw unusable(n,"algorithm.length");break}case"ECDH":{switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw unusable("ECDH, X25519, or X448")}break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!isAlgorithm(e.algorithm,"PBKDF2"))throw unusable("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!isAlgorithm(e.algorithm,"RSA-OAEP"))throw unusable("RSA-OAEP");const n=parseInt(t.slice(9),10)||1;const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(e,n)}t.checkEncCryptoKey=checkEncCryptoKey},6127:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6083);const i=n(3706);const r=n(6898);const o=n(9526);const A=n(518);const a=n(4419);const c=n(3987);const u=n(4230);const l=n(6241);const d=n(9127);const p=n(233);async function decryptKeyManagement(e,t,n,g,h){(0,l.default)(e,t,"decrypt");switch(e){case"dir":{if(n!==undefined)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");return t}case"ECDH-ES":if(n!==undefined)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!(0,d.default)(g.epk))throw new a.JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`);if(!i.ecdhAllowed(t))throw new a.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime");const r=await(0,u.importJWK)(g.epk,e);let o;let l;if(g.apu!==undefined){if(typeof g.apu!=="string")throw new a.JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`);try{o=(0,A.decode)(g.apu)}catch{throw new a.JWEInvalid("Failed to base64url decode the apu")}}if(g.apv!==undefined){if(typeof g.apv!=="string")throw new a.JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`);try{l=(0,A.decode)(g.apv)}catch{throw new a.JWEInvalid("Failed to base64url decode the apv")}}const p=await i.deriveKey(r,t,e==="ECDH-ES"?g.enc:e,e==="ECDH-ES"?(0,c.bitLength)(g.enc):parseInt(e.slice(-5,-2),10),o,l);if(e==="ECDH-ES")return p;if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,s.unwrap)(e.slice(-6),p,n)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,o.decrypt)(e,t,n)}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");if(typeof g.p2c!=="number")throw new a.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`);const s=(h===null||h===void 0?void 0:h.maxPBES2Count)||1e4;if(g.p2c>s)throw new a.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds`);if(typeof g.p2s!=="string")throw new a.JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`);let i;try{i=(0,A.decode)(g.p2s)}catch{throw new a.JWEInvalid("Failed to base64url decode the p2s")}return(0,r.decrypt)(e,t,n,g.p2c,i)}case"A128KW":case"A192KW":case"A256KW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,s.unwrap)(e,t,n)}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");if(typeof g.iv!=="string")throw new a.JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`);if(typeof g.tag!=="string")throw new a.JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`);let s;try{s=(0,A.decode)(g.iv)}catch{throw new a.JWEInvalid("Failed to base64url decode the iv")}let i;try{i=(0,A.decode)(g.tag)}catch{throw new a.JWEInvalid("Failed to base64url decode the tag")}return(0,p.unwrap)(e,t,n,s,i)}default:{throw new a.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}}t["default"]=decryptKeyManagement},3286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6083);const i=n(3706);const r=n(6898);const o=n(9526);const A=n(518);const a=n(3987);const c=n(4419);const u=n(465);const l=n(6241);const d=n(233);async function encryptKeyManagement(e,t,n,p,g={}){let h;let f;let E;(0,l.default)(e,n,"encrypt");switch(e){case"dir":{E=n;break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!i.ecdhAllowed(n)){throw new c.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime")}const{apu:r,apv:o}=g;let{epk:l}=g;l||(l=(await i.generateEpk(n)).privateKey);const{x:d,y:m,crv:C,kty:Q}=await(0,u.exportJWK)(l);const I=await i.deriveKey(n,l,e==="ECDH-ES"?t:e,e==="ECDH-ES"?(0,a.bitLength)(t):parseInt(e.slice(-5,-2),10),r,o);f={epk:{x:d,crv:C,kty:Q}};if(Q==="EC")f.epk.y=m;if(r)f.apu=(0,A.encode)(r);if(o)f.apv=(0,A.encode)(o);if(e==="ECDH-ES"){E=I;break}E=p||(0,a.default)(t);const B=e.slice(-6);h=await(0,s.wrap)(B,I,E);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{E=p||(0,a.default)(t);h=await(0,o.encrypt)(e,n,E);break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{E=p||(0,a.default)(t);const{p2c:s,p2s:i}=g;({encryptedKey:h,...f}=await(0,r.encrypt)(e,n,E,s,i));break}case"A128KW":case"A192KW":case"A256KW":{E=p||(0,a.default)(t);h=await(0,s.wrap)(e,n,E);break}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{E=p||(0,a.default)(t);const{iv:s}=g;({encryptedKey:h,...f}=await(0,d.wrap)(e,n,E,s));break}default:{throw new c.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}return{cek:E,encryptedKey:h,parameters:f}}t["default"]=encryptKeyManagement},4476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=e=>Math.floor(e.getTime()/1e3)},1146:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.withAlg=void 0;function message(e,t,...n){if(n.length>2){const t=n.pop();e+=`one of type ${n.join(", ")}, or ${t}.`}else if(n.length===2){e+=`one of type ${n[0]} or ${n[1]}.`}else{e+=`of type ${n[0]}.`}if(t==null){e+=` Received ${t}`}else if(typeof t==="function"&&t.name){e+=` Received function ${t.name}`}else if(typeof t==="object"&&t!=null){if(t.constructor&&t.constructor.name){e+=` Received an instance of ${t.constructor.name}`}}return e}t["default"]=(e,...t)=>message("Key must be ",e,...t);function withAlg(e,t,...n){return message(`Key for the ${e} algorithm must be `,t,...n)}t.withAlg=withAlg},6063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const isDisjoint=(...e)=>{const t=e.filter(Boolean);if(t.length===0||t.length===1){return true}let n;for(const e of t){const t=Object.keys(e);if(!n||n.size===0){n=new Set(t);continue}for(const e of t){if(n.has(e)){return false}n.add(e)}}return true};t["default"]=isDisjoint},9127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function isObjectLike(e){return typeof e==="object"&&e!==null}function isObject(e){if(!isObjectLike(e)||Object.prototype.toString.call(e)!=="[object Object]"){return false}if(Object.getPrototypeOf(e)===null){return true}let t=e;while(Object.getPrototypeOf(t)!==null){t=Object.getPrototypeOf(t)}return Object.getPrototypeOf(e)===t}t["default"]=isObject},4630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.bitLength=void 0;const s=n(4419);const i=n(5770);function bitLength(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new s.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}t.bitLength=bitLength;t["default"]=e=>(0,i.default)(new Uint8Array(bitLength(e)>>3))},7274:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(1691);const r=n(4476);const o=n(7810);const A=n(9127);const normalizeTyp=e=>e.toLowerCase().replace(/^application\//,"");const checkAudiencePresence=(e,t)=>{if(typeof e==="string"){return t.includes(e)}if(Array.isArray(e)){return t.some(Set.prototype.has.bind(new Set(e)))}return false};t["default"]=(e,t,n={})=>{const{typ:a}=n;if(a&&(typeof e.typ!=="string"||normalizeTyp(e.typ)!==normalizeTyp(a))){throw new s.JWTClaimValidationFailed('unexpected "typ" JWT header value',"typ","check_failed")}let c;try{c=JSON.parse(i.decoder.decode(t))}catch{}if(!(0,A.default)(c)){throw new s.JWTInvalid("JWT Claims Set must be a top-level JSON object")}const{requiredClaims:u=[],issuer:l,subject:d,audience:p,maxTokenAge:g}=n;if(g!==undefined)u.push("iat");if(p!==undefined)u.push("aud");if(d!==undefined)u.push("sub");if(l!==undefined)u.push("iss");for(const e of new Set(u.reverse())){if(!(e in c)){throw new s.JWTClaimValidationFailed(`missing required "${e}" claim`,e,"missing")}}if(l&&!(Array.isArray(l)?l:[l]).includes(c.iss)){throw new s.JWTClaimValidationFailed('unexpected "iss" claim value',"iss","check_failed")}if(d&&c.sub!==d){throw new s.JWTClaimValidationFailed('unexpected "sub" claim value',"sub","check_failed")}if(p&&!checkAudiencePresence(c.aud,typeof p==="string"?[p]:p)){throw new s.JWTClaimValidationFailed('unexpected "aud" claim value',"aud","check_failed")}let h;switch(typeof n.clockTolerance){case"string":h=(0,o.default)(n.clockTolerance);break;case"number":h=n.clockTolerance;break;case"undefined":h=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:f}=n;const E=(0,r.default)(f||new Date);if((c.iat!==undefined||g)&&typeof c.iat!=="number"){throw new s.JWTClaimValidationFailed('"iat" claim must be a number',"iat","invalid")}if(c.nbf!==undefined){if(typeof c.nbf!=="number"){throw new s.JWTClaimValidationFailed('"nbf" claim must be a number',"nbf","invalid")}if(c.nbf>E+h){throw new s.JWTClaimValidationFailed('"nbf" claim timestamp check failed',"nbf","check_failed")}}if(c.exp!==undefined){if(typeof c.exp!=="number"){throw new s.JWTClaimValidationFailed('"exp" claim must be a number',"exp","invalid")}if(c.exp<=E-h){throw new s.JWTExpired('"exp" claim timestamp check failed',"exp","check_failed")}}if(g){const e=E-c.iat;const t=typeof g==="number"?g:(0,o.default)(g);if(e-h>t){throw new s.JWTExpired('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed")}if(e<0-h){throw new s.JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}}return c}},7810:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=60;const s=n*60;const i=s*24;const r=i*7;const o=i*365.25;const A=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i;t["default"]=e=>{const t=A.exec(e);if(!t){throw new TypeError("Invalid time period format")}const a=parseFloat(t[1]);const c=t[2].toLowerCase();switch(c){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(a);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(a*n);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(a*s);case"day":case"days":case"d":return Math.round(a*i);case"week":case"weeks":case"w":return Math.round(a*r);default:return Math.round(a*o)}}},5148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const validateAlgorithms=(e,t)=>{if(t!==undefined&&(!Array.isArray(t)||t.some((e=>typeof e!=="string")))){throw new TypeError(`"${e}" option must be an array of strings`)}if(!t){return undefined}return new Set(t)};t["default"]=validateAlgorithms},863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function validateCrit(e,t,n,i,r){if(r.crit!==undefined&&i.crit===undefined){throw new e('"crit" (Critical) Header Parameter MUST be integrity protected')}if(!i||i.crit===undefined){return new Set}if(!Array.isArray(i.crit)||i.crit.length===0||i.crit.some((e=>typeof e!=="string"||e.length===0))){throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present')}let o;if(n!==undefined){o=new Map([...Object.entries(n),...t.entries()])}else{o=t}for(const t of i.crit){if(!o.has(t)){throw new s.JOSENotSupported(`Extension Header Parameter "${t}" is not recognized`)}if(r[t]===undefined){throw new e(`Extension Header Parameter "${t}" is missing`)}else if(o.get(t)&&i[t]===undefined){throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}}return new Set(i.crit)}t["default"]=validateCrit},6083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unwrap=t.wrap=void 0;const s=n(4300);const i=n(6113);const r=n(4419);const o=n(1691);const A=n(6852);const a=n(3386);const c=n(2768);const u=n(1146);const l=n(4618);const d=n(7947);function checkKeySize(e,t){if(e.symmetricKeySize<<3!==parseInt(t.slice(1,4),10)){throw new TypeError(`Invalid key size for alg: ${t}`)}}function ensureKeyObject(e,t,n){if((0,c.default)(e)){return e}if(e instanceof Uint8Array){return(0,i.createSecretKey)(e)}if((0,A.isCryptoKey)(e)){(0,a.checkEncCryptoKey)(e,t,n);return i.KeyObject.from(e)}throw new TypeError((0,u.default)(e,...d.types,"Uint8Array"))}const wrap=(e,t,n)=>{const A=parseInt(e.slice(1,4),10);const a=`aes${A}-wrap`;if(!(0,l.default)(a)){throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}const c=ensureKeyObject(t,e,"wrapKey");checkKeySize(c,e);const u=(0,i.createCipheriv)(a,c,s.Buffer.alloc(8,166));return(0,o.concat)(u.update(n),u.final())};t.wrap=wrap;const unwrap=(e,t,n)=>{const A=parseInt(e.slice(1,4),10);const a=`aes${A}-wrap`;if(!(0,l.default)(a)){throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}const c=ensureKeyObject(t,e,"unwrapKey");checkKeySize(c,e);const u=(0,i.createDecipheriv)(a,c,s.Buffer.alloc(8,166));return(0,o.concat)(u.update(n),u.final())};t.unwrap=unwrap},858:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.fromX509=t.fromSPKI=t.fromPKCS8=t.toPKCS8=t.toSPKI=void 0;const s=n(6113);const i=n(4300);const r=n(6852);const o=n(2768);const A=n(1146);const a=n(7947);const genericExport=(e,t,n)=>{let i;if((0,r.isCryptoKey)(n)){if(!n.extractable){throw new TypeError("CryptoKey is not extractable")}i=s.KeyObject.from(n)}else if((0,o.default)(n)){i=n}else{throw new TypeError((0,A.default)(n,...a.types))}if(i.type!==e){throw new TypeError(`key is not a ${e} key`)}return i.export({format:"pem",type:t})};const toSPKI=e=>genericExport("public","spki",e);t.toSPKI=toSPKI;const toPKCS8=e=>genericExport("private","pkcs8",e);t.toPKCS8=toPKCS8;const fromPKCS8=e=>(0,s.createPrivateKey)({key:i.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,""),"base64"),type:"pkcs8",format:"der"});t.fromPKCS8=fromPKCS8;const fromSPKI=e=>(0,s.createPublicKey)({key:i.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,""),"base64"),type:"spki",format:"der"});t.fromSPKI=fromSPKI;const fromX509=e=>(0,s.createPublicKey)({key:e,type:"spki",format:"pem"});t.fromX509=fromX509},3888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=2;const s=48;class Asn1SequenceDecoder{constructor(e){if(e[0]!==s){throw new TypeError}this.buffer=e;this.offset=1;const t=this.decodeLength();if(t!==e.length-this.offset){throw new TypeError}}decodeLength(){let e=this.buffer[this.offset++];if(e&128){const t=e&~128;e=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4300);const i=n(4419);const r=2;const o=3;const A=4;const a=48;const c=s.Buffer.from([0]);const u=s.Buffer.from([r]);const l=s.Buffer.from([o]);const d=s.Buffer.from([a]);const p=s.Buffer.from([A]);const encodeLength=e=>{if(e<128)return s.Buffer.from([e]);const t=s.Buffer.alloc(5);t.writeUInt32BE(e,1);let n=1;while(t[n]===0)n++;t[n-1]=128|5-n;return t.slice(n-1)};const g=new Map([["P-256",s.Buffer.from("06 08 2A 86 48 CE 3D 03 01 07".replace(/ /g,""),"hex")],["secp256k1",s.Buffer.from("06 05 2B 81 04 00 0A".replace(/ /g,""),"hex")],["P-384",s.Buffer.from("06 05 2B 81 04 00 22".replace(/ /g,""),"hex")],["P-521",s.Buffer.from("06 05 2B 81 04 00 23".replace(/ /g,""),"hex")],["ecPublicKey",s.Buffer.from("06 07 2A 86 48 CE 3D 02 01".replace(/ /g,""),"hex")],["X25519",s.Buffer.from("06 03 2B 65 6E".replace(/ /g,""),"hex")],["X448",s.Buffer.from("06 03 2B 65 6F".replace(/ /g,""),"hex")],["Ed25519",s.Buffer.from("06 03 2B 65 70".replace(/ /g,""),"hex")],["Ed448",s.Buffer.from("06 03 2B 65 71".replace(/ /g,""),"hex")]]);class DumbAsn1Encoder{constructor(){this.length=0;this.elements=[]}oidFor(e){const t=g.get(e);if(!t){throw new i.JOSENotSupported("Invalid or unsupported OID")}this.elements.push(t);this.length+=t.length}zero(){this.elements.push(u,s.Buffer.from([1]),c);this.length+=3}one(){this.elements.push(u,s.Buffer.from([1]),s.Buffer.from([1]));this.length+=3}unsignedInteger(e){if(e[0]&128){const t=encodeLength(e.length+1);this.elements.push(u,t,c,e);this.length+=2+t.length+e.length}else{let t=0;while(e[t]===0&&(e[t+1]&128)===0)t++;const n=encodeLength(e.length-t);this.elements.push(u,encodeLength(e.length-t),e.slice(t));this.length+=1+n.length+e.length-t}}octStr(e){const t=encodeLength(e.length);this.elements.push(p,encodeLength(e.length),e);this.length+=1+t.length+e.length}bitStr(e){const t=encodeLength(e.length+1);this.elements.push(l,encodeLength(e.length+1),c,e);this.length+=1+t.length+e.length+1}add(e){this.elements.push(e);this.length+=e.length}end(e=d){const t=encodeLength(this.length);return s.Buffer.concat([e,t,...this.elements],1+t.length+this.length)}}t["default"]=DumbAsn1Encoder},518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=t.encodeBase64=t.decodeBase64=void 0;const s=n(4300);const i=n(1691);let r;function normalize(e){let t=e;if(t instanceof Uint8Array){t=i.decoder.decode(t)}return t}if(s.Buffer.isEncoding("base64url")){t.encode=r=e=>s.Buffer.from(e).toString("base64url")}else{t.encode=r=e=>s.Buffer.from(e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}const decodeBase64=e=>s.Buffer.from(e,"base64");t.decodeBase64=decodeBase64;const encodeBase64=e=>s.Buffer.from(e).toString("base64");t.encodeBase64=encodeBase64;const decode=e=>s.Buffer.from(normalize(e),"base64");t.decode=decode},4519:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1691);function cbcTag(e,t,n,r,o,A){const a=(0,i.concat)(e,t,n,(0,i.uint64be)(e.length<<3));const c=(0,s.createHmac)(`sha${r}`,o);c.update(a);return c.digest().slice(0,A>>3)}t["default"]=cbcTag},4047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(2768);const checkCekLength=(e,t)=>{let n;switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":n=parseInt(e.slice(-3),10);break;case"A128GCM":case"A192GCM":case"A256GCM":n=parseInt(e.slice(1,4),10);break;default:throw new s.JOSENotSupported(`Content Encryption Algorithm ${e} is not supported either by JOSE or your javascript runtime`)}if(t instanceof Uint8Array){const e=t.byteLength<<3;if(e!==n){throw new s.JWEInvalid(`Invalid Content Encryption Key length. Expected ${n} bits, got ${e} bits`)}return}if((0,i.default)(t)&&t.type==="secret"){const e=t.symmetricKeySize<<3;if(e!==n){throw new s.JWEInvalid(`Invalid Content Encryption Key length. Expected ${n} bits, got ${e} bits`)}return}throw new TypeError("Invalid Content Encryption Key type")};t["default"]=checkCekLength},122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setModulusLength=t.weakMap=void 0;t.weakMap=new WeakMap;const getLength=(e,t)=>{let n=e.readUInt8(1);if((n&128)===0){if(t===0){return n}return getLength(e.subarray(2+n),t-1)}const s=n&127;n=0;for(let t=0;t{const n=e.readUInt8(1);if((n&128)===0){return getLength(e.subarray(2),t)}const s=n&127;return getLength(e.subarray(2+s),t)};const getModulusLength=e=>{var n,s;if(t.weakMap.has(e)){return t.weakMap.get(e)}const i=(s=(n=e.asymmetricKeyDetails)===null||n===void 0?void 0:n.modulusLength)!==null&&s!==void 0?s:getLengthOfSeqIndex(e.export({format:"der",type:"pkcs1"}),e.type==="private"?1:0)-1<<3;t.weakMap.set(e,i);return i};const setModulusLength=(e,n)=>{t.weakMap.set(e,n)};t.setModulusLength=setModulusLength;t["default"]=(e,t)=>{if(getModulusLength(e)<2048){throw new TypeError(`${t} requires key modulusLength to be 2048 bits or larger`)}}},4618:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);let i;t["default"]=e=>{i||(i=new Set((0,s.getCiphers)()));return i.has(e)}},6137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1120);const r=n(4047);const o=n(1691);const A=n(4419);const a=n(5390);const c=n(4519);const u=n(6852);const l=n(3386);const d=n(2768);const p=n(1146);const g=n(4618);const h=n(7947);function cbcDecrypt(e,t,n,i,r,u){const l=parseInt(e.slice(1,4),10);if((0,d.default)(t)){t=t.export()}const p=t.subarray(l>>3);const h=t.subarray(0,l>>3);const f=parseInt(e.slice(-3),10);const E=`aes-${l}-cbc`;if(!(0,g.default)(E)){throw new A.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const m=(0,c.default)(u,i,n,f,h,l);let C;try{C=(0,a.default)(r,m)}catch{}if(!C){throw new A.JWEDecryptionFailed}let Q;try{const e=(0,s.createDecipheriv)(E,p,i);Q=(0,o.concat)(e.update(n),e.final())}catch{}if(!Q){throw new A.JWEDecryptionFailed}return Q}function gcmDecrypt(e,t,n,i,r,o){const a=parseInt(e.slice(1,4),10);const c=`aes-${a}-gcm`;if(!(0,g.default)(c)){throw new A.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}try{const e=(0,s.createDecipheriv)(c,t,i,{authTagLength:16});e.setAuthTag(r);if(o.byteLength){e.setAAD(o,{plaintextLength:n.length})}const A=e.update(n);e.final();return A}catch{throw new A.JWEDecryptionFailed}}const decrypt=(e,t,n,o,a,c)=>{let g;if((0,u.isCryptoKey)(t)){(0,l.checkEncCryptoKey)(t,e,"decrypt");g=s.KeyObject.from(t)}else if(t instanceof Uint8Array||(0,d.default)(t)){g=t}else{throw new TypeError((0,p.default)(t,...h.types,"Uint8Array"))}(0,r.default)(e,g);(0,i.default)(e,o);switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return cbcDecrypt(e,g,n,o,a,c);case"A128GCM":case"A192GCM":case"A256GCM":return gcmDecrypt(e,g,n,o,a,c);default:throw new A.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}};t["default"]=decrypt},2355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const digest=(e,t)=>(0,s.createHash)(e).update(t).digest();t["default"]=digest},4965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function dsaDigest(e){switch(e){case"PS256":case"RS256":case"ES256":case"ES256K":return"sha256";case"PS384":case"RS384":case"ES384":return"sha384";case"PS512":case"RS512":case"ES512":return"sha512";case"EdDSA":return undefined;default:throw new s.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=dsaDigest},3706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ecdhAllowed=t.generateEpk=t.deriveKey=void 0;const s=n(6113);const i=n(3837);const r=n(9302);const o=n(1691);const A=n(4419);const a=n(6852);const c=n(3386);const u=n(2768);const l=n(1146);const d=n(7947);const p=(0,i.promisify)(s.generateKeyPair);async function deriveKey(e,t,n,i,r=new Uint8Array(0),A=new Uint8Array(0)){let p;if((0,a.isCryptoKey)(e)){(0,c.checkEncCryptoKey)(e,"ECDH");p=s.KeyObject.from(e)}else if((0,u.default)(e)){p=e}else{throw new TypeError((0,l.default)(e,...d.types))}let g;if((0,a.isCryptoKey)(t)){(0,c.checkEncCryptoKey)(t,"ECDH","deriveBits");g=s.KeyObject.from(t)}else if((0,u.default)(t)){g=t}else{throw new TypeError((0,l.default)(t,...d.types))}const h=(0,o.concat)((0,o.lengthAndInput)(o.encoder.encode(n)),(0,o.lengthAndInput)(r),(0,o.lengthAndInput)(A),(0,o.uint32be)(i));const f=(0,s.diffieHellman)({privateKey:g,publicKey:p});return(0,o.concatKdf)(f,i,h)}t.deriveKey=deriveKey;async function generateEpk(e){let t;if((0,a.isCryptoKey)(e)){t=s.KeyObject.from(e)}else if((0,u.default)(e)){t=e}else{throw new TypeError((0,l.default)(e,...d.types))}switch(t.asymmetricKeyType){case"x25519":return p("x25519");case"x448":{return p("x448")}case"ec":{const e=(0,r.default)(t);return p("ec",{namedCurve:e})}default:throw new A.JOSENotSupported("Invalid or unsupported EPK")}}t.generateEpk=generateEpk;const ecdhAllowed=e=>["P-256","P-384","P-521","X25519","X448"].includes((0,r.default)(e));t.ecdhAllowed=ecdhAllowed},6476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1120);const r=n(4047);const o=n(1691);const A=n(4519);const a=n(6852);const c=n(3386);const u=n(2768);const l=n(1146);const d=n(4419);const p=n(4618);const g=n(7947);function cbcEncrypt(e,t,n,i,r){const a=parseInt(e.slice(1,4),10);if((0,u.default)(n)){n=n.export()}const c=n.subarray(a>>3);const l=n.subarray(0,a>>3);const g=`aes-${a}-cbc`;if(!(0,p.default)(g)){throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const h=(0,s.createCipheriv)(g,c,i);const f=(0,o.concat)(h.update(t),h.final());const E=parseInt(e.slice(-3),10);const m=(0,A.default)(r,i,f,E,l,a);return{ciphertext:f,tag:m}}function gcmEncrypt(e,t,n,i,r){const o=parseInt(e.slice(1,4),10);const A=`aes-${o}-gcm`;if(!(0,p.default)(A)){throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const a=(0,s.createCipheriv)(A,n,i,{authTagLength:16});if(r.byteLength){a.setAAD(r,{plaintextLength:t.length})}const c=a.update(t);a.final();const u=a.getAuthTag();return{ciphertext:c,tag:u}}const encrypt=(e,t,n,o,A)=>{let p;if((0,a.isCryptoKey)(n)){(0,c.checkEncCryptoKey)(n,e,"encrypt");p=s.KeyObject.from(n)}else if(n instanceof Uint8Array||(0,u.default)(n)){p=n}else{throw new TypeError((0,l.default)(n,...g.types,"Uint8Array"))}(0,r.default)(e,p);(0,i.default)(e,o);switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return cbcEncrypt(e,t,p,o,A);case"A128GCM":case"A192GCM":case"A256GCM":return gcmEncrypt(e,t,p,o,A);default:throw new d.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}};t["default"]=encrypt},3650:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(3685);const i=n(5687);const r=n(2361);const o=n(4419);const A=n(1691);const fetchJwks=async(e,t,n)=>{let a;switch(e.protocol){case"https:":a=i.get;break;case"http:":a=s.get;break;default:throw new TypeError("Unsupported URL protocol.")}const{agent:c,headers:u}=n;const l=a(e.href,{agent:c,timeout:t,headers:u});const[d]=await Promise.race([(0,r.once)(l,"response"),(0,r.once)(l,"timeout")]);if(!d){l.destroy();throw new o.JWKSTimeout}if(d.statusCode!==200){throw new o.JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response")}const p=[];for await(const e of d){p.push(e)}try{return JSON.parse(A.decoder.decode((0,A.concat)(...p)))}catch{throw new o.JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON")}};t["default"]=fetchJwks},9737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwkImport=t.jwkExport=t.rsaPssParams=t.oneShotCallback=void 0;const[n,s]=process.versions.node.split(".").map((e=>parseInt(e,10)));t.oneShotCallback=n>=16||n===15&&s>=13;t.rsaPssParams=!("electron"in process.versions)&&(n>=17||n===16&&s>=9);t.jwkExport=n>=16||n===15&&s>=9;t.jwkImport=n>=16||n===15&&s>=12},9378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateKeyPair=t.generateSecret=void 0;const s=n(6113);const i=n(3837);const r=n(5770);const o=n(122);const A=n(4419);const a=(0,i.promisify)(s.generateKeyPair);async function generateSecret(e,t){let n;switch(e){case"HS256":case"HS384":case"HS512":case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":n=parseInt(e.slice(-3),10);break;case"A128KW":case"A192KW":case"A256KW":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":n=parseInt(e.slice(1,4),10);break;default:throw new A.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return(0,s.createSecretKey)((0,r.default)(new Uint8Array(n>>3)))}t.generateSecret=generateSecret;async function generateKeyPair(e,t){var n,s;switch(e){case"RS256":case"RS384":case"RS512":case"PS256":case"PS384":case"PS512":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":case"RSA1_5":{const e=(n=t===null||t===void 0?void 0:t.modulusLength)!==null&&n!==void 0?n:2048;if(typeof e!=="number"||e<2048){throw new A.JOSENotSupported("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used")}const s=await a("rsa",{modulusLength:e,publicExponent:65537});(0,o.setModulusLength)(s.privateKey,e);(0,o.setModulusLength)(s.publicKey,e);return s}case"ES256":return a("ec",{namedCurve:"P-256"});case"ES256K":return a("ec",{namedCurve:"secp256k1"});case"ES384":return a("ec",{namedCurve:"P-384"});case"ES512":return a("ec",{namedCurve:"P-521"});case"EdDSA":{switch(t===null||t===void 0?void 0:t.crv){case undefined:case"Ed25519":return a("ed25519");case"Ed448":return a("ed448");default:throw new A.JOSENotSupported("Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448")}}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":const e=(s=t===null||t===void 0?void 0:t.crv)!==null&&s!==void 0?s:"P-256";switch(e){case undefined:case"P-256":case"P-384":case"P-521":return a("ec",{namedCurve:e});case"X25519":return a("x25519");case"X448":return a("x448");default:throw new A.JOSENotSupported("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}default:throw new A.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}}t.generateKeyPair=generateKeyPair},9302:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setCurve=t.weakMap=void 0;const s=n(4300);const i=n(6113);const r=n(4419);const o=n(6852);const A=n(2768);const a=n(1146);const c=n(7947);const u=s.Buffer.from([42,134,72,206,61,3,1,7]);const l=s.Buffer.from([43,129,4,0,34]);const d=s.Buffer.from([43,129,4,0,35]);const p=s.Buffer.from([43,129,4,0,10]);t.weakMap=new WeakMap;const namedCurveToJOSE=e=>{switch(e){case"prime256v1":return"P-256";case"secp384r1":return"P-384";case"secp521r1":return"P-521";case"secp256k1":return"secp256k1";default:throw new r.JOSENotSupported("Unsupported key curve for this operation")}};const getNamedCurve=(e,n)=>{var s;let g;if((0,o.isCryptoKey)(e)){g=i.KeyObject.from(e)}else if((0,A.default)(e)){g=e}else{throw new TypeError((0,a.default)(e,...c.types))}if(g.type==="secret"){throw new TypeError('only "private" or "public" type keys can be used for this operation')}switch(g.asymmetricKeyType){case"ed25519":case"ed448":return`Ed${g.asymmetricKeyType.slice(2)}`;case"x25519":case"x448":return`X${g.asymmetricKeyType.slice(1)}`;case"ec":{if(t.weakMap.has(g)){return t.weakMap.get(g)}let e=(s=g.asymmetricKeyDetails)===null||s===void 0?void 0:s.namedCurve;if(!e&&g.type==="private"){e=getNamedCurve((0,i.createPublicKey)(g),true)}else if(!e){const t=g.export({format:"der",type:"spki"});const n=t[1]<128?14:15;const s=t[n];const i=t.slice(n+1,n+1+s);if(i.equals(u)){e="prime256v1"}else if(i.equals(l)){e="secp384r1"}else if(i.equals(d)){e="secp521r1"}else if(i.equals(p)){e="secp256k1"}else{throw new r.JOSENotSupported("Unsupported key curve for this operation")}}if(n)return e;const o=namedCurveToJOSE(e);t.weakMap.set(g,o);return o}default:throw new TypeError("Invalid asymmetric key type for this operation")}};function setCurve(e,n){t.weakMap.set(e,n)}t.setCurve=setCurve;t["default"]=getNamedCurve},3170:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(6852);const r=n(3386);const o=n(1146);const A=n(7947);function getSignVerifyKey(e,t,n){if(t instanceof Uint8Array){if(!e.startsWith("HS")){throw new TypeError((0,o.default)(t,...A.types))}return(0,s.createSecretKey)(t)}if(t instanceof s.KeyObject){return t}if((0,i.isCryptoKey)(t)){(0,r.checkSigCryptoKey)(t,e,n);return s.KeyObject.from(t)}throw new TypeError((0,o.default)(t,...A.types,"Uint8Array"))}t["default"]=getSignVerifyKey},3811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function hmacDigest(e){switch(e){case"HS256":return"sha256";case"HS384":return"sha384";case"HS512":return"sha512";default:throw new s.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=hmacDigest},7947:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.types=void 0;const s=n(6852);const i=n(2768);t["default"]=e=>(0,i.default)(e)||(0,s.isCryptoKey)(e);const r=["KeyObject"];t.types=r;if(globalThis.CryptoKey||(s.default===null||s.default===void 0?void 0:s.default.CryptoKey)){r.push("CryptoKey")}},2768:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);t["default"]=i.types.isKeyObject?e=>i.types.isKeyObject(e):e=>e!=null&&e instanceof s.KeyObject},2659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4300);const i=n(6113);const r=n(518);const o=n(4419);const A=n(9302);const a=n(122);const c=n(3341);const u=n(9737);const parse=e=>{if(u.jwkImport&&e.kty!=="oct"){return e.d?(0,i.createPrivateKey)({format:"jwk",key:e}):(0,i.createPublicKey)({format:"jwk",key:e})}switch(e.kty){case"oct":{return(0,i.createSecretKey)((0,r.decode)(e.k))}case"RSA":{const t=new c.default;const n=e.d!==undefined;const r=s.Buffer.from(e.n,"base64");const o=s.Buffer.from(e.e,"base64");if(n){t.zero();t.unsignedInteger(r);t.unsignedInteger(o);t.unsignedInteger(s.Buffer.from(e.d,"base64"));t.unsignedInteger(s.Buffer.from(e.p,"base64"));t.unsignedInteger(s.Buffer.from(e.q,"base64"));t.unsignedInteger(s.Buffer.from(e.dp,"base64"));t.unsignedInteger(s.Buffer.from(e.dq,"base64"));t.unsignedInteger(s.Buffer.from(e.qi,"base64"))}else{t.unsignedInteger(r);t.unsignedInteger(o)}const A=t.end();const u={key:A,format:"der",type:"pkcs1"};const l=n?(0,i.createPrivateKey)(u):(0,i.createPublicKey)(u);(0,a.setModulusLength)(l,r.length<<3);return l}case"EC":{const t=new c.default;const n=e.d!==undefined;const r=s.Buffer.concat([s.Buffer.alloc(1,4),s.Buffer.from(e.x,"base64"),s.Buffer.from(e.y,"base64")]);if(n){t.zero();const n=new c.default;n.oidFor("ecPublicKey");n.oidFor(e.crv);t.add(n.end());const o=new c.default;o.one();o.octStr(s.Buffer.from(e.d,"base64"));const a=new c.default;a.bitStr(r);const u=a.end(s.Buffer.from([161]));o.add(u);const l=o.end();const d=new c.default;d.add(l);const p=d.end(s.Buffer.from([4]));t.add(p);const g=t.end();const h=(0,i.createPrivateKey)({key:g,format:"der",type:"pkcs8"});(0,A.setCurve)(h,e.crv);return h}const o=new c.default;o.oidFor("ecPublicKey");o.oidFor(e.crv);t.add(o.end());t.bitStr(r);const a=t.end();const u=(0,i.createPublicKey)({key:a,format:"der",type:"spki"});(0,A.setCurve)(u,e.crv);return u}case"OKP":{const t=new c.default;const n=e.d!==undefined;if(n){t.zero();const n=new c.default;n.oidFor(e.crv);t.add(n.end());const r=new c.default;r.octStr(s.Buffer.from(e.d,"base64"));const o=r.end(s.Buffer.from([4]));t.add(o);const A=t.end();return(0,i.createPrivateKey)({key:A,format:"der",type:"pkcs8"})}const r=new c.default;r.oidFor(e.crv);t.add(r.end());t.bitStr(s.Buffer.from(e.x,"base64"));const o=t.end();return(0,i.createPublicKey)({key:o,format:"der",type:"spki"})}default:throw new o.JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}};t["default"]=parse},997:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(518);const r=n(3888);const o=n(4419);const A=n(9302);const a=n(6852);const c=n(2768);const u=n(1146);const l=n(7947);const d=n(9737);const keyToJWK=e=>{let t;if((0,a.isCryptoKey)(e)){if(!e.extractable){throw new TypeError("CryptoKey is not extractable")}t=s.KeyObject.from(e)}else if((0,c.default)(e)){t=e}else if(e instanceof Uint8Array){return{kty:"oct",k:(0,i.encode)(e)}}else{throw new TypeError((0,u.default)(e,...l.types,"Uint8Array"))}if(d.jwkExport){if(t.type!=="secret"&&!["rsa","ec","ed25519","x25519","ed448","x448"].includes(t.asymmetricKeyType)){throw new o.JOSENotSupported("Unsupported key asymmetricKeyType")}return t.export({format:"jwk"})}switch(t.type){case"secret":return{kty:"oct",k:(0,i.encode)(t.export())};case"private":case"public":{switch(t.asymmetricKeyType){case"rsa":{const e=t.export({format:"der",type:"pkcs1"});const n=new r.default(e);if(t.type==="private"){n.unsignedInteger()}const s=(0,i.encode)(n.unsignedInteger());const o=(0,i.encode)(n.unsignedInteger());let A;if(t.type==="private"){A={d:(0,i.encode)(n.unsignedInteger()),p:(0,i.encode)(n.unsignedInteger()),q:(0,i.encode)(n.unsignedInteger()),dp:(0,i.encode)(n.unsignedInteger()),dq:(0,i.encode)(n.unsignedInteger()),qi:(0,i.encode)(n.unsignedInteger())}}n.end();return{kty:"RSA",n:s,e:o,...A}}case"ec":{const e=(0,A.default)(t);let n;let r;let a;switch(e){case"secp256k1":n=64;r=31+2;a=-1;break;case"P-256":n=64;r=34+2;a=-1;break;case"P-384":n=96;r=33+2;a=-3;break;case"P-521":n=132;r=33+2;a=-3;break;default:throw new o.JOSENotSupported("Unsupported curve")}if(t.type==="public"){const s=t.export({type:"spki",format:"der"});return{kty:"EC",crv:e,x:(0,i.encode)(s.subarray(-n,-n/2)),y:(0,i.encode)(s.subarray(-n/2))}}const c=t.export({type:"pkcs8",format:"der"});if(c.length<100){r+=a}return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(c.subarray(r,r+n/2))}}case"ed25519":case"x25519":{const e=(0,A.default)(t);if(t.type==="public"){const n=t.export({type:"spki",format:"der"});return{kty:"OKP",crv:e,x:(0,i.encode)(n.subarray(-32))}}const n=t.export({type:"pkcs8",format:"der"});return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(n.subarray(-32))}}case"ed448":case"x448":{const e=(0,A.default)(t);if(t.type==="public"){const n=t.export({type:"spki",format:"der"});return{kty:"OKP",crv:e,x:(0,i.encode)(n.subarray(e==="Ed448"?-57:-56))}}const n=t.export({type:"pkcs8",format:"der"});return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(n.subarray(e==="Ed448"?-57:-56))}}default:throw new o.JOSENotSupported("Unsupported key asymmetricKeyType")}}default:throw new o.JOSENotSupported("Unsupported key type")}};t["default"]=keyToJWK},2413:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(9302);const r=n(4419);const o=n(122);const A=n(9737);const a={padding:s.constants.RSA_PKCS1_PSS_PADDING,saltLength:s.constants.RSA_PSS_SALTLEN_DIGEST};const c=new Map([["ES256","P-256"],["ES256K","secp256k1"],["ES384","P-384"],["ES512","P-521"]]);function keyForCrypto(e,t){switch(e){case"EdDSA":if(!["ed25519","ed448"].includes(t.asymmetricKeyType)){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448")}return t;case"RS256":case"RS384":case"RS512":if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,o.default)(t,e);return t;case A.rsaPssParams&&"PS256":case A.rsaPssParams&&"PS384":case A.rsaPssParams&&"PS512":if(t.asymmetricKeyType==="rsa-pss"){const{hashAlgorithm:n,mgf1HashAlgorithm:s,saltLength:i}=t.asymmetricKeyDetails;const r=parseInt(e.slice(-3),10);if(n!==undefined&&(n!==`sha${r}`||s!==n)){throw new TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}`)}if(i!==undefined&&i>r>>3){throw new TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}`)}}else if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss")}(0,o.default)(t,e);return{key:t,...a};case!A.rsaPssParams&&"PS256":case!A.rsaPssParams&&"PS384":case!A.rsaPssParams&&"PS512":if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,o.default)(t,e);return{key:t,...a};case"ES256":case"ES256K":case"ES384":case"ES512":{if(t.asymmetricKeyType!=="ec"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be ec")}const n=(0,i.default)(t);const s=c.get(e);if(n!==s){throw new TypeError(`Invalid key curve for the algorithm, its curve must be ${s}, got ${n}`)}return{dsaEncoding:"ieee-p1363",key:t}}default:throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=keyForCrypto},6898:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.encrypt=void 0;const s=n(3837);const i=n(6113);const r=n(5770);const o=n(1691);const A=n(518);const a=n(6083);const c=n(3499);const u=n(6852);const l=n(3386);const d=n(2768);const p=n(1146);const g=n(7947);const h=(0,s.promisify)(i.pbkdf2);function getPassword(e,t){if((0,d.default)(e)){return e.export()}if(e instanceof Uint8Array){return e}if((0,u.isCryptoKey)(e)){(0,l.checkEncCryptoKey)(e,t,"deriveBits","deriveKey");return i.KeyObject.from(e).export()}throw new TypeError((0,p.default)(e,...g.types,"Uint8Array"))}const encrypt=async(e,t,n,s=2048,i=(0,r.default)(new Uint8Array(16)))=>{(0,c.default)(i);const u=(0,o.p2s)(e,i);const l=parseInt(e.slice(13,16),10)>>3;const d=getPassword(t,e);const p=await h(d,u,s,l,`sha${e.slice(8,11)}`);const g=await(0,a.wrap)(e.slice(-6),p,n);return{encryptedKey:g,p2c:s,p2s:(0,A.encode)(i)}};t.encrypt=encrypt;const decrypt=async(e,t,n,s,i)=>{(0,c.default)(i);const r=(0,o.p2s)(e,i);const A=parseInt(e.slice(13,16),10)>>3;const u=getPassword(t,e);const l=await h(u,r,s,A,`sha${e.slice(8,11)}`);return(0,a.unwrap)(e.slice(-6),l,n)};t.decrypt=decrypt},5770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=n(6113);Object.defineProperty(t,"default",{enumerable:true,get:function(){return s.randomFillSync}})},9526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.encrypt=void 0;const s=n(6113);const i=n(122);const r=n(6852);const o=n(3386);const A=n(2768);const a=n(1146);const c=n(7947);const checkKey=(e,t)=>{if(e.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,i.default)(e,t)};const resolvePadding=e=>{switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return s.constants.RSA_PKCS1_OAEP_PADDING;case"RSA1_5":return s.constants.RSA_PKCS1_PADDING;default:return undefined}};const resolveOaepHash=e=>{switch(e){case"RSA-OAEP":return"sha1";case"RSA-OAEP-256":return"sha256";case"RSA-OAEP-384":return"sha384";case"RSA-OAEP-512":return"sha512";default:return undefined}};function ensureKeyObject(e,t,...n){if((0,A.default)(e)){return e}if((0,r.isCryptoKey)(e)){(0,o.checkEncCryptoKey)(e,t,...n);return s.KeyObject.from(e)}throw new TypeError((0,a.default)(e,...c.types))}const encrypt=(e,t,n)=>{const i=resolvePadding(e);const r=resolveOaepHash(e);const o=ensureKeyObject(t,e,"wrapKey","encrypt");checkKey(o,e);return(0,s.publicEncrypt)({key:o,oaepHash:r,padding:i},n)};t.encrypt=encrypt;const decrypt=(e,t,n)=>{const i=resolvePadding(e);const r=resolveOaepHash(e);const o=ensureKeyObject(t,e,"unwrapKey","decrypt");checkKey(o,e);return(0,s.privateDecrypt)({key:o,oaepHash:r,padding:i},n)};t.decrypt=decrypt},1622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]="node:crypto"},9935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);const r=n(4965);const o=n(3811);const A=n(2413);const a=n(3170);let c;if(s.sign.length>3){c=(0,i.promisify)(s.sign)}else{c=s.sign}const sign=async(e,t,n)=>{const i=(0,a.default)(e,t,"sign");if(e.startsWith("HS")){const t=s.createHmac((0,o.default)(e),i);t.update(n);return t.digest()}return c((0,r.default)(e),n,(0,A.default)(e,i))};t["default"]=sign},5390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=s.timingSafeEqual;t["default"]=i},3569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);const r=n(4965);const o=n(2413);const A=n(9935);const a=n(3170);const c=n(9737);let u;if(s.verify.length>4&&c.oneShotCallback){u=(0,i.promisify)(s.verify)}else{u=s.verify}const verify=async(e,t,n,i)=>{const c=(0,a.default)(e,t,"verify");if(e.startsWith("HS")){const t=await(0,A.default)(e,c,i);const r=n;try{return s.timingSafeEqual(r,t)}catch{return false}}const l=(0,r.default)(e);const d=(0,o.default)(e,c);try{return await u(l,i,d,n)}catch{return false}};t["default"]=verify},6852:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isCryptoKey=void 0;const s=n(6113);const i=n(3837);const r=s.webcrypto;t["default"]=r;t.isCryptoKey=i.types.isCryptoKey?e=>i.types.isCryptoKey(e):e=>false},7022:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.deflate=t.inflate=void 0;const s=n(3837);const i=n(9796);const r=(0,s.promisify)(i.inflateRaw);const o=(0,s.promisify)(i.deflateRaw);const inflate=e=>r(e);t.inflate=inflate;const deflate=e=>o(e);t.deflate=deflate},3238:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=void 0;const s=n(518);t.encode=s.encode;t.decode=s.decode},5611:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decodeJwt=void 0;const s=n(3238);const i=n(1691);const r=n(9127);const o=n(4419);function decodeJwt(e){if(typeof e!=="string")throw new o.JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:n}=e.split(".");if(n===5)throw new o.JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");if(n!==3)throw new o.JWTInvalid("Invalid JWT");if(!t)throw new o.JWTInvalid("JWTs must contain a payload");let A;try{A=(0,s.decode)(t)}catch{throw new o.JWTInvalid("Failed to base64url decode the payload")}let a;try{a=JSON.parse(i.decoder.decode(A))}catch{throw new o.JWTInvalid("Failed to parse the decoded payload as JSON")}if(!(0,r.default)(a))throw new o.JWTInvalid("Invalid JWT Claims Set");return a}t.decodeJwt=decodeJwt},3991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decodeProtectedHeader=void 0;const s=n(3238);const i=n(1691);const r=n(9127);function decodeProtectedHeader(e){let t;if(typeof e==="string"){const n=e.split(".");if(n.length===3||n.length===5){[t]=n}}else if(typeof e==="object"&&e){if("protected"in e){t=e.protected}else{throw new TypeError("Token does not contain a Protected Header")}}try{if(typeof t!=="string"||!t){throw new Error}const e=JSON.parse(i.decoder.decode((0,s.decode)(t)));if(!(0,r.default)(e)){throw new Error}return e}catch{throw new TypeError("Invalid Token or Protected Header formatting")}}t.decodeProtectedHeader=decodeProtectedHeader},4419:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JWSSignatureVerificationFailed=t.JWKSTimeout=t.JWKSMultipleMatchingKeys=t.JWKSNoMatchingKey=t.JWKSInvalid=t.JWKInvalid=t.JWTInvalid=t.JWSInvalid=t.JWEInvalid=t.JWEDecryptionFailed=t.JOSENotSupported=t.JOSEAlgNotAllowed=t.JWTExpired=t.JWTClaimValidationFailed=t.JOSEError=void 0;class JOSEError extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e);this.code="ERR_JOSE_GENERIC";this.name=this.constructor.name;(t=Error.captureStackTrace)===null||t===void 0?void 0:t.call(Error,this,this.constructor)}}t.JOSEError=JOSEError;class JWTClaimValidationFailed extends JOSEError{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t="unspecified",n="unspecified"){super(e);this.code="ERR_JWT_CLAIM_VALIDATION_FAILED";this.claim=t;this.reason=n}}t.JWTClaimValidationFailed=JWTClaimValidationFailed;class JWTExpired extends JOSEError{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t="unspecified",n="unspecified"){super(e);this.code="ERR_JWT_EXPIRED";this.claim=t;this.reason=n}}t.JWTExpired=JWTExpired;class JOSEAlgNotAllowed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}t.JOSEAlgNotAllowed=JOSEAlgNotAllowed;class JOSENotSupported extends JOSEError{constructor(){super(...arguments);this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}t.JOSENotSupported=JOSENotSupported;class JWEDecryptionFailed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWE_DECRYPTION_FAILED";this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}t.JWEDecryptionFailed=JWEDecryptionFailed;class JWEInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}t.JWEInvalid=JWEInvalid;class JWSInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}t.JWSInvalid=JWSInvalid;class JWTInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}t.JWTInvalid=JWTInvalid;class JWKInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}t.JWKInvalid=JWKInvalid;class JWKSInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}t.JWKSInvalid=JWKSInvalid;class JWKSNoMatchingKey extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_NO_MATCHING_KEY";this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}t.JWKSNoMatchingKey=JWKSNoMatchingKey;class JWKSMultipleMatchingKeys extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}t.JWKSMultipleMatchingKeys=JWKSMultipleMatchingKeys;Symbol.asyncIterator;class JWKSTimeout extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_TIMEOUT";this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}t.JWKSTimeout=JWKSTimeout;class JWSSignatureVerificationFailed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}t.JWSSignatureVerificationFailed=JWSSignatureVerificationFailed},1173:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(1622);t["default"]=s.default},7426:(e,t,n)=>{ /*! * mime-db * Copyright(c) 2014 Jonathan Ong diff --git a/.github/actions/invite-user/src/Action.ts b/.github/actions/invite-user/src/Action.ts index 07bb9023..f2f9e703 100644 --- a/.github/actions/invite-user/src/Action.ts +++ b/.github/actions/invite-user/src/Action.ts @@ -77,7 +77,7 @@ export default class Action { userID: user.id, roleIDs: roleIDs }) - if (existingUser) { + if (!existingUser) { await this.userClient.sendChangePasswordEmail({ email: user.email }) this.logger.log(`${user.id} (${user.email}) has been invited.`) } else { From 8eff108fa024110aca1059961d9555a210580b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Thu, 2 Nov 2023 18:06:15 +0100 Subject: [PATCH 20/53] Logs name instead of user ID --- .github/actions/invite-user/dist/index.js | 2 +- .github/actions/invite-user/src/Action.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/invite-user/dist/index.js b/.github/actions/invite-user/dist/index.js index 96ae0374..80c24870 100644 --- a/.github/actions/invite-user/dist/index.js +++ b/.github/actions/invite-user/dist/index.js @@ -1,4 +1,4 @@ -(()=>{var __webpack_modules__={3658:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});class Action{constructor(e){this.stateStore=e.stateStore;this.logger=e.logger;this.userClient=e.userClient;this.passwordGenerator=e.passwordGenerator;this.roleNameParser=e.roleNameParser}run(e){return n(this,void 0,void 0,(function*(){if(!this.stateStore.isPost){yield this.runMain(e);this.stateStore.isPost=true}}))}runMain(e){return n(this,void 0,void 0,(function*(){if(!e.name||e.name.length==0){throw new Error("No name supplied.")}if(!e.email||e.email.length==0){throw new Error("No e-mail supplied.")}if(!e.roles||e.roles.length==0){throw new Error("No roles supplied.")}const t=this.roleNameParser.parse(e.roles);if(t.length==0){throw new Error("No roles supplied.")}const n=yield this.userClient.getUser({email:e.email});let s=n;if(!n){const t=this.passwordGenerator.generatePassword();const n=yield this.userClient.createUser({name:e.name,email:e.email,password:t});s=n}if(!s){throw new Error("Could not get an existing user or create a new user.")}const i=yield this.userClient.createRoles({roleNames:t});if(i.length==0){throw new Error("Received an empty set of roles.")}const r=i.map((e=>e.id));yield this.userClient.assignRolesToUser({userID:s.id,roleIDs:r});if(!n){yield this.userClient.sendChangePasswordEmail({email:s.email});this.logger.log(`${s.id} (${s.email}) has been invited.`)}else{this.logger.log(`${s.id} (${s.email}) has been updated.`)}}))}}t["default"]=Action},8245:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(n(2186));class Logger{log(e){console.log(e)}error(e){o.setFailed(e)}}t["default"]=Logger},2127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class PasswordGenerator{generatePassword(){let e="";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$";const n=18;for(let s=1;s<=n;s++){const n=Math.floor(Math.random()*t.length+1);e+=t.charAt(n)}return e}}t["default"]=PasswordGenerator},3834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class RoleNameParser{parse(e){return e.split(",").map((e=>e.trim().toLowerCase())).filter((e=>e.length>0))}}t["default"]=RoleNameParser},9531:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n={IS_POST:"isPost"};class KeyValueStateStore{constructor(e){this.writerReader=e;this.isPost=false}get isPost(){return!!this.writerReader.getState(n.IS_POST)}set isPost(e){this.writerReader.saveState(n.IS_POST,e)}}t["default"]=KeyValueStateStore},1485:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=i(n(8757));const o=n(4712);class Auth0UserClient{constructor(e){this.config=e;this.managementClient=new o.ManagementClient({domain:e.domain,clientId:e.clientId,clientSecret:e.clientSecret})}getUser(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.usersByEmail.getByEmail({email:e.email});if(t.data.length==0){return null}const n=t.data[0];return{id:n.user_id,email:n.email}}))}createUser(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.users.create({connection:"Username-Password-Authentication",name:e.name,email:e.email,email_verified:true,password:e.password,app_metadata:{has_pending_invitation:true}});return{id:t.data.user_id,email:t.data.email}}))}createRoles(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.roles.getAll();const n=t.data;const s=n.filter((t=>e.roleNames.includes(t.name))).map((e=>({id:e.id,name:e.name})));const i=e.roleNames.filter((e=>{const t=s.find((t=>t.name==e));return t==null}));const r=yield Promise.all(i.map((e=>this.managementClient.roles.create({name:e}))));const o=r.map((e=>({id:e.data.id,name:e.data.name})));return s.concat(o)}))}assignRolesToUser(e){return s(this,void 0,void 0,(function*(){yield this.managementClient.users.assignRoles({id:e.userID},{roles:e.roleIDs})}))}sendChangePasswordEmail(e){return s(this,void 0,void 0,(function*(){const t=yield this.getToken();yield r.default.post(this.getURL("/dbconnections/change_password"),{email:e.email,connection:"Username-Password-Authentication"},{headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}})}))}getToken(){return s(this,void 0,void 0,(function*(){const e=yield r.default.post(this.getURL("/oauth/token"),{grant_type:"client_credentials",client_id:this.config.clientId,client_secret:this.config.clientSecret,audience:`https://${this.config.domain}/api/v2/`},{headers:{"Content-Type":"application/x-www-form-urlencoded"}});return e.data.access_token}))}getURL(e){return`https://${this.config.domain}${e}`}}t["default"]=Auth0UserClient},8873:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(n(2186));function getOptions(){return{name:o.getInput("name"),email:o.getInput("email"),roles:o.getInput("roles")}}t["default"]=getOptions},4822:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const A=r(n(2186));const a=o(n(3658));const c=o(n(1485));const u=o(n(8873));const l=o(n(8245));const d=o(n(9531));const p=o(n(2127));const g=o(n(3834));const{AUTH0_MANAGEMENT_CLIENT_ID:h,AUTH0_MANAGEMENT_CLIENT_SECRET:f,AUTH0_MANAGEMENT_CLIENT_DOMAIN:E}=process.env;if(!h||h.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}else if(!f||f.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}else if(!E||E.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}const m=new d.default(A);const C=new l.default;const Q=new c.default({clientId:h,clientSecret:f,domain:E});const I=new p.default;const B=new g.default;const y=new a.default({stateStore:m,logger:C,userClient:Q,passwordGenerator:I,roleNameParser:B});y.run((0,u.default)()).catch((e=>{C.error(e.toString())}))},7351:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=r(n(2037));const A=n(5278);function issueCommand(e,t,n){const s=new Command(e,t,n);process.stdout.write(s.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const a="::";class Command{constructor(e,t,n){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=n}toString(){let e=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const s=this.properties[n];if(s){if(t){t=false}else{e+=","}e+=`${n}=${escapeProperty(s)}`}}}}e+=`${a}${escapeData(this.message)}`;return e}}function escapeData(e){return A.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return A.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const A=n(7351);const a=n(717);const c=n(5278);const u=r(n(2037));const l=r(n(1017));const d=n(8041);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const n=c.toCommandValue(t);process.env[e]=n;const s=process.env["GITHUB_ENV"]||"";if(s){return a.issueFileCommand("ENV",a.prepareKeyValueMessage(e,t))}A.issueCommand("set-env",{name:e},n)}t.exportVariable=exportVariable;function setSecret(e){A.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){a.issueFileCommand("PATH",e)}else{A.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${l.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const n=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!n){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return n}return n.trim()}t.getInput=getInput;function getMultilineInput(e,t){const n=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return n}return n.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const n=["true","True","TRUE"];const s=["false","False","FALSE"];const i=getInput(e,t);if(n.includes(i))return true;if(s.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const n=process.env["GITHUB_OUTPUT"]||"";if(n){return a.issueFileCommand("OUTPUT",a.prepareKeyValueMessage(e,t))}process.stdout.write(u.EOL);A.issueCommand("set-output",{name:e},c.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){A.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){A.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){A.issueCommand("error",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){A.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){A.issueCommand("notice",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){A.issue("group",e)}t.startGroup=startGroup;function endGroup(){A.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let n;try{n=yield t()}finally{endGroup()}return n}))}t.group=group;function saveState(e,t){const n=process.env["GITHUB_STATE"]||"";if(n){return a.issueFileCommand("STATE",a.prepareKeyValueMessage(e,t))}A.issueCommand("save-state",{name:e},c.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var g=n(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return g.summary}});var h=n(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return h.markdownSummary}});var f=n(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return f.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return f.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return f.toPlatformPath}})},717:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=r(n(7147));const A=r(n(2037));const a=n(5840);const c=n(5278);function issueFileCommand(e,t){const n=process.env[`GITHUB_${e}`];if(!n){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!o.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}o.appendFileSync(n,`${c.toCommandValue(t)}${A.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const n=`ghadelimiter_${a.v4()}`;const s=c.toCommandValue(t);if(e.includes(n)){throw new Error(`Unexpected input: name should not contain the delimiter "${n}"`)}if(s.includes(n)){throw new Error(`Unexpected input: value should not contain the delimiter "${n}"`)}return`${e}<<${n}${A.EOL}${s}${A.EOL}${n}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const i=n(6255);const r=n(5526);const o=n(2186);class OidcClient{static createHttpClient(e=true,t=10){const n={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new r.BearerCredentialHandler(OidcClient.getRequestToken())],n)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return s(this,void 0,void 0,(function*(){const n=OidcClient.createHttpClient();const s=yield n.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const i=(t=s.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return s(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const n=encodeURIComponent(e);t=`${t}&audience=${n}`}o.debug(`ID token url is ${t}`);const n=yield OidcClient.getCall(t);o.setSecret(n);return n}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=r(n(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,o.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const i=n(2037);const r=n(7147);const{access:o,appendFile:A,writeFile:a}=r.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return s(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield o(e,r.constants.R_OK|r.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,n={}){const s=Object.entries(n).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${s}>`}return`<${e}${s}>${t}`}write(e){return s(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const n=yield this.filePath();const s=t?a:A;yield s(n,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return s(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(i.EOL)}addCodeBlock(e,t){const n=Object.assign({},t&&{lang:t});const s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,t=false){const n=t?"ol":"ul";const s=e.map((e=>this.wrap("li",e))).join("");const i=this.wrap(n,s);return this.addRaw(i).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:n,colspan:s,rowspan:i}=e;const r=t?"th":"td";const o=Object.assign(Object.assign({},s&&{colspan:s}),i&&{rowspan:i});return this.wrap(r,n,o)})).join("");return this.wrap("tr",t)})).join("");const n=this.wrap("table",t);return this.addRaw(n).addEOL()}addDetails(e,t){const n=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(n).addEOL()}addImage(e,t,n){const{width:s,height:i}=n||{};const r=Object.assign(Object.assign({},s&&{width:s}),i&&{height:i});const o=this.wrap("img",null,Object.assign({src:e,alt:t},r));return this.addRaw(o).addEOL()}addHeading(e,t){const n=`h${t}`;const s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1";const i=this.wrap(s,e);return this.addRaw(i).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const n=Object.assign({},t&&{cite:t});const s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,t){const n=this.wrap("a",e,{href:t});return this.addRaw(n).addEOL()}}const c=new Summary;t.markdownSummary=c;t.summary=c},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},5526:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const A=r(n(3685));const a=r(n(5687));const c=r(n(9835));const u=r(n(4294));const l=n(1773);var d;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(d||(t.HttpCodes=d={}));var p;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(p||(t.Headers=p={}));var g;(function(e){e["ApplicationJson"]="application/json"})(g||(t.MediaTypes=g={}));function getProxyUrl(e){const t=c.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const f=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const E=["OPTIONS","GET","DELETE","HEAD"];const m=10;const C=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return o(this,void 0,void 0,(function*(){return new Promise((e=>o(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return o(this,void 0,void 0,(function*(){return new Promise((e=>o(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,n||{})}))}patch(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,n||{})}))}put(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,n||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,n,s){return o(this,void 0,void 0,(function*(){return this.request(e,t,n,s)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[p.Accept]=this._getExistingOrDefaultHeader(t,p.Accept,g.ApplicationJson);const n=yield this.get(e,t);return this._processResponse(n,this.requestOptions)}))}postJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.post(e,s,n);return this._processResponse(i,this.requestOptions)}))}putJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.put(e,s,n);return this._processResponse(i,this.requestOptions)}))}patchJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.patch(e,s,n);return this._processResponse(i,this.requestOptions)}))}request(e,t,n,s){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const i=new URL(t);let r=this._prepareRequest(e,i,s);const o=this._allowRetries&&E.includes(e)?this._maxRetries+1:1;let A=0;let a;do{a=yield this.requestRaw(r,n);if(a&&a.message&&a.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(a)){e=t;break}}if(e){return e.handleAuthentication(this,r,n)}else{return a}}let t=this._maxRedirects;while(a.message.statusCode&&h.includes(a.message.statusCode)&&this._allowRedirects&&t>0){const o=a.message.headers["location"];if(!o){break}const A=new URL(o);if(i.protocol==="https:"&&i.protocol!==A.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield a.readBody();if(A.hostname!==i.hostname){for(const e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}r=this._prepareRequest(e,A,s);a=yield this.requestRaw(r,n);t--}if(!a.message.statusCode||!f.includes(a.message.statusCode)){return a}A+=1;if(A{function callbackForResult(e,t){if(e){s(e)}else if(!t){s(new Error("Unknown error"))}else{n(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,n){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let s=false;function handleResult(e,t){if(!s){s=true;n(e,t)}}const i=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let r;i.on("socket",(e=>{r=e}));i.setTimeout(this._socketTimeout||3*6e4,(()=>{if(r){r.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));i.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){i.end()}));t.pipe(i)}else{i.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const n=c.getProxyUrl(t);const s=n&&n.hostname;if(!s){return}return this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){const s={};s.parsedUrl=t;const i=s.parsedUrl.protocol==="https:";s.httpModule=i?a:A;const r=i?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):r;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(n);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(s.options)}}return s}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,n){let s;if(this.requestOptions&&this.requestOptions.headers){s=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||s||n}_getAgent(e){let t;const n=c.getProxyUrl(e);const s=n&&n.hostname;if(this._keepAlive&&s){t=this._proxyAgent}if(this._keepAlive&&!s){t=this._agent}if(t){return t}const i=e.protocol==="https:";let r=100;if(this.requestOptions){r=this.requestOptions.maxSockets||A.globalAgent.maxSockets}if(n&&n.hostname){const e={maxSockets:r,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})};let s;const o=n.protocol==="https:";if(i){s=o?u.httpsOverHttps:u.httpsOverHttp}else{s=o?u.httpOverHttps:u.httpOverHttp}t=s(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:r};t=i?new a.Agent(e):new A.Agent(e);this._agent=t}if(!t){t=i?a.globalAgent:A.globalAgent}if(i&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let n;if(this._keepAlive){n=this._proxyAgentDispatcher}if(n){return n}const s=e.protocol==="https:";n=new l.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`${t.username}:${t.password}`}));this._proxyAgentDispatcher=n;if(s&&this._ignoreSslError){n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:false})}return n}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(m,e);const t=C*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((n,s)=>o(this,void 0,void 0,(function*(){const i=e.message.statusCode||0;const r={statusCode:i,result:null,headers:{}};if(i===d.NotFound){n(r)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let A;try{A=yield e.readBody();if(A&&A.length>0){if(t&&t.deserializeDates){o=JSON.parse(A,dateTimeDeserializer)}else{o=JSON.parse(A)}r.result=o}r.headers=e.message.headers}catch(e){}if(i>299){let e;if(o&&o.message){e=o.message}else if(A&&A.length>0){e=A}else{e=`Failed request: (${i})`}const t=new HttpClientError(e,i);t.result=r.result;s(t)}else{n(r)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const n=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(n){try{return new URL(n)}catch(e){if(!n.startsWith("http://")&&!n.startsWith("https://"))return new URL(`http://${n}`)}}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const n=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!n){return false}let s;if(e.port){s=Number(e.port)}else if(e.protocol==="http:"){s=80}else if(e.protocol==="https:"){s=443}const i=[e.hostname.toUpperCase()];if(typeof s==="number"){i.push(`${i[0]}:${s}`)}for(const e of n.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||i.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}},2856:(e,t,n)=>{"use strict";const s=n(4492).Writable;const i=n(7261).inherits;const r=n(8534);const o=n(8710);const A=n(333);const a=45;const c=Buffer.from("-");const u=Buffer.from("\r\n");const EMPTY_FN=function(){};function Dicer(e){if(!(this instanceof Dicer)){return new Dicer(e)}s.call(this,e);if(!e||!e.headerFirst&&typeof e.boundary!=="string"){throw new TypeError("Boundary required")}if(typeof e.boundary==="string"){this.setBoundary(e.boundary)}else{this._bparser=undefined}this._headerFirst=e.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:e.partHwm};this._pause=false;const t=this;this._hparser=new A(e);this._hparser.on("header",(function(e){t._inHeader=false;t._part.emit("header",e)}))}i(Dicer,s);Dicer.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){const e=this;process.nextTick((function(){e.emit("error",new Error("Unexpected end of multipart data"));if(e._part&&!e._ignoreData){const t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data"));e._part.push(null);process.nextTick((function(){e._realFinish=true;e.emit("finish");e._realFinish=false}));return}e._realFinish=true;e.emit("finish");e._realFinish=false}))}}else{s.prototype.emit.apply(this,arguments)}};Dicer.prototype._write=function(e,t,n){if(!this._hparser&&!this._bparser){return n()}if(this._headerFirst&&this._isPreamble){if(!this._part){this._part=new o(this._partOpts);if(this._events.preamble){this.emit("preamble",this._part)}else{this._ignore()}}const t=this._hparser.push(e);if(!this._inHeader&&t!==undefined&&t{"use strict";const s=n(5673).EventEmitter;const i=n(7261).inherits;const r=n(9692);const o=n(8534);const A=Buffer.from("\r\n\r\n");const a=/\r\n/g;const c=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function HeaderParser(e){s.call(this);e=e||{};const t=this;this.nread=0;this.maxed=false;this.npairs=0;this.maxHeaderPairs=r(e,"maxHeaderPairs",2e3);this.maxHeaderSize=r(e,"maxHeaderSize",80*1024);this.buffer="";this.header={};this.finished=false;this.ss=new o(A);this.ss.on("info",(function(e,n,s,i){if(n&&!t.maxed){if(t.nread+i-s>=t.maxHeaderSize){i=t.maxHeaderSize-t.nread+s;t.nread=t.maxHeaderSize;t.maxed=true}else{t.nread+=i-s}t.buffer+=n.toString("binary",s,i)}if(e){t._finish()}}))}i(HeaderParser,s);HeaderParser.prototype.push=function(e){const t=this.ss.push(e);if(this.finished){return t}};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 e=this.header;this.header={};this.buffer="";this.finished=true;this.nread=this.npairs=0;this.maxed=false;this.emit("header",e)};HeaderParser.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs){return}const e=this.buffer.split(a);const t=e.length;let n,s;for(var i=0;i{"use strict";const s=n(7261).inherits;const i=n(4492).Readable;function PartStream(e){i.call(this,e)}s(PartStream,i);PartStream.prototype._read=function(e){};e.exports=PartStream},8534:(e,t,n)=>{"use strict";const s=n(5673).EventEmitter;const i=n(7261).inherits;function SBMH(e){if(typeof e==="string"){e=Buffer.from(e)}if(!Buffer.isBuffer(e)){throw new TypeError("The needle has to be a String or a Buffer.")}const t=e.length;if(t===0){throw new Error("The needle cannot be an empty String/Buffer.")}if(t>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(t);this._lookbehind_size=0;this._needle=e;this._bufpos=0;this._lookbehind=Buffer.alloc(t);for(var n=0;n=0){this.emit("info",false,this._lookbehind,0,this._lookbehind_size);this._lookbehind_size=0}else{const n=this._lookbehind_size+r;if(n>0){this.emit("info",false,this._lookbehind,0,n)}this._lookbehind.copy(this._lookbehind,0,n,this._lookbehind_size-n);this._lookbehind_size-=n;e.copy(this._lookbehind,this._lookbehind_size);this._lookbehind_size+=t;this._bufpos=t;return t}}r+=(r>=0)*this._bufpos;if(e.indexOf(n,r)!==-1){r=e.indexOf(n,r);++this.matches;if(r>0){this.emit("info",true,e,this._bufpos,r)}else{this.emit("info",true)}return this._bufpos=r+s}else{r=t-s}while(r0){this.emit("info",false,e,this._bufpos,r{"use strict";const s=n(4492).Writable;const{inherits:i}=n(7261);const r=n(2856);const o=n(415);const A=n(6780);const a=n(4426);function Busboy(e){if(!(this instanceof Busboy)){return new Busboy(e)}if(typeof e!=="object"){throw new TypeError("Busboy expected an options-Object.")}if(typeof e.headers!=="object"){throw new TypeError("Busboy expected an options-Object with headers-attribute.")}if(typeof e.headers["content-type"]!=="string"){throw new TypeError("Missing Content-Type-header.")}const{headers:t,...n}=e;this.opts={autoDestroy:false,...n};s.call(this,this.opts);this._done=false;this._parser=this.getParserByHeaders(t);this._finished=false}i(Busboy,s);Busboy.prototype.emit=function(e){if(e==="finish"){if(!this._done){this._parser?.end();return}else if(this._finished){return}this._finished=true}s.prototype.emit.apply(this,arguments)};Busboy.prototype.getParserByHeaders=function(e){const t=a(e["content-type"]);const n={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:t,preservePath:this.opts.preservePath};if(o.detect.test(t[0])){return new o(this,n)}if(A.detect.test(t[0])){return new A(this,n)}throw new Error("Unsupported Content-Type.")};Busboy.prototype._write=function(e,t,n){this._parser.write(e,n)};e.exports=Busboy;e.exports["default"]=Busboy;e.exports.Busboy=Busboy;e.exports.Dicer=r},415:(e,t,n)=>{"use strict";const{Readable:s}=n(4492);const{inherits:i}=n(7261);const r=n(2856);const o=n(4426);const A=n(9136);const a=n(496);const c=n(9692);const u=/^boundary$/i;const l=/^form-data$/i;const d=/^charset$/i;const p=/^filename$/i;const g=/^name$/i;Multipart.detect=/^multipart\/form-data/i;function Multipart(e,t){let n;let s;const i=this;let h;const f=t.limits;const E=t.isPartAFile||((e,t,n)=>t==="application/octet-stream"||n!==undefined);const m=t.parsedConType||[];const C=t.defCharset||"utf8";const Q=t.preservePath;const I={highWaterMark:t.fileHwm};for(n=0,s=m.length;nR){i.parser.removeListener("part",onPart);i.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(N){const e=N;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(r){let c;let u;let h;let f;let m;let R;let v=0;if(r["content-type"]){h=o(r["content-type"][0]);if(h[0]){c=h[0].toLowerCase();for(n=0,s=h.length;ny){const s=y-v+e.length;if(s>0){n.push(e.slice(0,s))}n.truncated=true;n.bytesRead=y;t.removeAllListeners("data");n.emit("limit");return}else if(!n.push(e)){i._pause=true}n.bytesRead=v};F=function(){_=undefined;n.push(null)}}else{if(x===w){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++x;++D;let n="";let s=false;N=t;k=function(e){if((v+=e.length)>B){const i=B-(v-e.length);n+=e.toString("binary",0,i);s=true;t.removeAllListeners("data")}else{n+=e.toString("binary")}};F=function(){N=undefined;if(n.length){n=A(n,"binary",f)}e.emit("field",u,n,false,s,m,c);--D;checkFinished()}}t._readableState.sync=false;t.on("data",k);t.on("end",F)})).on("error",(function(e){if(_){_.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){F=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const n=this.parser.write(e);if(n&&!this._pause){t()}else{this._needDrain=!n;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){s.call(this,e);this.bytesRead=0;this.truncated=false}i(FileStream,s);FileStream.prototype._read=function(e){};e.exports=Multipart},6780:(e,t,n)=>{"use strict";const s=n(9730);const i=n(9136);const r=n(9692);const o=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const n=t.limits;const i=t.parsedConType;this.boy=e;this.fieldSizeLimit=r(n,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=r(n,"fieldNameSize",100);this.fieldsLimit=r(n,"fields",Infinity);let A;for(var a=0,c=i.length;ao){this._key+=this.decoder.write(e.toString("binary",o,n))}this._state="val";this._hitLimit=false;this._checkingBytes=true;this._val="";this._bytesVal=0;this._valTrunc=false;this.decoder.reset();o=n+1}else if(s!==undefined){++this._fields;let n;const r=this._keyTrunc;if(s>o){n=this._key+=this.decoder.write(e.toString("binary",o,s))}else{n=this._key}this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();if(n.length){this.boy.emit("field",i(n,"binary",this.charset),"",r,false)}o=s+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(r>o){this._key+=this.decoder.write(e.toString("binary",o,r))}o=r;if((this._bytesKey=this._key.length)===this.fieldNameSizeLimit){this._checkingBytes=false;this._keyTrunc=true}}else{if(oo){this._val+=this.decoder.write(e.toString("binary",o,s))}this.boy.emit("field",i(this._key,"binary",this.charset),i(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();o=s+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(r>o){this._val+=this.decoder.write(e.toString("binary",o,r))}o=r;if(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit){this._checkingBytes=false;this._valTrunc=true}}else{if(o0){this.boy.emit("field",i(this._key,"binary",this.charset),"",this._keyTrunc,false)}else if(this._state==="val"){this.boy.emit("field",i(this._key,"binary",this.charset),i(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc)}this.boy._done=true;this.boy.emit("finish")};e.exports=UrlEncoded},9730:e=>{"use strict";const t=/\+/g;const n=[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(e){e=e.replace(t," ");let s="";let i=0;let r=0;const o=e.length;for(;ir){s+=e.substring(r,i);r=i}this.buffer="";++r}}if(r{"use strict";e.exports=function basename(e){if(typeof e!=="string"){return""}for(var t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===".."||e==="."?"":e}}return e===".."||e==="."?"":e}},9136:e=>{"use strict";const t=new TextDecoder("utf-8");const n=new Map([["utf-8",t],["utf8",t]]);function decodeText(e,t,s){if(e){if(n.has(s)){try{return n.get(s).decode(Buffer.from(e,t))}catch(e){}}else{try{n.set(s,new TextDecoder(s));return n.get(s).decode(Buffer.from(e,t))}catch(e){}}}return e}e.exports=decodeText},9692:e=>{"use strict";e.exports=function getLimit(e,t,n){if(!e||e[t]===undefined||e[t]===null){return n}if(typeof e[t]!=="number"||isNaN(e[t])){throw new TypeError("Limit "+t+" is not a valid number")}return e[t]}},4426:(e,t,n)=>{"use strict";const s=n(9136);const i=/%([a-fA-F0-9]{2})/g;function encodedReplacer(e,t){return String.fromCharCode(parseInt(t,16))}function parseParams(e){const t=[];let n="key";let r="";let o=false;let A=false;let a=0;let c="";for(var u=0,l=e.length;u{e.exports={parallel:n(8210),serial:n(445),serialOrdered:n(3578)}},1700:e=>{e.exports=abort;function abort(e){Object.keys(e.jobs).forEach(clean.bind(e));e.jobs={}}function clean(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}},2794:(e,t,n)=>{var s=n(5295);e.exports=async;function async(e){var t=false;s((function(){t=true}));return function async_callback(n,i){if(t){e(n,i)}else{s((function nextTick_callback(){e(n,i)}))}}}},5295:e=>{e.exports=defer;function defer(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}},9023:(e,t,n)=>{var s=n(2794),i=n(1700);e.exports=iterate;function iterate(e,t,n,s){var r=n["keyedList"]?n["keyedList"][n.index]:n.index;n.jobs[r]=runJob(t,r,e[r],(function(e,t){if(!(r in n.jobs)){return}delete n.jobs[r];if(e){i(n)}else{n.results[r]=t}s(e,n.results)}))}function runJob(e,t,n,i){var r;if(e.length==2){r=e(n,s(i))}else{r=e(n,t,s(i))}return r}},2474:e=>{e.exports=state;function state(e,t){var n=!Array.isArray(e),s={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};if(t){s.keyedList.sort(n?t:function(n,s){return t(e[n],e[s])})}return s}},7942:(e,t,n)=>{var s=n(1700),i=n(2794);e.exports=terminator;function terminator(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;s(this);i(e)(null,this.results)}},8210:(e,t,n)=>{var s=n(9023),i=n(2474),r=n(7942);e.exports=parallel;function parallel(e,t,n){var o=i(e);while(o.index<(o["keyedList"]||e).length){s(e,t,o,(function(e,t){if(e){n(e,t);return}if(Object.keys(o.jobs).length===0){n(null,o.results);return}}));o.index++}return r.bind(o,n)}},445:(e,t,n)=>{var s=n(3578);e.exports=serial;function serial(e,t,n){return s(e,t,null,n)}},3578:(e,t,n)=>{var s=n(9023),i=n(2474),r=n(7942);e.exports=serialOrdered;e.exports.ascending=ascending;e.exports.descending=descending;function serialOrdered(e,t,n,o){var A=i(e,n);s(e,t,A,(function iteratorHandler(n,i){if(n){o(n,i);return}A.index++;if(A.index<(A["keyedList"]||e).length){s(e,t,A,iteratorHandler);return}o(null,A.results)}));return r.bind(A,o)}function ascending(e,t){return et?1:0}function descending(e,t){return-1*ascending(e,t)}},6008:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return A.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return r.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return a.default}});var s=_interopRequireDefault(n(272));var i=_interopRequireDefault(n(4867));var r=_interopRequireDefault(n(1537));var o=_interopRequireDefault(n(1453));var A=_interopRequireDefault(n(588));var a=_interopRequireDefault(n(5440));var c=_interopRequireDefault(n(2092));var u=_interopRequireDefault(n(61));var l=_interopRequireDefault(n(1855));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},1774:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("md5").update(e).digest()}var i=md5;t["default"]=i},5056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i={randomUUID:s.default.randomUUID};t["default"]=i},588:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n="00000000-0000-0000-0000-000000000000";t["default"]=n},1855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}let t;const n=new Uint8Array(16);n[0]=(t=parseInt(e.slice(0,8),16))>>>24;n[1]=t>>>16&255;n[2]=t>>>8&255;n[3]=t&255;n[4]=(t=parseInt(e.slice(9,13),16))>>>8;n[5]=t&255;n[6]=(t=parseInt(e.slice(14,18),16))>>>8;n[7]=t&255;n[8]=(t=parseInt(e.slice(19,23),16))>>>8;n[9]=t&255;n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;n[11]=t/4294967296&255;n[12]=t>>>24&255;n[13]=t>>>16&255;n[14]=t>>>8&255;n[15]=t&255;return n}var i=parse;t["default"]=i},2822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=/^(?:[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;t["default"]=n},2378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=new Uint8Array(256);let r=i.length;function rng(){if(r>i.length-16){s.default.randomFillSync(i);r=0}return i.slice(r,r+=16)}},2732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("sha1").update(e).digest()}var i=sha1;t["default"]=i},61:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;t.unsafeStringify=unsafeStringify;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=[];for(let e=0;e<256;++e){i.push((e+256).toString(16).slice(1))}function unsafeStringify(e,t=0){return i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]}function stringify(e,t=0){const n=unsafeStringify(e,t);if(!(0,s.default)(n)){throw TypeError("Stringified UUID is invalid")}return n}var r=stringify;t["default"]=r},272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2378));var i=n(61);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let r;let o;let A=0;let a=0;function v1(e,t,n){let c=t&&n||0;const u=t||new Array(16);e=e||{};let l=e.node||r;let d=e.clockseq!==undefined?e.clockseq:o;if(l==null||d==null){const t=e.random||(e.rng||s.default)();if(l==null){l=r=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=o=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let g=e.nsecs!==undefined?e.nsecs:a+1;const h=p-A+(g-a)/1e4;if(h<0&&e.clockseq===undefined){d=d+1&16383}if((h<0||p>A)&&e.nsecs===undefined){g=0}if(g>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}A=p;a=g;o=d;p+=122192928e5;const f=((p&268435455)*1e4+g)%4294967296;u[c++]=f>>>24&255;u[c++]=f>>>16&255;u[c++]=f>>>8&255;u[c++]=f&255;const E=p/4294967296*1e4&268435455;u[c++]=E>>>8&255;u[c++]=E&255;u[c++]=E>>>24&15|16;u[c++]=E>>>16&255;u[c++]=d>>>8|128;u[c++]=d&255;for(let e=0;e<6;++e){u[c+e]=l[e]}return t||(0,i.unsafeStringify)(u)}var c=v1;t["default"]=c},4867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6222));var i=_interopRequireDefault(n(1774));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v3",48,i.default);var o=r;t["default"]=o},6222:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.URL=t.DNS=void 0;t["default"]=v35;var s=n(61);var i=_interopRequireDefault(n(1855));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(5056));var i=_interopRequireDefault(n(2378));var r=n(61);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,n){if(s.default.randomUUID&&!t&&!e){return s.default.randomUUID()}e=e||{};const o=e.random||(e.rng||i.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){n=n||0;for(let e=0;e<16;++e){t[n+e]=o[e]}return t}return(0,r.unsafeStringify)(o)}var o=v4;t["default"]=o},1453:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6222));var i=_interopRequireDefault(n(2732));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v5",80,i.default);var o=r;t["default"]=o},2092:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2822));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&s.default.test(e)}var i=validate;t["default"]=i},5440:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.slice(14,15),16)}var i=version;t["default"]=i},5443:(e,t,n)=>{var s=n(3837);var i=n(2781).Stream;var r=n(8611);e.exports=CombinedStream;function CombinedStream(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}s.inherits(CombinedStream,i);CombinedStream.create=function(e){var t=new this;e=e||{};for(var n in e){t[n]=e[n]}return t};CombinedStream.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};CombinedStream.prototype.append=function(e){var t=CombinedStream.isStreamLike(e);if(t){if(!(e instanceof r)){var n=r.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=n}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};CombinedStream.prototype.pipe=function(e,t){i.prototype.pipe.call(this,e,t);this.resume();return e};CombinedStream.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};CombinedStream.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(e){var t=CombinedStream.isStreamLike(e);if(t){e.on("data",this._checkDataSize.bind(this));this._handleErrors(e)}this._pipeNext(e)}.bind(this))};CombinedStream.prototype._pipeNext=function(e){this._currentStream=e;var t=CombinedStream.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var n=e;this.write(n);this._getNext()};CombinedStream.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))};CombinedStream.prototype.write=function(e){this.emit("data",e)};CombinedStream.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};CombinedStream.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}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")};CombinedStream.prototype.destroy=function(){this._reset();this.emit("close")};CombinedStream.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};CombinedStream.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};CombinedStream.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize}));if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};CombinedStream.prototype._emitError=function(e){this._reset();this.emit("error",e)}},8611:(e,t,n)=>{var s=n(2781).Stream;var i=n(3837);e.exports=DelayedStream;function DelayedStream(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}i.inherits(DelayedStream,s);DelayedStream.create=function(e,t){var n=new this;t=t||{};for(var s in t){n[s]=t[s]}n.source=e;var i=e.emit;e.emit=function(){n._handleEmit(arguments);return i.apply(e,arguments)};e.on("error",(function(){}));if(n.pauseStream){e.pause()}return n};Object.defineProperty(DelayedStream.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});DelayedStream.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};DelayedStream.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};DelayedStream.prototype.pause=function(){this.source.pause()};DelayedStream.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};DelayedStream.prototype.pipe=function(){var e=s.prototype.pipe.apply(this,arguments);this.resume();return e};DelayedStream.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};DelayedStream.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},1133:(e,t,n)=>{var s;e.exports=function(){if(!s){try{s=n(6167)("follow-redirects")}catch(e){}if(typeof s!=="function"){s=function(){}}}s.apply(null,arguments)}},7707:(e,t,n)=>{var s=n(7310);var i=s.URL;var r=n(3685);var o=n(5687);var A=n(2781).Writable;var a=n(9491);var c=n(1133);var u=["abort","aborted","connect","error","socket","timeout"];var l=Object.create(null);u.forEach((function(e){l[e]=function(t,n,s){this._redirectable.emit(e,t,n,s)}}));var d=createErrorType("ERR_INVALID_URL","Invalid URL",TypeError);var p=createErrorType("ERR_FR_REDIRECTION_FAILURE","Redirected request failed");var g=createErrorType("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded");var h=createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit");var f=createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");var E=A.prototype.destroy||noop;function RedirectableRequest(e,t){A.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var n=this;this._onNativeResponse=function(e){n._processResponse(e)};this._performRequest()}RedirectableRequest.prototype=Object.create(A.prototype);RedirectableRequest.prototype.abort=function(){destroyRequest(this._currentRequest);this._currentRequest.abort();this.emit("abort")};RedirectableRequest.prototype.destroy=function(e){destroyRequest(this._currentRequest,e);E.call(this,e);return this};RedirectableRequest.prototype.write=function(e,t,n){if(this._ending){throw new f}if(!isString(e)&&!isBuffer(e)){throw new TypeError("data should be a string, Buffer or Uint8Array")}if(isFunction(t)){n=t;t=null}if(e.length===0){if(n){n()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,n)}else{this.emit("error",new h);this.abort()}};RedirectableRequest.prototype.end=function(e,t,n){if(isFunction(e)){n=e;e=t=null}else if(isFunction(t)){n=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,n)}else{var s=this;var i=this._currentRequest;this.write(e,t,(function(){s._ended=true;i.end(null,null,n)}));this._ending=true}};RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};RedirectableRequest.prototype.setTimeout=function(e,t){var n=this;function destroyOnTimeout(t){t.setTimeout(e);t.removeListener("timeout",t.destroy);t.addListener("timeout",t.destroy)}function startTimer(t){if(n._timeout){clearTimeout(n._timeout)}n._timeout=setTimeout((function(){n.emit("timeout");clearTimer()}),e);destroyOnTimeout(t)}function clearTimer(){if(n._timeout){clearTimeout(n._timeout);n._timeout=null}n.removeListener("abort",clearTimer);n.removeListener("error",clearTimer);n.removeListener("response",clearTimer);n.removeListener("close",clearTimer);if(t){n.removeListener("timeout",t)}if(!n.socket){n._currentRequest.removeListener("socket",startTimer)}}if(t){this.on("timeout",t)}if(this.socket){startTimer(this.socket)}else{this._currentRequest.once("socket",startTimer)}this.on("socket",destroyOnTimeout);this.on("abort",clearTimer);this.on("error",clearTimer);this.on("response",clearTimer);this.on("close",clearTimer);return this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){RedirectableRequest.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}}));["aborted","connection","socket"].forEach((function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})}));RedirectableRequest.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){this.emit("error",new TypeError("Unsupported protocol "+e));return}if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var r of u){i.on(r,l[r])}this._currentUrl=/^\//.test(this._options.path)?s.format(this._options):this._options.path;if(this._isRedirect){var o=0;var A=this;var a=this._requestBodyBuffers;(function writeNext(e){if(i===A._currentRequest){if(e){A.emit("error",e)}else if(o=400){e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[];return}destroyRequest(this._currentRequest);e.destroy();if(++this._redirectCount>this._options.maxRedirects){this.emit("error",new g);return}var i;var r=this._options.beforeRedirect;if(r){i=Object.assign({Host:e.req.getHeader("host")},this._options.headers)}var o=this._options.method;if((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method)){this._options.method="GET";this._requestBodyBuffers=[];removeMatchingHeaders(/^content-/i,this._options.headers)}var A=removeMatchingHeaders(/^host$/i,this._options.headers);var a=s.parse(this._currentUrl);var u=A||a.host;var l=/^\w+:/.test(n)?this._currentUrl:s.format(Object.assign(a,{host:u}));var d;try{d=s.resolve(l,n)}catch(e){this.emit("error",new p({cause:e}));return}c("redirecting to",d);this._isRedirect=true;var h=s.parse(d);Object.assign(this._options,h);if(h.protocol!==a.protocol&&h.protocol!=="https:"||h.host!==u&&!isSubdomain(h.host,u)){removeMatchingHeaders(/^(?:authorization|cookie)$/i,this._options.headers)}if(isFunction(r)){var f={headers:e.headers,statusCode:t};var E={url:l,method:o,headers:i};try{r(this._options,f,E)}catch(e){this.emit("error",e);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new p({cause:e}))}};function wrap(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var n={};Object.keys(e).forEach((function(r){var o=r+":";var A=n[o]=e[r];var u=t[r]=Object.create(A);function request(e,r,A){if(isString(e)){var u;try{u=urlToOptions(new i(e))}catch(t){u=s.parse(e)}if(!isString(u.protocol)){throw new d({input:e})}e=u}else if(i&&e instanceof i){e=urlToOptions(e)}else{A=r;r=e;e={protocol:o}}if(isFunction(r)){A=r;r=null}r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r);r.nativeProtocols=n;if(!isString(r.host)&&!isString(r.hostname)){r.hostname="::1"}a.equal(r.protocol,o,"protocol mismatch");c("options",r);return new RedirectableRequest(r,A)}function get(e,t,n){var s=u.request(e,t,n);s.end();return s}Object.defineProperties(u,{request:{value:request,configurable:true,enumerable:true,writable:true},get:{value:get,configurable:true,enumerable:true,writable:true}})}));return t}function noop(){}function urlToOptions(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};if(e.port!==""){t.port=Number(e.port)}return t}function removeMatchingHeaders(e,t){var n;for(var s in t){if(e.test(s)){n=t[s];delete t[s]}}return n===null||typeof n==="undefined"?undefined:String(n).trim()}function createErrorType(e,t,n){function CustomError(n){Error.captureStackTrace(this,this.constructor);Object.assign(this,n||{});this.code=e;this.message=this.cause?t+": "+this.cause.message:t}CustomError.prototype=new(n||Error);CustomError.prototype.constructor=CustomError;CustomError.prototype.name="Error ["+e+"]";return CustomError}function destroyRequest(e,t){for(var n of u){e.removeListener(n,l[n])}e.on("error",noop);e.destroy(t)}function isSubdomain(e,t){a(isString(e)&&isString(t));var n=e.length-t.length-1;return n>0&&e[n]==="."&&e.endsWith(t)}function isString(e){return typeof e==="string"||e instanceof String}function isFunction(e){return typeof e==="function"}function isBuffer(e){return typeof e==="object"&&"length"in e}e.exports=wrap({http:r,https:o});e.exports.wrap=wrap},4334:(e,t,n)=>{var s=n(5443);var i=n(3837);var r=n(1017);var o=n(3685);var A=n(5687);var a=n(7310).parse;var c=n(7147);var u=n(2781).Stream;var l=n(3583);var d=n(4812);var p=n(7142);e.exports=FormData;i.inherits(FormData,s);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];s.call(this);e=e||{};for(var t in e){this[t]=e[t]}}FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,n){n=n||{};if(typeof n=="string"){n={filename:n}}var r=s.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(i.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,n);var A=this._multiPartFooter();r(o);r(t);r(A);this._trackLength(o,t,n)};FormData.prototype._trackLength=function(e,t,n){var s=0;if(n.knownLength!=null){s+=+n.knownLength}else if(Buffer.isBuffer(t)){s=t.length}else if(typeof t==="string"){s=Buffer.byteLength(t)}this._valueLength+=s;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof u)){return}if(!n.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{c.stat(e.path,(function(n,s){var i;if(n){t(n);return}i=s.size-(e.start?e.start:0);t(null,i)}))}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",(function(n){e.pause();t(null,+n.headers["content-length"])}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,n){if(typeof n.header=="string"){return n.header}var s=this._getContentDisposition(t,n);var i=this._getContentType(t,n);var r="";var o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(s||[]),"Content-Type":[].concat(i||[])};if(typeof n.header=="object"){p(o,n.header)}var A;for(var a in o){if(!o.hasOwnProperty(a))continue;A=o[a];if(A==null){continue}if(!Array.isArray(A)){A=[A]}if(A.length){r+=a+": "+A.join("; ")+FormData.LINE_BREAK}}return"--"+this.getBoundary()+FormData.LINE_BREAK+r+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var n,s;if(typeof t.filepath==="string"){n=r.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){n=r.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){n=r.basename(e.client._httpMessage.path||"")}if(n){s='filename="'+n+'"'}return s};FormData.prototype._getContentType=function(e,t){var n=t.contentType;if(!n&&e.name){n=l.lookup(e.name)}if(!n&&e.path){n=l.lookup(e.path)}if(!n&&e.readable&&e.hasOwnProperty("httpVersion")){n=e.headers["content-type"]}if(!n&&(t.filepath||t.filename)){n=l.lookup(t.filepath||t.filename)}if(!n&&typeof e=="object"){n=FormData.DEFAULT_CONTENT_TYPE}return n};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var n=this._streams.length===0;if(n){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){n[t.toLowerCase()]=e[t]}}return n};FormData.prototype.setBoundary=function(e){this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var n=0,s=this._streams.length;n{e.exports=function(e,t){Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]}));return e}},4061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.cryptoRuntime=t.base64url=t.generateSecret=t.generateKeyPair=t.errors=t.decodeJwt=t.decodeProtectedHeader=t.importJWK=t.importX509=t.importPKCS8=t.importSPKI=t.exportJWK=t.exportSPKI=t.exportPKCS8=t.UnsecuredJWT=t.createRemoteJWKSet=t.createLocalJWKSet=t.EmbeddedJWK=t.calculateJwkThumbprintUri=t.calculateJwkThumbprint=t.EncryptJWT=t.SignJWT=t.GeneralSign=t.FlattenedSign=t.CompactSign=t.FlattenedEncrypt=t.CompactEncrypt=t.jwtDecrypt=t.jwtVerify=t.generalVerify=t.flattenedVerify=t.compactVerify=t.GeneralEncrypt=t.generalDecrypt=t.flattenedDecrypt=t.compactDecrypt=void 0;var s=n(7651);Object.defineProperty(t,"compactDecrypt",{enumerable:true,get:function(){return s.compactDecrypt}});var i=n(7566);Object.defineProperty(t,"flattenedDecrypt",{enumerable:true,get:function(){return i.flattenedDecrypt}});var r=n(5684);Object.defineProperty(t,"generalDecrypt",{enumerable:true,get:function(){return r.generalDecrypt}});var o=n(3992);Object.defineProperty(t,"GeneralEncrypt",{enumerable:true,get:function(){return o.GeneralEncrypt}});var A=n(5212);Object.defineProperty(t,"compactVerify",{enumerable:true,get:function(){return A.compactVerify}});var a=n(2095);Object.defineProperty(t,"flattenedVerify",{enumerable:true,get:function(){return a.flattenedVerify}});var c=n(4975);Object.defineProperty(t,"generalVerify",{enumerable:true,get:function(){return c.generalVerify}});var u=n(9887);Object.defineProperty(t,"jwtVerify",{enumerable:true,get:function(){return u.jwtVerify}});var l=n(3378);Object.defineProperty(t,"jwtDecrypt",{enumerable:true,get:function(){return l.jwtDecrypt}});var d=n(6203);Object.defineProperty(t,"CompactEncrypt",{enumerable:true,get:function(){return d.CompactEncrypt}});var p=n(1555);Object.defineProperty(t,"FlattenedEncrypt",{enumerable:true,get:function(){return p.FlattenedEncrypt}});var g=n(8257);Object.defineProperty(t,"CompactSign",{enumerable:true,get:function(){return g.CompactSign}});var h=n(4825);Object.defineProperty(t,"FlattenedSign",{enumerable:true,get:function(){return h.FlattenedSign}});var f=n(4268);Object.defineProperty(t,"GeneralSign",{enumerable:true,get:function(){return f.GeneralSign}});var E=n(8882);Object.defineProperty(t,"SignJWT",{enumerable:true,get:function(){return E.SignJWT}});var m=n(960);Object.defineProperty(t,"EncryptJWT",{enumerable:true,get:function(){return m.EncryptJWT}});var C=n(3494);Object.defineProperty(t,"calculateJwkThumbprint",{enumerable:true,get:function(){return C.calculateJwkThumbprint}});Object.defineProperty(t,"calculateJwkThumbprintUri",{enumerable:true,get:function(){return C.calculateJwkThumbprintUri}});var Q=n(1751);Object.defineProperty(t,"EmbeddedJWK",{enumerable:true,get:function(){return Q.EmbeddedJWK}});var I=n(9970);Object.defineProperty(t,"createLocalJWKSet",{enumerable:true,get:function(){return I.createLocalJWKSet}});var B=n(9035);Object.defineProperty(t,"createRemoteJWKSet",{enumerable:true,get:function(){return B.createRemoteJWKSet}});var y=n(8568);Object.defineProperty(t,"UnsecuredJWT",{enumerable:true,get:function(){return y.UnsecuredJWT}});var b=n(465);Object.defineProperty(t,"exportPKCS8",{enumerable:true,get:function(){return b.exportPKCS8}});Object.defineProperty(t,"exportSPKI",{enumerable:true,get:function(){return b.exportSPKI}});Object.defineProperty(t,"exportJWK",{enumerable:true,get:function(){return b.exportJWK}});var w=n(4230);Object.defineProperty(t,"importSPKI",{enumerable:true,get:function(){return w.importSPKI}});Object.defineProperty(t,"importPKCS8",{enumerable:true,get:function(){return w.importPKCS8}});Object.defineProperty(t,"importX509",{enumerable:true,get:function(){return w.importX509}});Object.defineProperty(t,"importJWK",{enumerable:true,get:function(){return w.importJWK}});var R=n(3991);Object.defineProperty(t,"decodeProtectedHeader",{enumerable:true,get:function(){return R.decodeProtectedHeader}});var v=n(5611);Object.defineProperty(t,"decodeJwt",{enumerable:true,get:function(){return v.decodeJwt}});t.errors=n(4419);var k=n(1036);Object.defineProperty(t,"generateKeyPair",{enumerable:true,get:function(){return k.generateKeyPair}});var S=n(6617);Object.defineProperty(t,"generateSecret",{enumerable:true,get:function(){return S.generateSecret}});t.base64url=n(3238);var x=n(1173);Object.defineProperty(t,"cryptoRuntime",{enumerable:true,get:function(){return x.default}})},7651:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.compactDecrypt=void 0;const s=n(7566);const i=n(4419);const r=n(1691);async function compactDecrypt(e,t,n){if(e instanceof Uint8Array){e=r.decoder.decode(e)}if(typeof e!=="string"){throw new i.JWEInvalid("Compact JWE must be a string or Uint8Array")}const{0:o,1:A,2:a,3:c,4:u,length:l}=e.split(".");if(l!==5){throw new i.JWEInvalid("Invalid Compact JWE")}const d=await(0,s.flattenedDecrypt)({ciphertext:c,iv:a||undefined,protected:o||undefined,tag:u||undefined,encrypted_key:A||undefined},t,n);const p={plaintext:d.plaintext,protectedHeader:d.protectedHeader};if(typeof t==="function"){return{...p,key:d.key}}return p}t.compactDecrypt=compactDecrypt},6203:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CompactEncrypt=void 0;const s=n(1555);class CompactEncrypt{constructor(e){this._flattened=new s.FlattenedEncrypt(e)}setContentEncryptionKey(e){this._flattened.setContentEncryptionKey(e);return this}setInitializationVector(e){this._flattened.setInitializationVector(e);return this}setProtectedHeader(e){this._flattened.setProtectedHeader(e);return this}setKeyManagementParameters(e){this._flattened.setKeyManagementParameters(e);return this}async encrypt(e,t){const n=await this._flattened.encrypt(e,t);return[n.protected,n.encrypted_key,n.iv,n.ciphertext,n.tag].join(".")}}t.CompactEncrypt=CompactEncrypt},7566:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.flattenedDecrypt=void 0;const s=n(518);const i=n(6137);const r=n(7022);const o=n(4419);const A=n(6063);const a=n(9127);const c=n(6127);const u=n(1691);const l=n(3987);const d=n(863);const p=n(5148);async function flattenedDecrypt(e,t,n){var g;if(!(0,a.default)(e)){throw new o.JWEInvalid("Flattened JWE must be an object")}if(e.protected===undefined&&e.header===undefined&&e.unprotected===undefined){throw new o.JWEInvalid("JOSE Header missing")}if(typeof e.iv!=="string"){throw new o.JWEInvalid("JWE Initialization Vector missing or incorrect type")}if(typeof e.ciphertext!=="string"){throw new o.JWEInvalid("JWE Ciphertext missing or incorrect type")}if(typeof e.tag!=="string"){throw new o.JWEInvalid("JWE Authentication Tag missing or incorrect type")}if(e.protected!==undefined&&typeof e.protected!=="string"){throw new o.JWEInvalid("JWE Protected Header incorrect type")}if(e.encrypted_key!==undefined&&typeof e.encrypted_key!=="string"){throw new o.JWEInvalid("JWE Encrypted Key incorrect type")}if(e.aad!==undefined&&typeof e.aad!=="string"){throw new o.JWEInvalid("JWE AAD incorrect type")}if(e.header!==undefined&&!(0,a.default)(e.header)){throw new o.JWEInvalid("JWE Shared Unprotected Header incorrect type")}if(e.unprotected!==undefined&&!(0,a.default)(e.unprotected)){throw new o.JWEInvalid("JWE Per-Recipient Unprotected Header incorrect type")}let h;if(e.protected){try{const t=(0,s.decode)(e.protected);h=JSON.parse(u.decoder.decode(t))}catch{throw new o.JWEInvalid("JWE Protected Header is invalid")}}if(!(0,A.default)(h,e.header,e.unprotected)){throw new o.JWEInvalid("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint")}const f={...h,...e.header,...e.unprotected};(0,d.default)(o.JWEInvalid,new Map,n===null||n===void 0?void 0:n.crit,h,f);if(f.zip!==undefined){if(!h||!h.zip){throw new o.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}if(f.zip!=="DEF"){throw new o.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}}const{alg:E,enc:m}=f;if(typeof E!=="string"||!E){throw new o.JWEInvalid("missing JWE Algorithm (alg) in JWE Header")}if(typeof m!=="string"||!m){throw new o.JWEInvalid("missing JWE Encryption Algorithm (enc) in JWE Header")}const C=n&&(0,p.default)("keyManagementAlgorithms",n.keyManagementAlgorithms);const Q=n&&(0,p.default)("contentEncryptionAlgorithms",n.contentEncryptionAlgorithms);if(C&&!C.has(E)){throw new o.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed')}if(Q&&!Q.has(m)){throw new o.JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter not allowed')}let I;if(e.encrypted_key!==undefined){try{I=(0,s.decode)(e.encrypted_key)}catch{throw new o.JWEInvalid("Failed to base64url decode the encrypted_key")}}let B=false;if(typeof t==="function"){t=await t(h,e);B=true}let y;try{y=await(0,c.default)(E,t,I,f,n)}catch(e){if(e instanceof TypeError||e instanceof o.JWEInvalid||e instanceof o.JOSENotSupported){throw e}y=(0,l.default)(m)}let b;let w;try{b=(0,s.decode)(e.iv)}catch{throw new o.JWEInvalid("Failed to base64url decode the iv")}try{w=(0,s.decode)(e.tag)}catch{throw new o.JWEInvalid("Failed to base64url decode the tag")}const R=u.encoder.encode((g=e.protected)!==null&&g!==void 0?g:"");let v;if(e.aad!==undefined){v=(0,u.concat)(R,u.encoder.encode("."),u.encoder.encode(e.aad))}else{v=R}let k;try{k=(0,s.decode)(e.ciphertext)}catch{throw new o.JWEInvalid("Failed to base64url decode the ciphertext")}let S=await(0,i.default)(m,y,k,b,w,v);if(f.zip==="DEF"){S=await((n===null||n===void 0?void 0:n.inflateRaw)||r.inflate)(S)}const x={plaintext:S};if(e.protected!==undefined){x.protectedHeader=h}if(e.aad!==undefined){try{x.additionalAuthenticatedData=(0,s.decode)(e.aad)}catch{throw new o.JWEInvalid("Failed to base64url decode the aad")}}if(e.unprotected!==undefined){x.sharedUnprotectedHeader=e.unprotected}if(e.header!==undefined){x.unprotectedHeader=e.header}if(B){return{...x,key:t}}return x}t.flattenedDecrypt=flattenedDecrypt},1555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FlattenedEncrypt=t.unprotected=void 0;const s=n(518);const i=n(6476);const r=n(7022);const o=n(4630);const A=n(3286);const a=n(4419);const c=n(6063);const u=n(1691);const l=n(863);t.unprotected=Symbol();class FlattenedEncrypt{constructor(e){if(!(e instanceof Uint8Array)){throw new TypeError("plaintext must be an instance of Uint8Array")}this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters){throw new TypeError("setKeyManagementParameters can only be called once")}this._keyManagementParameters=e;return this}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader){throw new TypeError("setSharedUnprotectedHeader can only be called once")}this._sharedUnprotectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}setContentEncryptionKey(e){if(this._cek){throw new TypeError("setContentEncryptionKey can only be called once")}this._cek=e;return this}setInitializationVector(e){if(this._iv){throw new TypeError("setInitializationVector can only be called once")}this._iv=e;return this}async encrypt(e,n){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader){throw new a.JWEInvalid("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()")}if(!(0,c.default)(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader)){throw new a.JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint")}const d={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};(0,l.default)(a.JWEInvalid,new Map,n===null||n===void 0?void 0:n.crit,this._protectedHeader,d);if(d.zip!==undefined){if(!this._protectedHeader||!this._protectedHeader.zip){throw new a.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}if(d.zip!=="DEF"){throw new a.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}}const{alg:p,enc:g}=d;if(typeof p!=="string"||!p){throw new a.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid')}if(typeof g!=="string"||!g){throw new a.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid')}let h;if(p==="dir"){if(this._cek){throw new TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}}else if(p==="ECDH-ES"){if(this._cek){throw new TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement")}}let f;{let s;({cek:f,encryptedKey:h,parameters:s}=await(0,A.default)(p,g,e,this._cek,this._keyManagementParameters));if(s){if(n&&t.unprotected in n){if(!this._unprotectedHeader){this.setUnprotectedHeader(s)}else{this._unprotectedHeader={...this._unprotectedHeader,...s}}}else{if(!this._protectedHeader){this.setProtectedHeader(s)}else{this._protectedHeader={...this._protectedHeader,...s}}}}}this._iv||(this._iv=(0,o.default)(g));let E;let m;let C;if(this._protectedHeader){m=u.encoder.encode((0,s.encode)(JSON.stringify(this._protectedHeader)))}else{m=u.encoder.encode("")}if(this._aad){C=(0,s.encode)(this._aad);E=(0,u.concat)(m,u.encoder.encode("."),u.encoder.encode(C))}else{E=m}let Q;let I;if(d.zip==="DEF"){const e=await((n===null||n===void 0?void 0:n.deflateRaw)||r.deflate)(this._plaintext);({ciphertext:Q,tag:I}=await(0,i.default)(g,e,f,this._iv,E))}else{({ciphertext:Q,tag:I}=await(0,i.default)(g,this._plaintext,f,this._iv,E))}const B={ciphertext:(0,s.encode)(Q),iv:(0,s.encode)(this._iv),tag:(0,s.encode)(I)};if(h){B.encrypted_key=(0,s.encode)(h)}if(C){B.aad=C}if(this._protectedHeader){B.protected=u.decoder.decode(m)}if(this._sharedUnprotectedHeader){B.unprotected=this._sharedUnprotectedHeader}if(this._unprotectedHeader){B.header=this._unprotectedHeader}return B}}t.FlattenedEncrypt=FlattenedEncrypt},5684:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generalDecrypt=void 0;const s=n(7566);const i=n(4419);const r=n(9127);async function generalDecrypt(e,t,n){if(!(0,r.default)(e)){throw new i.JWEInvalid("General JWE must be an object")}if(!Array.isArray(e.recipients)||!e.recipients.every(r.default)){throw new i.JWEInvalid("JWE Recipients missing or incorrect type")}if(!e.recipients.length){throw new i.JWEInvalid("JWE Recipients has no members")}for(const i of e.recipients){try{return await(0,s.flattenedDecrypt)({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:i.encrypted_key,header:i.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,n)}catch{}}throw new i.JWEDecryptionFailed}t.generalDecrypt=generalDecrypt},3992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GeneralEncrypt=void 0;const s=n(1555);const i=n(4419);const r=n(3987);const o=n(6063);const A=n(3286);const a=n(518);const c=n(863);class IndividualRecipient{constructor(e,t,n){this.parent=e;this.key=t;this.options=n}setUnprotectedHeader(e){if(this.unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this.unprotectedHeader=e;return this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class GeneralEncrypt{constructor(e){this._recipients=[];this._plaintext=e}addRecipient(e,t){const n=new IndividualRecipient(this,e,{crit:t===null||t===void 0?void 0:t.crit});this._recipients.push(n);return n}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setSharedUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}async encrypt(e){var t,n,u;if(!this._recipients.length){throw new i.JWEInvalid("at least one recipient must be added")}e={deflateRaw:e===null||e===void 0?void 0:e.deflateRaw};if(this._recipients.length===1){const[t]=this._recipients;const n=await new s.FlattenedEncrypt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options,...e});let i={ciphertext:n.ciphertext,iv:n.iv,recipients:[{}],tag:n.tag};if(n.aad)i.aad=n.aad;if(n.protected)i.protected=n.protected;if(n.unprotected)i.unprotected=n.unprotected;if(n.encrypted_key)i.recipients[0].encrypted_key=n.encrypted_key;if(n.header)i.recipients[0].header=n.header;return i}let l;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EmbeddedJWK=void 0;const s=n(4230);const i=n(9127);const r=n(4419);async function EmbeddedJWK(e,t){const n={...e,...t===null||t===void 0?void 0:t.header};if(!(0,i.default)(n.jwk)){throw new r.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object')}const o=await(0,s.importJWK)({...n.jwk,ext:true},n.alg,true);if(o instanceof Uint8Array||o.type!=="public"){throw new r.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key')}return o}t.EmbeddedJWK=EmbeddedJWK},3494:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.calculateJwkThumbprintUri=t.calculateJwkThumbprint=void 0;const s=n(2355);const i=n(518);const r=n(4419);const o=n(1691);const A=n(9127);const check=(e,t)=>{if(typeof e!=="string"||!e){throw new r.JWKInvalid(`${t} missing or invalid`)}};async function calculateJwkThumbprint(e,t){if(!(0,A.default)(e)){throw new TypeError("JWK must be an object")}t!==null&&t!==void 0?t:t="sha256";if(t!=="sha256"&&t!=="sha384"&&t!=="sha512"){throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"')}let n;switch(e.kty){case"EC":check(e.crv,'"crv" (Curve) Parameter');check(e.x,'"x" (X Coordinate) Parameter');check(e.y,'"y" (Y Coordinate) Parameter');n={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":check(e.crv,'"crv" (Subtype of Key Pair) Parameter');check(e.x,'"x" (Public Key) Parameter');n={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":check(e.e,'"e" (Exponent) Parameter');check(e.n,'"n" (Modulus) Parameter');n={e:e.e,kty:e.kty,n:e.n};break;case"oct":check(e.k,'"k" (Key Value) Parameter');n={k:e.k,kty:e.kty};break;default:throw new r.JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported')}const a=o.encoder.encode(JSON.stringify(n));return(0,i.encode)(await(0,s.default)(t,a))}t.calculateJwkThumbprint=calculateJwkThumbprint;async function calculateJwkThumbprintUri(e,t){t!==null&&t!==void 0?t:t="sha256";const n=await calculateJwkThumbprint(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${n}`}t.calculateJwkThumbprintUri=calculateJwkThumbprintUri},9970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createLocalJWKSet=t.LocalJWKSet=t.isJWKSLike=void 0;const s=n(4230);const i=n(4419);const r=n(9127);function getKtyFromAlg(e){switch(typeof e==="string"&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new i.JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set')}}function isJWKSLike(e){return e&&typeof e==="object"&&Array.isArray(e.keys)&&e.keys.every(isJWKLike)}t.isJWKSLike=isJWKSLike;function isJWKLike(e){return(0,r.default)(e)}function clone(e){if(typeof structuredClone==="function"){return structuredClone(e)}return JSON.parse(JSON.stringify(e))}class LocalJWKSet{constructor(e){this._cached=new WeakMap;if(!isJWKSLike(e)){throw new i.JWKSInvalid("JSON Web Key Set malformed")}this._jwks=clone(e)}async getKey(e,t){const{alg:n,kid:s}={...e,...t===null||t===void 0?void 0:t.header};const r=getKtyFromAlg(n);const o=this._jwks.keys.filter((e=>{let t=r===e.kty;if(t&&typeof s==="string"){t=s===e.kid}if(t&&typeof e.alg==="string"){t=n===e.alg}if(t&&typeof e.use==="string"){t=e.use==="sig"}if(t&&Array.isArray(e.key_ops)){t=e.key_ops.includes("verify")}if(t&&n==="EdDSA"){t=e.crv==="Ed25519"||e.crv==="Ed448"}if(t){switch(n){case"ES256":t=e.crv==="P-256";break;case"ES256K":t=e.crv==="secp256k1";break;case"ES384":t=e.crv==="P-384";break;case"ES512":t=e.crv==="P-521";break}}return t}));const{0:A,length:a}=o;if(a===0){throw new i.JWKSNoMatchingKey}else if(a!==1){const e=new i.JWKSMultipleMatchingKeys;const{_cached:t}=this;e[Symbol.asyncIterator]=async function*(){for(const e of o){try{yield await importWithAlgCache(t,e,n)}catch{continue}}};throw e}return importWithAlgCache(this._cached,A,n)}}t.LocalJWKSet=LocalJWKSet;async function importWithAlgCache(e,t,n){const r=e.get(t)||e.set(t,{}).get(t);if(r[n]===undefined){const e=await(0,s.importJWK)({...t,ext:true},n);if(e instanceof Uint8Array||e.type!=="public"){throw new i.JWKSInvalid("JSON Web Key Set members must be public keys")}r[n]=e}return r[n]}function createLocalJWKSet(e){const t=new LocalJWKSet(e);return async function(e,n){return t.getKey(e,n)}}t.createLocalJWKSet=createLocalJWKSet},9035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createRemoteJWKSet=void 0;const s=n(3650);const i=n(4419);const r=n(9970);function isCloudflareWorkers(){return typeof WebSocketPair!=="undefined"||typeof navigator!=="undefined"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime!=="undefined"&&EdgeRuntime==="vercel"}class RemoteJWKSet extends r.LocalJWKSet{constructor(e,t){super({keys:[]});this._jwks=undefined;if(!(e instanceof URL)){throw new TypeError("url must be an instance of URL")}this._url=new URL(e.href);this._options={agent:t===null||t===void 0?void 0:t.agent,headers:t===null||t===void 0?void 0:t.headers};this._timeoutDuration=typeof(t===null||t===void 0?void 0:t.timeoutDuration)==="number"?t===null||t===void 0?void 0:t.timeoutDuration:5e3;this._cooldownDuration=typeof(t===null||t===void 0?void 0:t.cooldownDuration)==="number"?t===null||t===void 0?void 0:t.cooldownDuration:3e4;this._cacheMaxAge=typeof(t===null||t===void 0?void 0:t.cacheMaxAge)==="number"?t===null||t===void 0?void 0:t.cacheMaxAge:6e5}coolingDown(){return typeof this._jwksTimestamp==="number"?Date.now(){if(!(0,r.isJWKSLike)(e)){throw new i.JWKSInvalid("JSON Web Key Set malformed")}this._jwks={keys:e.keys};this._jwksTimestamp=Date.now();this._pendingFetch=undefined})).catch((e=>{this._pendingFetch=undefined;throw e})));await this._pendingFetch}}function createRemoteJWKSet(e,t){const n=new RemoteJWKSet(e,t);return async function(e,t){return n.getKey(e,t)}}t.createRemoteJWKSet=createRemoteJWKSet},8257:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CompactSign=void 0;const s=n(4825);class CompactSign{constructor(e){this._flattened=new s.FlattenedSign(e)}setProtectedHeader(e){this._flattened.setProtectedHeader(e);return this}async sign(e,t){const n=await this._flattened.sign(e,t);if(n.payload===undefined){throw new TypeError("use the flattened module for creating JWS with b64: false")}return`${n.protected}.${n.payload}.${n.signature}`}}t.CompactSign=CompactSign},5212:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.compactVerify=void 0;const s=n(2095);const i=n(4419);const r=n(1691);async function compactVerify(e,t,n){if(e instanceof Uint8Array){e=r.decoder.decode(e)}if(typeof e!=="string"){throw new i.JWSInvalid("Compact JWS must be a string or Uint8Array")}const{0:o,1:A,2:a,length:c}=e.split(".");if(c!==3){throw new i.JWSInvalid("Invalid Compact JWS")}const u=await(0,s.flattenedVerify)({payload:A,protected:o,signature:a},t,n);const l={payload:u.payload,protectedHeader:u.protectedHeader};if(typeof t==="function"){return{...l,key:u.key}}return l}t.compactVerify=compactVerify},4825:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FlattenedSign=void 0;const s=n(518);const i=n(9935);const r=n(6063);const o=n(4419);const A=n(1691);const a=n(6241);const c=n(863);class FlattenedSign{constructor(e){if(!(e instanceof Uint8Array)){throw new TypeError("payload must be an instance of Uint8Array")}this._payload=e}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader){throw new o.JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()")}if(!(0,r.default)(this._protectedHeader,this._unprotectedHeader)){throw new o.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint")}const n={...this._protectedHeader,...this._unprotectedHeader};const u=(0,c.default)(o.JWSInvalid,new Map([["b64",true]]),t===null||t===void 0?void 0:t.crit,this._protectedHeader,n);let l=true;if(u.has("b64")){l=this._protectedHeader.b64;if(typeof l!=="boolean"){throw new o.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}}const{alg:d}=n;if(typeof d!=="string"||!d){throw new o.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid')}(0,a.default)(d,e,"sign");let p=this._payload;if(l){p=A.encoder.encode((0,s.encode)(p))}let g;if(this._protectedHeader){g=A.encoder.encode((0,s.encode)(JSON.stringify(this._protectedHeader)))}else{g=A.encoder.encode("")}const h=(0,A.concat)(g,A.encoder.encode("."),p);const f=await(0,i.default)(d,e,h);const E={signature:(0,s.encode)(f),payload:""};if(l){E.payload=A.decoder.decode(p)}if(this._unprotectedHeader){E.header=this._unprotectedHeader}if(this._protectedHeader){E.protected=A.decoder.decode(g)}return E}}t.FlattenedSign=FlattenedSign},2095:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.flattenedVerify=void 0;const s=n(518);const i=n(3569);const r=n(4419);const o=n(1691);const A=n(6063);const a=n(9127);const c=n(6241);const u=n(863);const l=n(5148);async function flattenedVerify(e,t,n){var d;if(!(0,a.default)(e)){throw new r.JWSInvalid("Flattened JWS must be an object")}if(e.protected===undefined&&e.header===undefined){throw new r.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members')}if(e.protected!==undefined&&typeof e.protected!=="string"){throw new r.JWSInvalid("JWS Protected Header incorrect type")}if(e.payload===undefined){throw new r.JWSInvalid("JWS Payload missing")}if(typeof e.signature!=="string"){throw new r.JWSInvalid("JWS Signature missing or incorrect type")}if(e.header!==undefined&&!(0,a.default)(e.header)){throw new r.JWSInvalid("JWS Unprotected Header incorrect type")}let p={};if(e.protected){try{const t=(0,s.decode)(e.protected);p=JSON.parse(o.decoder.decode(t))}catch{throw new r.JWSInvalid("JWS Protected Header is invalid")}}if(!(0,A.default)(p,e.header)){throw new r.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint")}const g={...p,...e.header};const h=(0,u.default)(r.JWSInvalid,new Map([["b64",true]]),n===null||n===void 0?void 0:n.crit,p,g);let f=true;if(h.has("b64")){f=p.b64;if(typeof f!=="boolean"){throw new r.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}}const{alg:E}=g;if(typeof E!=="string"||!E){throw new r.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid')}const m=n&&(0,l.default)("algorithms",n.algorithms);if(m&&!m.has(E)){throw new r.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed')}if(f){if(typeof e.payload!=="string"){throw new r.JWSInvalid("JWS Payload must be a string")}}else if(typeof e.payload!=="string"&&!(e.payload instanceof Uint8Array)){throw new r.JWSInvalid("JWS Payload must be a string or an Uint8Array instance")}let C=false;if(typeof t==="function"){t=await t(p,e);C=true}(0,c.default)(E,t,"verify");const Q=(0,o.concat)(o.encoder.encode((d=e.protected)!==null&&d!==void 0?d:""),o.encoder.encode("."),typeof e.payload==="string"?o.encoder.encode(e.payload):e.payload);let I;try{I=(0,s.decode)(e.signature)}catch{throw new r.JWSInvalid("Failed to base64url decode the signature")}const B=await(0,i.default)(E,t,I,Q);if(!B){throw new r.JWSSignatureVerificationFailed}let y;if(f){try{y=(0,s.decode)(e.payload)}catch{throw new r.JWSInvalid("Failed to base64url decode the payload")}}else if(typeof e.payload==="string"){y=o.encoder.encode(e.payload)}else{y=e.payload}const b={payload:y};if(e.protected!==undefined){b.protectedHeader=p}if(e.header!==undefined){b.unprotectedHeader=e.header}if(C){return{...b,key:t}}return b}t.flattenedVerify=flattenedVerify},4268:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GeneralSign=void 0;const s=n(4825);const i=n(4419);class IndividualSignature{constructor(e,t,n){this.parent=e;this.key=t;this.options=n}setProtectedHeader(e){if(this.protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this.protectedHeader=e;return this}setUnprotectedHeader(e){if(this.unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this.unprotectedHeader=e;return this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class GeneralSign{constructor(e){this._signatures=[];this._payload=e}addSignature(e,t){const n=new IndividualSignature(this,e,t);this._signatures.push(n);return n}async sign(){if(!this._signatures.length){throw new i.JWSInvalid("at least one signature must be added")}const e={signatures:[],payload:""};for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generalVerify=void 0;const s=n(2095);const i=n(4419);const r=n(9127);async function generalVerify(e,t,n){if(!(0,r.default)(e)){throw new i.JWSInvalid("General JWS must be an object")}if(!Array.isArray(e.signatures)||!e.signatures.every(r.default)){throw new i.JWSInvalid("JWS Signatures missing or incorrect type")}for(const i of e.signatures){try{return await(0,s.flattenedVerify)({header:i.header,payload:e.payload,protected:i.protected,signature:i.signature},t,n)}catch{}}throw new i.JWSSignatureVerificationFailed}t.generalVerify=generalVerify},3378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwtDecrypt=void 0;const s=n(7651);const i=n(7274);const r=n(4419);async function jwtDecrypt(e,t,n){const o=await(0,s.compactDecrypt)(e,t,n);const A=(0,i.default)(o.protectedHeader,o.plaintext,n);const{protectedHeader:a}=o;if(a.iss!==undefined&&a.iss!==A.iss){throw new r.JWTClaimValidationFailed('replicated "iss" claim header parameter mismatch',"iss","mismatch")}if(a.sub!==undefined&&a.sub!==A.sub){throw new r.JWTClaimValidationFailed('replicated "sub" claim header parameter mismatch',"sub","mismatch")}if(a.aud!==undefined&&JSON.stringify(a.aud)!==JSON.stringify(A.aud)){throw new r.JWTClaimValidationFailed('replicated "aud" claim header parameter mismatch',"aud","mismatch")}const c={payload:A,protectedHeader:a};if(typeof t==="function"){return{...c,key:o.key}}return c}t.jwtDecrypt=jwtDecrypt},960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EncryptJWT=void 0;const s=n(6203);const i=n(1691);const r=n(1908);class EncryptJWT extends r.ProduceJWT{setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setKeyManagementParameters(e){if(this._keyManagementParameters){throw new TypeError("setKeyManagementParameters can only be called once")}this._keyManagementParameters=e;return this}setContentEncryptionKey(e){if(this._cek){throw new TypeError("setContentEncryptionKey can only be called once")}this._cek=e;return this}setInitializationVector(e){if(this._iv){throw new TypeError("setInitializationVector can only be called once")}this._iv=e;return this}replicateIssuerAsHeader(){this._replicateIssuerAsHeader=true;return this}replicateSubjectAsHeader(){this._replicateSubjectAsHeader=true;return this}replicateAudienceAsHeader(){this._replicateAudienceAsHeader=true;return this}async encrypt(e,t){const n=new s.CompactEncrypt(i.encoder.encode(JSON.stringify(this._payload)));if(this._replicateIssuerAsHeader){this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}}if(this._replicateSubjectAsHeader){this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}}if(this._replicateAudienceAsHeader){this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}}n.setProtectedHeader(this._protectedHeader);if(this._iv){n.setInitializationVector(this._iv)}if(this._cek){n.setContentEncryptionKey(this._cek)}if(this._keyManagementParameters){n.setKeyManagementParameters(this._keyManagementParameters)}return n.encrypt(e,t)}}t.EncryptJWT=EncryptJWT},1908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ProduceJWT=void 0;const s=n(4476);const i=n(9127);const r=n(7810);class ProduceJWT{constructor(e){if(!(0,i.default)(e)){throw new TypeError("JWT Claims Set MUST be an object")}this._payload=e}setIssuer(e){this._payload={...this._payload,iss:e};return this}setSubject(e){this._payload={...this._payload,sub:e};return this}setAudience(e){this._payload={...this._payload,aud:e};return this}setJti(e){this._payload={...this._payload,jti:e};return this}setNotBefore(e){if(typeof e==="number"){this._payload={...this._payload,nbf:e}}else{this._payload={...this._payload,nbf:(0,s.default)(new Date)+(0,r.default)(e)}}return this}setExpirationTime(e){if(typeof e==="number"){this._payload={...this._payload,exp:e}}else{this._payload={...this._payload,exp:(0,s.default)(new Date)+(0,r.default)(e)}}return this}setIssuedAt(e){if(typeof e==="undefined"){this._payload={...this._payload,iat:(0,s.default)(new Date)}}else{this._payload={...this._payload,iat:e}}return this}}t.ProduceJWT=ProduceJWT},8882:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SignJWT=void 0;const s=n(8257);const i=n(4419);const r=n(1691);const o=n(1908);class SignJWT extends o.ProduceJWT{setProtectedHeader(e){this._protectedHeader=e;return this}async sign(e,t){var n;const o=new s.CompactSign(r.encoder.encode(JSON.stringify(this._payload)));o.setProtectedHeader(this._protectedHeader);if(Array.isArray((n=this._protectedHeader)===null||n===void 0?void 0:n.crit)&&this._protectedHeader.crit.includes("b64")&&this._protectedHeader.b64===false){throw new i.JWTInvalid("JWTs MUST NOT use unencoded payload")}return o.sign(e,t)}}t.SignJWT=SignJWT},8568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UnsecuredJWT=void 0;const s=n(518);const i=n(1691);const r=n(4419);const o=n(7274);const A=n(1908);class UnsecuredJWT extends A.ProduceJWT{encode(){const e=s.encode(JSON.stringify({alg:"none"}));const t=s.encode(JSON.stringify(this._payload));return`${e}.${t}.`}static decode(e,t){if(typeof e!=="string"){throw new r.JWTInvalid("Unsecured JWT must be a string")}const{0:n,1:A,2:a,length:c}=e.split(".");if(c!==3||a!==""){throw new r.JWTInvalid("Invalid Unsecured JWT")}let u;try{u=JSON.parse(i.decoder.decode(s.decode(n)));if(u.alg!=="none")throw new Error}catch{throw new r.JWTInvalid("Invalid Unsecured JWT")}const l=(0,o.default)(u,s.decode(A),t);return{payload:l,header:u}}}t.UnsecuredJWT=UnsecuredJWT},9887:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwtVerify=void 0;const s=n(5212);const i=n(7274);const r=n(4419);async function jwtVerify(e,t,n){var o;const A=await(0,s.compactVerify)(e,t,n);if(((o=A.protectedHeader.crit)===null||o===void 0?void 0:o.includes("b64"))&&A.protectedHeader.b64===false){throw new r.JWTInvalid("JWTs MUST NOT use unencoded payload")}const a=(0,i.default)(A.protectedHeader,A.payload,n);const c={payload:a,protectedHeader:A.protectedHeader};if(typeof t==="function"){return{...c,key:A.key}}return c}t.jwtVerify=jwtVerify},465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.exportJWK=t.exportPKCS8=t.exportSPKI=void 0;const s=n(858);const i=n(858);const r=n(997);async function exportSPKI(e){return(0,s.toSPKI)(e)}t.exportSPKI=exportSPKI;async function exportPKCS8(e){return(0,i.toPKCS8)(e)}t.exportPKCS8=exportPKCS8;async function exportJWK(e){return(0,r.default)(e)}t.exportJWK=exportJWK},1036:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateKeyPair=void 0;const s=n(9378);async function generateKeyPair(e,t){return(0,s.generateKeyPair)(e,t)}t.generateKeyPair=generateKeyPair},6617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateSecret=void 0;const s=n(9378);async function generateSecret(e,t){return(0,s.generateSecret)(e,t)}t.generateSecret=generateSecret},4230:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.importJWK=t.importPKCS8=t.importX509=t.importSPKI=void 0;const s=n(518);const i=n(858);const r=n(2659);const o=n(4419);const A=n(9127);async function importSPKI(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN PUBLIC KEY-----")!==0){throw new TypeError('"spki" must be SPKI formatted string')}return(0,i.fromSPKI)(e,t,n)}t.importSPKI=importSPKI;async function importX509(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN CERTIFICATE-----")!==0){throw new TypeError('"x509" must be X.509 formatted string')}return(0,i.fromX509)(e,t,n)}t.importX509=importX509;async function importPKCS8(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0){throw new TypeError('"pkcs8" must be PKCS#8 formatted string')}return(0,i.fromPKCS8)(e,t,n)}t.importPKCS8=importPKCS8;async function importJWK(e,t,n){var i;if(!(0,A.default)(e)){throw new TypeError("JWK must be an object")}t||(t=e.alg);switch(e.kty){case"oct":if(typeof e.k!=="string"||!e.k){throw new TypeError('missing "k" (Key Value) Parameter value')}n!==null&&n!==void 0?n:n=e.ext!==true;if(n){return(0,r.default)({...e,alg:t,ext:(i=e.ext)!==null&&i!==void 0?i:false})}return(0,s.decode)(e.k);case"RSA":if(e.oth!==undefined){throw new o.JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported')}case"EC":case"OKP":return(0,r.default)({...e,alg:t});default:throw new o.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value')}}t.importJWK=importJWK},233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unwrap=t.wrap=void 0;const s=n(6476);const i=n(6137);const r=n(4630);const o=n(518);async function wrap(e,t,n,i){const A=e.slice(0,7);i||(i=(0,r.default)(A));const{ciphertext:a,tag:c}=await(0,s.default)(A,n,t,i,new Uint8Array(0));return{encryptedKey:a,iv:(0,o.encode)(i),tag:(0,o.encode)(c)}}t.wrap=wrap;async function unwrap(e,t,n,s,r){const o=e.slice(0,7);return(0,i.default)(o,t,n,s,r,new Uint8Array(0))}t.unwrap=unwrap},1691:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.concatKdf=t.lengthAndInput=t.uint32be=t.uint64be=t.p2s=t.concat=t.decoder=t.encoder=void 0;const s=n(2355);t.encoder=new TextEncoder;t.decoder=new TextDecoder;const i=2**32;function concat(...e){const t=e.reduce(((e,{length:t})=>e+t),0);const n=new Uint8Array(t);let s=0;e.forEach((e=>{n.set(e,s);s+=e.length}));return n}t.concat=concat;function p2s(e,n){return concat(t.encoder.encode(e),new Uint8Array([0]),n)}t.p2s=p2s;function writeUInt32BE(e,t,n){if(t<0||t>=i){throw new RangeError(`value must be >= 0 and <= ${i-1}. Received ${t}`)}e.set([t>>>24,t>>>16,t>>>8,t&255],n)}function uint64be(e){const t=Math.floor(e/i);const n=e%i;const s=new Uint8Array(8);writeUInt32BE(s,t,0);writeUInt32BE(s,n,4);return s}t.uint64be=uint64be;function uint32be(e){const t=new Uint8Array(4);writeUInt32BE(t,e);return t}t.uint32be=uint32be;function lengthAndInput(e){return concat(uint32be(e.length),e)}t.lengthAndInput=lengthAndInput;async function concatKdf(e,t,n){const i=Math.ceil((t>>3)/32);const r=new Uint8Array(i*32);for(let t=0;t>3)}t.concatKdf=concatKdf},3987:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.bitLength=void 0;const s=n(4419);const i=n(5770);function bitLength(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new s.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}t.bitLength=bitLength;t["default"]=e=>(0,i.default)(new Uint8Array(bitLength(e)>>3))},1120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(4630);const checkIvLength=(e,t)=>{if(t.length<<3!==(0,i.bitLength)(e)){throw new s.JWEInvalid("Invalid Initialization Vector length")}};t["default"]=checkIvLength},6241:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(1146);const i=n(7947);const symmetricTypeCheck=(e,t)=>{if(t instanceof Uint8Array)return;if(!(0,i.default)(t)){throw new TypeError((0,s.withAlg)(e,t,...i.types,"Uint8Array"))}if(t.type!=="secret"){throw new TypeError(`${i.types.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}};const asymmetricTypeCheck=(e,t,n)=>{if(!(0,i.default)(t)){throw new TypeError((0,s.withAlg)(e,t,...i.types))}if(t.type==="secret"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`)}if(n==="sign"&&t.type==="public"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`)}if(n==="decrypt"&&t.type==="public"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`)}if(t.algorithm&&n==="verify"&&t.type==="private"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`)}if(t.algorithm&&n==="encrypt"&&t.type==="private"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)}};const checkKeyType=(e,t,n)=>{const s=e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e);if(s){symmetricTypeCheck(e,t)}else{asymmetricTypeCheck(e,t,n)}};t["default"]=checkKeyType},3499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function checkP2s(e){if(!(e instanceof Uint8Array)||e.length<8){throw new s.JWEInvalid("PBES2 Salt Input must be 8 or more octets")}}t["default"]=checkP2s},3386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkEncCryptoKey=t.checkSigCryptoKey=void 0;function unusable(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function isAlgorithm(e,t){return e.name===t}function getHashLength(e){return parseInt(e.name.slice(4),10)}function getNamedCurve(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function checkUsage(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const n=t.pop();e+=`one of ${t.join(", ")}, or ${n}.`}else if(t.length===2){e+=`one of ${t[0]} or ${t[1]}.`}else{e+=`${t[0]}.`}throw new TypeError(e)}}function checkSigCryptoKey(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!isAlgorithm(e.algorithm,"HMAC"))throw unusable("HMAC");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!isAlgorithm(e.algorithm,"RSASSA-PKCS1-v1_5"))throw unusable("RSASSA-PKCS1-v1_5");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!isAlgorithm(e.algorithm,"RSA-PSS"))throw unusable("RSA-PSS");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":{if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448"){throw unusable("Ed25519 or Ed448")}break}case"ES256":case"ES384":case"ES512":{if(!isAlgorithm(e.algorithm,"ECDSA"))throw unusable("ECDSA");const n=getNamedCurve(t);const s=e.algorithm.namedCurve;if(s!==n)throw unusable(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(e,n)}t.checkSigCryptoKey=checkSigCryptoKey;function checkEncCryptoKey(e,t,...n){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!isAlgorithm(e.algorithm,"AES-GCM"))throw unusable("AES-GCM");const n=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==n)throw unusable(n,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!isAlgorithm(e.algorithm,"AES-KW"))throw unusable("AES-KW");const n=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==n)throw unusable(n,"algorithm.length");break}case"ECDH":{switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw unusable("ECDH, X25519, or X448")}break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!isAlgorithm(e.algorithm,"PBKDF2"))throw unusable("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!isAlgorithm(e.algorithm,"RSA-OAEP"))throw unusable("RSA-OAEP");const n=parseInt(t.slice(9),10)||1;const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(e,n)}t.checkEncCryptoKey=checkEncCryptoKey},6127:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6083);const i=n(3706);const r=n(6898);const o=n(9526);const A=n(518);const a=n(4419);const c=n(3987);const u=n(4230);const l=n(6241);const d=n(9127);const p=n(233);async function decryptKeyManagement(e,t,n,g,h){(0,l.default)(e,t,"decrypt");switch(e){case"dir":{if(n!==undefined)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");return t}case"ECDH-ES":if(n!==undefined)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!(0,d.default)(g.epk))throw new a.JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`);if(!i.ecdhAllowed(t))throw new a.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime");const r=await(0,u.importJWK)(g.epk,e);let o;let l;if(g.apu!==undefined){if(typeof g.apu!=="string")throw new a.JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`);try{o=(0,A.decode)(g.apu)}catch{throw new a.JWEInvalid("Failed to base64url decode the apu")}}if(g.apv!==undefined){if(typeof g.apv!=="string")throw new a.JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`);try{l=(0,A.decode)(g.apv)}catch{throw new a.JWEInvalid("Failed to base64url decode the apv")}}const p=await i.deriveKey(r,t,e==="ECDH-ES"?g.enc:e,e==="ECDH-ES"?(0,c.bitLength)(g.enc):parseInt(e.slice(-5,-2),10),o,l);if(e==="ECDH-ES")return p;if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,s.unwrap)(e.slice(-6),p,n)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,o.decrypt)(e,t,n)}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");if(typeof g.p2c!=="number")throw new a.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`);const s=(h===null||h===void 0?void 0:h.maxPBES2Count)||1e4;if(g.p2c>s)throw new a.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds`);if(typeof g.p2s!=="string")throw new a.JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`);let i;try{i=(0,A.decode)(g.p2s)}catch{throw new a.JWEInvalid("Failed to base64url decode the p2s")}return(0,r.decrypt)(e,t,n,g.p2c,i)}case"A128KW":case"A192KW":case"A256KW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,s.unwrap)(e,t,n)}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");if(typeof g.iv!=="string")throw new a.JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`);if(typeof g.tag!=="string")throw new a.JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`);let s;try{s=(0,A.decode)(g.iv)}catch{throw new a.JWEInvalid("Failed to base64url decode the iv")}let i;try{i=(0,A.decode)(g.tag)}catch{throw new a.JWEInvalid("Failed to base64url decode the tag")}return(0,p.unwrap)(e,t,n,s,i)}default:{throw new a.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}}t["default"]=decryptKeyManagement},3286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6083);const i=n(3706);const r=n(6898);const o=n(9526);const A=n(518);const a=n(3987);const c=n(4419);const u=n(465);const l=n(6241);const d=n(233);async function encryptKeyManagement(e,t,n,p,g={}){let h;let f;let E;(0,l.default)(e,n,"encrypt");switch(e){case"dir":{E=n;break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!i.ecdhAllowed(n)){throw new c.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime")}const{apu:r,apv:o}=g;let{epk:l}=g;l||(l=(await i.generateEpk(n)).privateKey);const{x:d,y:m,crv:C,kty:Q}=await(0,u.exportJWK)(l);const I=await i.deriveKey(n,l,e==="ECDH-ES"?t:e,e==="ECDH-ES"?(0,a.bitLength)(t):parseInt(e.slice(-5,-2),10),r,o);f={epk:{x:d,crv:C,kty:Q}};if(Q==="EC")f.epk.y=m;if(r)f.apu=(0,A.encode)(r);if(o)f.apv=(0,A.encode)(o);if(e==="ECDH-ES"){E=I;break}E=p||(0,a.default)(t);const B=e.slice(-6);h=await(0,s.wrap)(B,I,E);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{E=p||(0,a.default)(t);h=await(0,o.encrypt)(e,n,E);break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{E=p||(0,a.default)(t);const{p2c:s,p2s:i}=g;({encryptedKey:h,...f}=await(0,r.encrypt)(e,n,E,s,i));break}case"A128KW":case"A192KW":case"A256KW":{E=p||(0,a.default)(t);h=await(0,s.wrap)(e,n,E);break}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{E=p||(0,a.default)(t);const{iv:s}=g;({encryptedKey:h,...f}=await(0,d.wrap)(e,n,E,s));break}default:{throw new c.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}return{cek:E,encryptedKey:h,parameters:f}}t["default"]=encryptKeyManagement},4476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=e=>Math.floor(e.getTime()/1e3)},1146:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.withAlg=void 0;function message(e,t,...n){if(n.length>2){const t=n.pop();e+=`one of type ${n.join(", ")}, or ${t}.`}else if(n.length===2){e+=`one of type ${n[0]} or ${n[1]}.`}else{e+=`of type ${n[0]}.`}if(t==null){e+=` Received ${t}`}else if(typeof t==="function"&&t.name){e+=` Received function ${t.name}`}else if(typeof t==="object"&&t!=null){if(t.constructor&&t.constructor.name){e+=` Received an instance of ${t.constructor.name}`}}return e}t["default"]=(e,...t)=>message("Key must be ",e,...t);function withAlg(e,t,...n){return message(`Key for the ${e} algorithm must be `,t,...n)}t.withAlg=withAlg},6063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const isDisjoint=(...e)=>{const t=e.filter(Boolean);if(t.length===0||t.length===1){return true}let n;for(const e of t){const t=Object.keys(e);if(!n||n.size===0){n=new Set(t);continue}for(const e of t){if(n.has(e)){return false}n.add(e)}}return true};t["default"]=isDisjoint},9127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function isObjectLike(e){return typeof e==="object"&&e!==null}function isObject(e){if(!isObjectLike(e)||Object.prototype.toString.call(e)!=="[object Object]"){return false}if(Object.getPrototypeOf(e)===null){return true}let t=e;while(Object.getPrototypeOf(t)!==null){t=Object.getPrototypeOf(t)}return Object.getPrototypeOf(e)===t}t["default"]=isObject},4630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.bitLength=void 0;const s=n(4419);const i=n(5770);function bitLength(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new s.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}t.bitLength=bitLength;t["default"]=e=>(0,i.default)(new Uint8Array(bitLength(e)>>3))},7274:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(1691);const r=n(4476);const o=n(7810);const A=n(9127);const normalizeTyp=e=>e.toLowerCase().replace(/^application\//,"");const checkAudiencePresence=(e,t)=>{if(typeof e==="string"){return t.includes(e)}if(Array.isArray(e)){return t.some(Set.prototype.has.bind(new Set(e)))}return false};t["default"]=(e,t,n={})=>{const{typ:a}=n;if(a&&(typeof e.typ!=="string"||normalizeTyp(e.typ)!==normalizeTyp(a))){throw new s.JWTClaimValidationFailed('unexpected "typ" JWT header value',"typ","check_failed")}let c;try{c=JSON.parse(i.decoder.decode(t))}catch{}if(!(0,A.default)(c)){throw new s.JWTInvalid("JWT Claims Set must be a top-level JSON object")}const{requiredClaims:u=[],issuer:l,subject:d,audience:p,maxTokenAge:g}=n;if(g!==undefined)u.push("iat");if(p!==undefined)u.push("aud");if(d!==undefined)u.push("sub");if(l!==undefined)u.push("iss");for(const e of new Set(u.reverse())){if(!(e in c)){throw new s.JWTClaimValidationFailed(`missing required "${e}" claim`,e,"missing")}}if(l&&!(Array.isArray(l)?l:[l]).includes(c.iss)){throw new s.JWTClaimValidationFailed('unexpected "iss" claim value',"iss","check_failed")}if(d&&c.sub!==d){throw new s.JWTClaimValidationFailed('unexpected "sub" claim value',"sub","check_failed")}if(p&&!checkAudiencePresence(c.aud,typeof p==="string"?[p]:p)){throw new s.JWTClaimValidationFailed('unexpected "aud" claim value',"aud","check_failed")}let h;switch(typeof n.clockTolerance){case"string":h=(0,o.default)(n.clockTolerance);break;case"number":h=n.clockTolerance;break;case"undefined":h=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:f}=n;const E=(0,r.default)(f||new Date);if((c.iat!==undefined||g)&&typeof c.iat!=="number"){throw new s.JWTClaimValidationFailed('"iat" claim must be a number',"iat","invalid")}if(c.nbf!==undefined){if(typeof c.nbf!=="number"){throw new s.JWTClaimValidationFailed('"nbf" claim must be a number',"nbf","invalid")}if(c.nbf>E+h){throw new s.JWTClaimValidationFailed('"nbf" claim timestamp check failed',"nbf","check_failed")}}if(c.exp!==undefined){if(typeof c.exp!=="number"){throw new s.JWTClaimValidationFailed('"exp" claim must be a number',"exp","invalid")}if(c.exp<=E-h){throw new s.JWTExpired('"exp" claim timestamp check failed',"exp","check_failed")}}if(g){const e=E-c.iat;const t=typeof g==="number"?g:(0,o.default)(g);if(e-h>t){throw new s.JWTExpired('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed")}if(e<0-h){throw new s.JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}}return c}},7810:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=60;const s=n*60;const i=s*24;const r=i*7;const o=i*365.25;const A=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i;t["default"]=e=>{const t=A.exec(e);if(!t){throw new TypeError("Invalid time period format")}const a=parseFloat(t[1]);const c=t[2].toLowerCase();switch(c){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(a);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(a*n);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(a*s);case"day":case"days":case"d":return Math.round(a*i);case"week":case"weeks":case"w":return Math.round(a*r);default:return Math.round(a*o)}}},5148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const validateAlgorithms=(e,t)=>{if(t!==undefined&&(!Array.isArray(t)||t.some((e=>typeof e!=="string")))){throw new TypeError(`"${e}" option must be an array of strings`)}if(!t){return undefined}return new Set(t)};t["default"]=validateAlgorithms},863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function validateCrit(e,t,n,i,r){if(r.crit!==undefined&&i.crit===undefined){throw new e('"crit" (Critical) Header Parameter MUST be integrity protected')}if(!i||i.crit===undefined){return new Set}if(!Array.isArray(i.crit)||i.crit.length===0||i.crit.some((e=>typeof e!=="string"||e.length===0))){throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present')}let o;if(n!==undefined){o=new Map([...Object.entries(n),...t.entries()])}else{o=t}for(const t of i.crit){if(!o.has(t)){throw new s.JOSENotSupported(`Extension Header Parameter "${t}" is not recognized`)}if(r[t]===undefined){throw new e(`Extension Header Parameter "${t}" is missing`)}else if(o.get(t)&&i[t]===undefined){throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}}return new Set(i.crit)}t["default"]=validateCrit},6083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unwrap=t.wrap=void 0;const s=n(4300);const i=n(6113);const r=n(4419);const o=n(1691);const A=n(6852);const a=n(3386);const c=n(2768);const u=n(1146);const l=n(4618);const d=n(7947);function checkKeySize(e,t){if(e.symmetricKeySize<<3!==parseInt(t.slice(1,4),10)){throw new TypeError(`Invalid key size for alg: ${t}`)}}function ensureKeyObject(e,t,n){if((0,c.default)(e)){return e}if(e instanceof Uint8Array){return(0,i.createSecretKey)(e)}if((0,A.isCryptoKey)(e)){(0,a.checkEncCryptoKey)(e,t,n);return i.KeyObject.from(e)}throw new TypeError((0,u.default)(e,...d.types,"Uint8Array"))}const wrap=(e,t,n)=>{const A=parseInt(e.slice(1,4),10);const a=`aes${A}-wrap`;if(!(0,l.default)(a)){throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}const c=ensureKeyObject(t,e,"wrapKey");checkKeySize(c,e);const u=(0,i.createCipheriv)(a,c,s.Buffer.alloc(8,166));return(0,o.concat)(u.update(n),u.final())};t.wrap=wrap;const unwrap=(e,t,n)=>{const A=parseInt(e.slice(1,4),10);const a=`aes${A}-wrap`;if(!(0,l.default)(a)){throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}const c=ensureKeyObject(t,e,"unwrapKey");checkKeySize(c,e);const u=(0,i.createDecipheriv)(a,c,s.Buffer.alloc(8,166));return(0,o.concat)(u.update(n),u.final())};t.unwrap=unwrap},858:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.fromX509=t.fromSPKI=t.fromPKCS8=t.toPKCS8=t.toSPKI=void 0;const s=n(6113);const i=n(4300);const r=n(6852);const o=n(2768);const A=n(1146);const a=n(7947);const genericExport=(e,t,n)=>{let i;if((0,r.isCryptoKey)(n)){if(!n.extractable){throw new TypeError("CryptoKey is not extractable")}i=s.KeyObject.from(n)}else if((0,o.default)(n)){i=n}else{throw new TypeError((0,A.default)(n,...a.types))}if(i.type!==e){throw new TypeError(`key is not a ${e} key`)}return i.export({format:"pem",type:t})};const toSPKI=e=>genericExport("public","spki",e);t.toSPKI=toSPKI;const toPKCS8=e=>genericExport("private","pkcs8",e);t.toPKCS8=toPKCS8;const fromPKCS8=e=>(0,s.createPrivateKey)({key:i.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,""),"base64"),type:"pkcs8",format:"der"});t.fromPKCS8=fromPKCS8;const fromSPKI=e=>(0,s.createPublicKey)({key:i.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,""),"base64"),type:"spki",format:"der"});t.fromSPKI=fromSPKI;const fromX509=e=>(0,s.createPublicKey)({key:e,type:"spki",format:"pem"});t.fromX509=fromX509},3888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=2;const s=48;class Asn1SequenceDecoder{constructor(e){if(e[0]!==s){throw new TypeError}this.buffer=e;this.offset=1;const t=this.decodeLength();if(t!==e.length-this.offset){throw new TypeError}}decodeLength(){let e=this.buffer[this.offset++];if(e&128){const t=e&~128;e=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4300);const i=n(4419);const r=2;const o=3;const A=4;const a=48;const c=s.Buffer.from([0]);const u=s.Buffer.from([r]);const l=s.Buffer.from([o]);const d=s.Buffer.from([a]);const p=s.Buffer.from([A]);const encodeLength=e=>{if(e<128)return s.Buffer.from([e]);const t=s.Buffer.alloc(5);t.writeUInt32BE(e,1);let n=1;while(t[n]===0)n++;t[n-1]=128|5-n;return t.slice(n-1)};const g=new Map([["P-256",s.Buffer.from("06 08 2A 86 48 CE 3D 03 01 07".replace(/ /g,""),"hex")],["secp256k1",s.Buffer.from("06 05 2B 81 04 00 0A".replace(/ /g,""),"hex")],["P-384",s.Buffer.from("06 05 2B 81 04 00 22".replace(/ /g,""),"hex")],["P-521",s.Buffer.from("06 05 2B 81 04 00 23".replace(/ /g,""),"hex")],["ecPublicKey",s.Buffer.from("06 07 2A 86 48 CE 3D 02 01".replace(/ /g,""),"hex")],["X25519",s.Buffer.from("06 03 2B 65 6E".replace(/ /g,""),"hex")],["X448",s.Buffer.from("06 03 2B 65 6F".replace(/ /g,""),"hex")],["Ed25519",s.Buffer.from("06 03 2B 65 70".replace(/ /g,""),"hex")],["Ed448",s.Buffer.from("06 03 2B 65 71".replace(/ /g,""),"hex")]]);class DumbAsn1Encoder{constructor(){this.length=0;this.elements=[]}oidFor(e){const t=g.get(e);if(!t){throw new i.JOSENotSupported("Invalid or unsupported OID")}this.elements.push(t);this.length+=t.length}zero(){this.elements.push(u,s.Buffer.from([1]),c);this.length+=3}one(){this.elements.push(u,s.Buffer.from([1]),s.Buffer.from([1]));this.length+=3}unsignedInteger(e){if(e[0]&128){const t=encodeLength(e.length+1);this.elements.push(u,t,c,e);this.length+=2+t.length+e.length}else{let t=0;while(e[t]===0&&(e[t+1]&128)===0)t++;const n=encodeLength(e.length-t);this.elements.push(u,encodeLength(e.length-t),e.slice(t));this.length+=1+n.length+e.length-t}}octStr(e){const t=encodeLength(e.length);this.elements.push(p,encodeLength(e.length),e);this.length+=1+t.length+e.length}bitStr(e){const t=encodeLength(e.length+1);this.elements.push(l,encodeLength(e.length+1),c,e);this.length+=1+t.length+e.length+1}add(e){this.elements.push(e);this.length+=e.length}end(e=d){const t=encodeLength(this.length);return s.Buffer.concat([e,t,...this.elements],1+t.length+this.length)}}t["default"]=DumbAsn1Encoder},518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=t.encodeBase64=t.decodeBase64=void 0;const s=n(4300);const i=n(1691);let r;function normalize(e){let t=e;if(t instanceof Uint8Array){t=i.decoder.decode(t)}return t}if(s.Buffer.isEncoding("base64url")){t.encode=r=e=>s.Buffer.from(e).toString("base64url")}else{t.encode=r=e=>s.Buffer.from(e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}const decodeBase64=e=>s.Buffer.from(e,"base64");t.decodeBase64=decodeBase64;const encodeBase64=e=>s.Buffer.from(e).toString("base64");t.encodeBase64=encodeBase64;const decode=e=>s.Buffer.from(normalize(e),"base64");t.decode=decode},4519:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1691);function cbcTag(e,t,n,r,o,A){const a=(0,i.concat)(e,t,n,(0,i.uint64be)(e.length<<3));const c=(0,s.createHmac)(`sha${r}`,o);c.update(a);return c.digest().slice(0,A>>3)}t["default"]=cbcTag},4047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(2768);const checkCekLength=(e,t)=>{let n;switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":n=parseInt(e.slice(-3),10);break;case"A128GCM":case"A192GCM":case"A256GCM":n=parseInt(e.slice(1,4),10);break;default:throw new s.JOSENotSupported(`Content Encryption Algorithm ${e} is not supported either by JOSE or your javascript runtime`)}if(t instanceof Uint8Array){const e=t.byteLength<<3;if(e!==n){throw new s.JWEInvalid(`Invalid Content Encryption Key length. Expected ${n} bits, got ${e} bits`)}return}if((0,i.default)(t)&&t.type==="secret"){const e=t.symmetricKeySize<<3;if(e!==n){throw new s.JWEInvalid(`Invalid Content Encryption Key length. Expected ${n} bits, got ${e} bits`)}return}throw new TypeError("Invalid Content Encryption Key type")};t["default"]=checkCekLength},122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setModulusLength=t.weakMap=void 0;t.weakMap=new WeakMap;const getLength=(e,t)=>{let n=e.readUInt8(1);if((n&128)===0){if(t===0){return n}return getLength(e.subarray(2+n),t-1)}const s=n&127;n=0;for(let t=0;t{const n=e.readUInt8(1);if((n&128)===0){return getLength(e.subarray(2),t)}const s=n&127;return getLength(e.subarray(2+s),t)};const getModulusLength=e=>{var n,s;if(t.weakMap.has(e)){return t.weakMap.get(e)}const i=(s=(n=e.asymmetricKeyDetails)===null||n===void 0?void 0:n.modulusLength)!==null&&s!==void 0?s:getLengthOfSeqIndex(e.export({format:"der",type:"pkcs1"}),e.type==="private"?1:0)-1<<3;t.weakMap.set(e,i);return i};const setModulusLength=(e,n)=>{t.weakMap.set(e,n)};t.setModulusLength=setModulusLength;t["default"]=(e,t)=>{if(getModulusLength(e)<2048){throw new TypeError(`${t} requires key modulusLength to be 2048 bits or larger`)}}},4618:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);let i;t["default"]=e=>{i||(i=new Set((0,s.getCiphers)()));return i.has(e)}},6137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1120);const r=n(4047);const o=n(1691);const A=n(4419);const a=n(5390);const c=n(4519);const u=n(6852);const l=n(3386);const d=n(2768);const p=n(1146);const g=n(4618);const h=n(7947);function cbcDecrypt(e,t,n,i,r,u){const l=parseInt(e.slice(1,4),10);if((0,d.default)(t)){t=t.export()}const p=t.subarray(l>>3);const h=t.subarray(0,l>>3);const f=parseInt(e.slice(-3),10);const E=`aes-${l}-cbc`;if(!(0,g.default)(E)){throw new A.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const m=(0,c.default)(u,i,n,f,h,l);let C;try{C=(0,a.default)(r,m)}catch{}if(!C){throw new A.JWEDecryptionFailed}let Q;try{const e=(0,s.createDecipheriv)(E,p,i);Q=(0,o.concat)(e.update(n),e.final())}catch{}if(!Q){throw new A.JWEDecryptionFailed}return Q}function gcmDecrypt(e,t,n,i,r,o){const a=parseInt(e.slice(1,4),10);const c=`aes-${a}-gcm`;if(!(0,g.default)(c)){throw new A.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}try{const e=(0,s.createDecipheriv)(c,t,i,{authTagLength:16});e.setAuthTag(r);if(o.byteLength){e.setAAD(o,{plaintextLength:n.length})}const A=e.update(n);e.final();return A}catch{throw new A.JWEDecryptionFailed}}const decrypt=(e,t,n,o,a,c)=>{let g;if((0,u.isCryptoKey)(t)){(0,l.checkEncCryptoKey)(t,e,"decrypt");g=s.KeyObject.from(t)}else if(t instanceof Uint8Array||(0,d.default)(t)){g=t}else{throw new TypeError((0,p.default)(t,...h.types,"Uint8Array"))}(0,r.default)(e,g);(0,i.default)(e,o);switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return cbcDecrypt(e,g,n,o,a,c);case"A128GCM":case"A192GCM":case"A256GCM":return gcmDecrypt(e,g,n,o,a,c);default:throw new A.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}};t["default"]=decrypt},2355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const digest=(e,t)=>(0,s.createHash)(e).update(t).digest();t["default"]=digest},4965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function dsaDigest(e){switch(e){case"PS256":case"RS256":case"ES256":case"ES256K":return"sha256";case"PS384":case"RS384":case"ES384":return"sha384";case"PS512":case"RS512":case"ES512":return"sha512";case"EdDSA":return undefined;default:throw new s.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=dsaDigest},3706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ecdhAllowed=t.generateEpk=t.deriveKey=void 0;const s=n(6113);const i=n(3837);const r=n(9302);const o=n(1691);const A=n(4419);const a=n(6852);const c=n(3386);const u=n(2768);const l=n(1146);const d=n(7947);const p=(0,i.promisify)(s.generateKeyPair);async function deriveKey(e,t,n,i,r=new Uint8Array(0),A=new Uint8Array(0)){let p;if((0,a.isCryptoKey)(e)){(0,c.checkEncCryptoKey)(e,"ECDH");p=s.KeyObject.from(e)}else if((0,u.default)(e)){p=e}else{throw new TypeError((0,l.default)(e,...d.types))}let g;if((0,a.isCryptoKey)(t)){(0,c.checkEncCryptoKey)(t,"ECDH","deriveBits");g=s.KeyObject.from(t)}else if((0,u.default)(t)){g=t}else{throw new TypeError((0,l.default)(t,...d.types))}const h=(0,o.concat)((0,o.lengthAndInput)(o.encoder.encode(n)),(0,o.lengthAndInput)(r),(0,o.lengthAndInput)(A),(0,o.uint32be)(i));const f=(0,s.diffieHellman)({privateKey:g,publicKey:p});return(0,o.concatKdf)(f,i,h)}t.deriveKey=deriveKey;async function generateEpk(e){let t;if((0,a.isCryptoKey)(e)){t=s.KeyObject.from(e)}else if((0,u.default)(e)){t=e}else{throw new TypeError((0,l.default)(e,...d.types))}switch(t.asymmetricKeyType){case"x25519":return p("x25519");case"x448":{return p("x448")}case"ec":{const e=(0,r.default)(t);return p("ec",{namedCurve:e})}default:throw new A.JOSENotSupported("Invalid or unsupported EPK")}}t.generateEpk=generateEpk;const ecdhAllowed=e=>["P-256","P-384","P-521","X25519","X448"].includes((0,r.default)(e));t.ecdhAllowed=ecdhAllowed},6476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1120);const r=n(4047);const o=n(1691);const A=n(4519);const a=n(6852);const c=n(3386);const u=n(2768);const l=n(1146);const d=n(4419);const p=n(4618);const g=n(7947);function cbcEncrypt(e,t,n,i,r){const a=parseInt(e.slice(1,4),10);if((0,u.default)(n)){n=n.export()}const c=n.subarray(a>>3);const l=n.subarray(0,a>>3);const g=`aes-${a}-cbc`;if(!(0,p.default)(g)){throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const h=(0,s.createCipheriv)(g,c,i);const f=(0,o.concat)(h.update(t),h.final());const E=parseInt(e.slice(-3),10);const m=(0,A.default)(r,i,f,E,l,a);return{ciphertext:f,tag:m}}function gcmEncrypt(e,t,n,i,r){const o=parseInt(e.slice(1,4),10);const A=`aes-${o}-gcm`;if(!(0,p.default)(A)){throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const a=(0,s.createCipheriv)(A,n,i,{authTagLength:16});if(r.byteLength){a.setAAD(r,{plaintextLength:t.length})}const c=a.update(t);a.final();const u=a.getAuthTag();return{ciphertext:c,tag:u}}const encrypt=(e,t,n,o,A)=>{let p;if((0,a.isCryptoKey)(n)){(0,c.checkEncCryptoKey)(n,e,"encrypt");p=s.KeyObject.from(n)}else if(n instanceof Uint8Array||(0,u.default)(n)){p=n}else{throw new TypeError((0,l.default)(n,...g.types,"Uint8Array"))}(0,r.default)(e,p);(0,i.default)(e,o);switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return cbcEncrypt(e,t,p,o,A);case"A128GCM":case"A192GCM":case"A256GCM":return gcmEncrypt(e,t,p,o,A);default:throw new d.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}};t["default"]=encrypt},3650:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(3685);const i=n(5687);const r=n(2361);const o=n(4419);const A=n(1691);const fetchJwks=async(e,t,n)=>{let a;switch(e.protocol){case"https:":a=i.get;break;case"http:":a=s.get;break;default:throw new TypeError("Unsupported URL protocol.")}const{agent:c,headers:u}=n;const l=a(e.href,{agent:c,timeout:t,headers:u});const[d]=await Promise.race([(0,r.once)(l,"response"),(0,r.once)(l,"timeout")]);if(!d){l.destroy();throw new o.JWKSTimeout}if(d.statusCode!==200){throw new o.JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response")}const p=[];for await(const e of d){p.push(e)}try{return JSON.parse(A.decoder.decode((0,A.concat)(...p)))}catch{throw new o.JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON")}};t["default"]=fetchJwks},9737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwkImport=t.jwkExport=t.rsaPssParams=t.oneShotCallback=void 0;const[n,s]=process.versions.node.split(".").map((e=>parseInt(e,10)));t.oneShotCallback=n>=16||n===15&&s>=13;t.rsaPssParams=!("electron"in process.versions)&&(n>=17||n===16&&s>=9);t.jwkExport=n>=16||n===15&&s>=9;t.jwkImport=n>=16||n===15&&s>=12},9378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateKeyPair=t.generateSecret=void 0;const s=n(6113);const i=n(3837);const r=n(5770);const o=n(122);const A=n(4419);const a=(0,i.promisify)(s.generateKeyPair);async function generateSecret(e,t){let n;switch(e){case"HS256":case"HS384":case"HS512":case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":n=parseInt(e.slice(-3),10);break;case"A128KW":case"A192KW":case"A256KW":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":n=parseInt(e.slice(1,4),10);break;default:throw new A.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return(0,s.createSecretKey)((0,r.default)(new Uint8Array(n>>3)))}t.generateSecret=generateSecret;async function generateKeyPair(e,t){var n,s;switch(e){case"RS256":case"RS384":case"RS512":case"PS256":case"PS384":case"PS512":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":case"RSA1_5":{const e=(n=t===null||t===void 0?void 0:t.modulusLength)!==null&&n!==void 0?n:2048;if(typeof e!=="number"||e<2048){throw new A.JOSENotSupported("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used")}const s=await a("rsa",{modulusLength:e,publicExponent:65537});(0,o.setModulusLength)(s.privateKey,e);(0,o.setModulusLength)(s.publicKey,e);return s}case"ES256":return a("ec",{namedCurve:"P-256"});case"ES256K":return a("ec",{namedCurve:"secp256k1"});case"ES384":return a("ec",{namedCurve:"P-384"});case"ES512":return a("ec",{namedCurve:"P-521"});case"EdDSA":{switch(t===null||t===void 0?void 0:t.crv){case undefined:case"Ed25519":return a("ed25519");case"Ed448":return a("ed448");default:throw new A.JOSENotSupported("Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448")}}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":const e=(s=t===null||t===void 0?void 0:t.crv)!==null&&s!==void 0?s:"P-256";switch(e){case undefined:case"P-256":case"P-384":case"P-521":return a("ec",{namedCurve:e});case"X25519":return a("x25519");case"X448":return a("x448");default:throw new A.JOSENotSupported("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}default:throw new A.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}}t.generateKeyPair=generateKeyPair},9302:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setCurve=t.weakMap=void 0;const s=n(4300);const i=n(6113);const r=n(4419);const o=n(6852);const A=n(2768);const a=n(1146);const c=n(7947);const u=s.Buffer.from([42,134,72,206,61,3,1,7]);const l=s.Buffer.from([43,129,4,0,34]);const d=s.Buffer.from([43,129,4,0,35]);const p=s.Buffer.from([43,129,4,0,10]);t.weakMap=new WeakMap;const namedCurveToJOSE=e=>{switch(e){case"prime256v1":return"P-256";case"secp384r1":return"P-384";case"secp521r1":return"P-521";case"secp256k1":return"secp256k1";default:throw new r.JOSENotSupported("Unsupported key curve for this operation")}};const getNamedCurve=(e,n)=>{var s;let g;if((0,o.isCryptoKey)(e)){g=i.KeyObject.from(e)}else if((0,A.default)(e)){g=e}else{throw new TypeError((0,a.default)(e,...c.types))}if(g.type==="secret"){throw new TypeError('only "private" or "public" type keys can be used for this operation')}switch(g.asymmetricKeyType){case"ed25519":case"ed448":return`Ed${g.asymmetricKeyType.slice(2)}`;case"x25519":case"x448":return`X${g.asymmetricKeyType.slice(1)}`;case"ec":{if(t.weakMap.has(g)){return t.weakMap.get(g)}let e=(s=g.asymmetricKeyDetails)===null||s===void 0?void 0:s.namedCurve;if(!e&&g.type==="private"){e=getNamedCurve((0,i.createPublicKey)(g),true)}else if(!e){const t=g.export({format:"der",type:"spki"});const n=t[1]<128?14:15;const s=t[n];const i=t.slice(n+1,n+1+s);if(i.equals(u)){e="prime256v1"}else if(i.equals(l)){e="secp384r1"}else if(i.equals(d)){e="secp521r1"}else if(i.equals(p)){e="secp256k1"}else{throw new r.JOSENotSupported("Unsupported key curve for this operation")}}if(n)return e;const o=namedCurveToJOSE(e);t.weakMap.set(g,o);return o}default:throw new TypeError("Invalid asymmetric key type for this operation")}};function setCurve(e,n){t.weakMap.set(e,n)}t.setCurve=setCurve;t["default"]=getNamedCurve},3170:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(6852);const r=n(3386);const o=n(1146);const A=n(7947);function getSignVerifyKey(e,t,n){if(t instanceof Uint8Array){if(!e.startsWith("HS")){throw new TypeError((0,o.default)(t,...A.types))}return(0,s.createSecretKey)(t)}if(t instanceof s.KeyObject){return t}if((0,i.isCryptoKey)(t)){(0,r.checkSigCryptoKey)(t,e,n);return s.KeyObject.from(t)}throw new TypeError((0,o.default)(t,...A.types,"Uint8Array"))}t["default"]=getSignVerifyKey},3811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function hmacDigest(e){switch(e){case"HS256":return"sha256";case"HS384":return"sha384";case"HS512":return"sha512";default:throw new s.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=hmacDigest},7947:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.types=void 0;const s=n(6852);const i=n(2768);t["default"]=e=>(0,i.default)(e)||(0,s.isCryptoKey)(e);const r=["KeyObject"];t.types=r;if(globalThis.CryptoKey||(s.default===null||s.default===void 0?void 0:s.default.CryptoKey)){r.push("CryptoKey")}},2768:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);t["default"]=i.types.isKeyObject?e=>i.types.isKeyObject(e):e=>e!=null&&e instanceof s.KeyObject},2659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4300);const i=n(6113);const r=n(518);const o=n(4419);const A=n(9302);const a=n(122);const c=n(3341);const u=n(9737);const parse=e=>{if(u.jwkImport&&e.kty!=="oct"){return e.d?(0,i.createPrivateKey)({format:"jwk",key:e}):(0,i.createPublicKey)({format:"jwk",key:e})}switch(e.kty){case"oct":{return(0,i.createSecretKey)((0,r.decode)(e.k))}case"RSA":{const t=new c.default;const n=e.d!==undefined;const r=s.Buffer.from(e.n,"base64");const o=s.Buffer.from(e.e,"base64");if(n){t.zero();t.unsignedInteger(r);t.unsignedInteger(o);t.unsignedInteger(s.Buffer.from(e.d,"base64"));t.unsignedInteger(s.Buffer.from(e.p,"base64"));t.unsignedInteger(s.Buffer.from(e.q,"base64"));t.unsignedInteger(s.Buffer.from(e.dp,"base64"));t.unsignedInteger(s.Buffer.from(e.dq,"base64"));t.unsignedInteger(s.Buffer.from(e.qi,"base64"))}else{t.unsignedInteger(r);t.unsignedInteger(o)}const A=t.end();const u={key:A,format:"der",type:"pkcs1"};const l=n?(0,i.createPrivateKey)(u):(0,i.createPublicKey)(u);(0,a.setModulusLength)(l,r.length<<3);return l}case"EC":{const t=new c.default;const n=e.d!==undefined;const r=s.Buffer.concat([s.Buffer.alloc(1,4),s.Buffer.from(e.x,"base64"),s.Buffer.from(e.y,"base64")]);if(n){t.zero();const n=new c.default;n.oidFor("ecPublicKey");n.oidFor(e.crv);t.add(n.end());const o=new c.default;o.one();o.octStr(s.Buffer.from(e.d,"base64"));const a=new c.default;a.bitStr(r);const u=a.end(s.Buffer.from([161]));o.add(u);const l=o.end();const d=new c.default;d.add(l);const p=d.end(s.Buffer.from([4]));t.add(p);const g=t.end();const h=(0,i.createPrivateKey)({key:g,format:"der",type:"pkcs8"});(0,A.setCurve)(h,e.crv);return h}const o=new c.default;o.oidFor("ecPublicKey");o.oidFor(e.crv);t.add(o.end());t.bitStr(r);const a=t.end();const u=(0,i.createPublicKey)({key:a,format:"der",type:"spki"});(0,A.setCurve)(u,e.crv);return u}case"OKP":{const t=new c.default;const n=e.d!==undefined;if(n){t.zero();const n=new c.default;n.oidFor(e.crv);t.add(n.end());const r=new c.default;r.octStr(s.Buffer.from(e.d,"base64"));const o=r.end(s.Buffer.from([4]));t.add(o);const A=t.end();return(0,i.createPrivateKey)({key:A,format:"der",type:"pkcs8"})}const r=new c.default;r.oidFor(e.crv);t.add(r.end());t.bitStr(s.Buffer.from(e.x,"base64"));const o=t.end();return(0,i.createPublicKey)({key:o,format:"der",type:"spki"})}default:throw new o.JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}};t["default"]=parse},997:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(518);const r=n(3888);const o=n(4419);const A=n(9302);const a=n(6852);const c=n(2768);const u=n(1146);const l=n(7947);const d=n(9737);const keyToJWK=e=>{let t;if((0,a.isCryptoKey)(e)){if(!e.extractable){throw new TypeError("CryptoKey is not extractable")}t=s.KeyObject.from(e)}else if((0,c.default)(e)){t=e}else if(e instanceof Uint8Array){return{kty:"oct",k:(0,i.encode)(e)}}else{throw new TypeError((0,u.default)(e,...l.types,"Uint8Array"))}if(d.jwkExport){if(t.type!=="secret"&&!["rsa","ec","ed25519","x25519","ed448","x448"].includes(t.asymmetricKeyType)){throw new o.JOSENotSupported("Unsupported key asymmetricKeyType")}return t.export({format:"jwk"})}switch(t.type){case"secret":return{kty:"oct",k:(0,i.encode)(t.export())};case"private":case"public":{switch(t.asymmetricKeyType){case"rsa":{const e=t.export({format:"der",type:"pkcs1"});const n=new r.default(e);if(t.type==="private"){n.unsignedInteger()}const s=(0,i.encode)(n.unsignedInteger());const o=(0,i.encode)(n.unsignedInteger());let A;if(t.type==="private"){A={d:(0,i.encode)(n.unsignedInteger()),p:(0,i.encode)(n.unsignedInteger()),q:(0,i.encode)(n.unsignedInteger()),dp:(0,i.encode)(n.unsignedInteger()),dq:(0,i.encode)(n.unsignedInteger()),qi:(0,i.encode)(n.unsignedInteger())}}n.end();return{kty:"RSA",n:s,e:o,...A}}case"ec":{const e=(0,A.default)(t);let n;let r;let a;switch(e){case"secp256k1":n=64;r=31+2;a=-1;break;case"P-256":n=64;r=34+2;a=-1;break;case"P-384":n=96;r=33+2;a=-3;break;case"P-521":n=132;r=33+2;a=-3;break;default:throw new o.JOSENotSupported("Unsupported curve")}if(t.type==="public"){const s=t.export({type:"spki",format:"der"});return{kty:"EC",crv:e,x:(0,i.encode)(s.subarray(-n,-n/2)),y:(0,i.encode)(s.subarray(-n/2))}}const c=t.export({type:"pkcs8",format:"der"});if(c.length<100){r+=a}return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(c.subarray(r,r+n/2))}}case"ed25519":case"x25519":{const e=(0,A.default)(t);if(t.type==="public"){const n=t.export({type:"spki",format:"der"});return{kty:"OKP",crv:e,x:(0,i.encode)(n.subarray(-32))}}const n=t.export({type:"pkcs8",format:"der"});return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(n.subarray(-32))}}case"ed448":case"x448":{const e=(0,A.default)(t);if(t.type==="public"){const n=t.export({type:"spki",format:"der"});return{kty:"OKP",crv:e,x:(0,i.encode)(n.subarray(e==="Ed448"?-57:-56))}}const n=t.export({type:"pkcs8",format:"der"});return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(n.subarray(e==="Ed448"?-57:-56))}}default:throw new o.JOSENotSupported("Unsupported key asymmetricKeyType")}}default:throw new o.JOSENotSupported("Unsupported key type")}};t["default"]=keyToJWK},2413:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(9302);const r=n(4419);const o=n(122);const A=n(9737);const a={padding:s.constants.RSA_PKCS1_PSS_PADDING,saltLength:s.constants.RSA_PSS_SALTLEN_DIGEST};const c=new Map([["ES256","P-256"],["ES256K","secp256k1"],["ES384","P-384"],["ES512","P-521"]]);function keyForCrypto(e,t){switch(e){case"EdDSA":if(!["ed25519","ed448"].includes(t.asymmetricKeyType)){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448")}return t;case"RS256":case"RS384":case"RS512":if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,o.default)(t,e);return t;case A.rsaPssParams&&"PS256":case A.rsaPssParams&&"PS384":case A.rsaPssParams&&"PS512":if(t.asymmetricKeyType==="rsa-pss"){const{hashAlgorithm:n,mgf1HashAlgorithm:s,saltLength:i}=t.asymmetricKeyDetails;const r=parseInt(e.slice(-3),10);if(n!==undefined&&(n!==`sha${r}`||s!==n)){throw new TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}`)}if(i!==undefined&&i>r>>3){throw new TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}`)}}else if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss")}(0,o.default)(t,e);return{key:t,...a};case!A.rsaPssParams&&"PS256":case!A.rsaPssParams&&"PS384":case!A.rsaPssParams&&"PS512":if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,o.default)(t,e);return{key:t,...a};case"ES256":case"ES256K":case"ES384":case"ES512":{if(t.asymmetricKeyType!=="ec"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be ec")}const n=(0,i.default)(t);const s=c.get(e);if(n!==s){throw new TypeError(`Invalid key curve for the algorithm, its curve must be ${s}, got ${n}`)}return{dsaEncoding:"ieee-p1363",key:t}}default:throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=keyForCrypto},6898:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.encrypt=void 0;const s=n(3837);const i=n(6113);const r=n(5770);const o=n(1691);const A=n(518);const a=n(6083);const c=n(3499);const u=n(6852);const l=n(3386);const d=n(2768);const p=n(1146);const g=n(7947);const h=(0,s.promisify)(i.pbkdf2);function getPassword(e,t){if((0,d.default)(e)){return e.export()}if(e instanceof Uint8Array){return e}if((0,u.isCryptoKey)(e)){(0,l.checkEncCryptoKey)(e,t,"deriveBits","deriveKey");return i.KeyObject.from(e).export()}throw new TypeError((0,p.default)(e,...g.types,"Uint8Array"))}const encrypt=async(e,t,n,s=2048,i=(0,r.default)(new Uint8Array(16)))=>{(0,c.default)(i);const u=(0,o.p2s)(e,i);const l=parseInt(e.slice(13,16),10)>>3;const d=getPassword(t,e);const p=await h(d,u,s,l,`sha${e.slice(8,11)}`);const g=await(0,a.wrap)(e.slice(-6),p,n);return{encryptedKey:g,p2c:s,p2s:(0,A.encode)(i)}};t.encrypt=encrypt;const decrypt=async(e,t,n,s,i)=>{(0,c.default)(i);const r=(0,o.p2s)(e,i);const A=parseInt(e.slice(13,16),10)>>3;const u=getPassword(t,e);const l=await h(u,r,s,A,`sha${e.slice(8,11)}`);return(0,a.unwrap)(e.slice(-6),l,n)};t.decrypt=decrypt},5770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=n(6113);Object.defineProperty(t,"default",{enumerable:true,get:function(){return s.randomFillSync}})},9526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.encrypt=void 0;const s=n(6113);const i=n(122);const r=n(6852);const o=n(3386);const A=n(2768);const a=n(1146);const c=n(7947);const checkKey=(e,t)=>{if(e.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,i.default)(e,t)};const resolvePadding=e=>{switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return s.constants.RSA_PKCS1_OAEP_PADDING;case"RSA1_5":return s.constants.RSA_PKCS1_PADDING;default:return undefined}};const resolveOaepHash=e=>{switch(e){case"RSA-OAEP":return"sha1";case"RSA-OAEP-256":return"sha256";case"RSA-OAEP-384":return"sha384";case"RSA-OAEP-512":return"sha512";default:return undefined}};function ensureKeyObject(e,t,...n){if((0,A.default)(e)){return e}if((0,r.isCryptoKey)(e)){(0,o.checkEncCryptoKey)(e,t,...n);return s.KeyObject.from(e)}throw new TypeError((0,a.default)(e,...c.types))}const encrypt=(e,t,n)=>{const i=resolvePadding(e);const r=resolveOaepHash(e);const o=ensureKeyObject(t,e,"wrapKey","encrypt");checkKey(o,e);return(0,s.publicEncrypt)({key:o,oaepHash:r,padding:i},n)};t.encrypt=encrypt;const decrypt=(e,t,n)=>{const i=resolvePadding(e);const r=resolveOaepHash(e);const o=ensureKeyObject(t,e,"unwrapKey","decrypt");checkKey(o,e);return(0,s.privateDecrypt)({key:o,oaepHash:r,padding:i},n)};t.decrypt=decrypt},1622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]="node:crypto"},9935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);const r=n(4965);const o=n(3811);const A=n(2413);const a=n(3170);let c;if(s.sign.length>3){c=(0,i.promisify)(s.sign)}else{c=s.sign}const sign=async(e,t,n)=>{const i=(0,a.default)(e,t,"sign");if(e.startsWith("HS")){const t=s.createHmac((0,o.default)(e),i);t.update(n);return t.digest()}return c((0,r.default)(e),n,(0,A.default)(e,i))};t["default"]=sign},5390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=s.timingSafeEqual;t["default"]=i},3569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);const r=n(4965);const o=n(2413);const A=n(9935);const a=n(3170);const c=n(9737);let u;if(s.verify.length>4&&c.oneShotCallback){u=(0,i.promisify)(s.verify)}else{u=s.verify}const verify=async(e,t,n,i)=>{const c=(0,a.default)(e,t,"verify");if(e.startsWith("HS")){const t=await(0,A.default)(e,c,i);const r=n;try{return s.timingSafeEqual(r,t)}catch{return false}}const l=(0,r.default)(e);const d=(0,o.default)(e,c);try{return await u(l,i,d,n)}catch{return false}};t["default"]=verify},6852:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isCryptoKey=void 0;const s=n(6113);const i=n(3837);const r=s.webcrypto;t["default"]=r;t.isCryptoKey=i.types.isCryptoKey?e=>i.types.isCryptoKey(e):e=>false},7022:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.deflate=t.inflate=void 0;const s=n(3837);const i=n(9796);const r=(0,s.promisify)(i.inflateRaw);const o=(0,s.promisify)(i.deflateRaw);const inflate=e=>r(e);t.inflate=inflate;const deflate=e=>o(e);t.deflate=deflate},3238:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=void 0;const s=n(518);t.encode=s.encode;t.decode=s.decode},5611:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decodeJwt=void 0;const s=n(3238);const i=n(1691);const r=n(9127);const o=n(4419);function decodeJwt(e){if(typeof e!=="string")throw new o.JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:n}=e.split(".");if(n===5)throw new o.JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");if(n!==3)throw new o.JWTInvalid("Invalid JWT");if(!t)throw new o.JWTInvalid("JWTs must contain a payload");let A;try{A=(0,s.decode)(t)}catch{throw new o.JWTInvalid("Failed to base64url decode the payload")}let a;try{a=JSON.parse(i.decoder.decode(A))}catch{throw new o.JWTInvalid("Failed to parse the decoded payload as JSON")}if(!(0,r.default)(a))throw new o.JWTInvalid("Invalid JWT Claims Set");return a}t.decodeJwt=decodeJwt},3991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decodeProtectedHeader=void 0;const s=n(3238);const i=n(1691);const r=n(9127);function decodeProtectedHeader(e){let t;if(typeof e==="string"){const n=e.split(".");if(n.length===3||n.length===5){[t]=n}}else if(typeof e==="object"&&e){if("protected"in e){t=e.protected}else{throw new TypeError("Token does not contain a Protected Header")}}try{if(typeof t!=="string"||!t){throw new Error}const e=JSON.parse(i.decoder.decode((0,s.decode)(t)));if(!(0,r.default)(e)){throw new Error}return e}catch{throw new TypeError("Invalid Token or Protected Header formatting")}}t.decodeProtectedHeader=decodeProtectedHeader},4419:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JWSSignatureVerificationFailed=t.JWKSTimeout=t.JWKSMultipleMatchingKeys=t.JWKSNoMatchingKey=t.JWKSInvalid=t.JWKInvalid=t.JWTInvalid=t.JWSInvalid=t.JWEInvalid=t.JWEDecryptionFailed=t.JOSENotSupported=t.JOSEAlgNotAllowed=t.JWTExpired=t.JWTClaimValidationFailed=t.JOSEError=void 0;class JOSEError extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e);this.code="ERR_JOSE_GENERIC";this.name=this.constructor.name;(t=Error.captureStackTrace)===null||t===void 0?void 0:t.call(Error,this,this.constructor)}}t.JOSEError=JOSEError;class JWTClaimValidationFailed extends JOSEError{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t="unspecified",n="unspecified"){super(e);this.code="ERR_JWT_CLAIM_VALIDATION_FAILED";this.claim=t;this.reason=n}}t.JWTClaimValidationFailed=JWTClaimValidationFailed;class JWTExpired extends JOSEError{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t="unspecified",n="unspecified"){super(e);this.code="ERR_JWT_EXPIRED";this.claim=t;this.reason=n}}t.JWTExpired=JWTExpired;class JOSEAlgNotAllowed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}t.JOSEAlgNotAllowed=JOSEAlgNotAllowed;class JOSENotSupported extends JOSEError{constructor(){super(...arguments);this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}t.JOSENotSupported=JOSENotSupported;class JWEDecryptionFailed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWE_DECRYPTION_FAILED";this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}t.JWEDecryptionFailed=JWEDecryptionFailed;class JWEInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}t.JWEInvalid=JWEInvalid;class JWSInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}t.JWSInvalid=JWSInvalid;class JWTInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}t.JWTInvalid=JWTInvalid;class JWKInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}t.JWKInvalid=JWKInvalid;class JWKSInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}t.JWKSInvalid=JWKSInvalid;class JWKSNoMatchingKey extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_NO_MATCHING_KEY";this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}t.JWKSNoMatchingKey=JWKSNoMatchingKey;class JWKSMultipleMatchingKeys extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}t.JWKSMultipleMatchingKeys=JWKSMultipleMatchingKeys;Symbol.asyncIterator;class JWKSTimeout extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_TIMEOUT";this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}t.JWKSTimeout=JWKSTimeout;class JWSSignatureVerificationFailed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}t.JWSSignatureVerificationFailed=JWSSignatureVerificationFailed},1173:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(1622);t["default"]=s.default},7426:(e,t,n)=>{ +(()=>{var __webpack_modules__={3658:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});class Action{constructor(e){this.stateStore=e.stateStore;this.logger=e.logger;this.userClient=e.userClient;this.passwordGenerator=e.passwordGenerator;this.roleNameParser=e.roleNameParser}run(e){return n(this,void 0,void 0,(function*(){if(!this.stateStore.isPost){yield this.runMain(e);this.stateStore.isPost=true}}))}runMain(e){return n(this,void 0,void 0,(function*(){if(!e.name||e.name.length==0){throw new Error("No name supplied.")}if(!e.email||e.email.length==0){throw new Error("No e-mail supplied.")}if(!e.roles||e.roles.length==0){throw new Error("No roles supplied.")}const t=this.roleNameParser.parse(e.roles);if(t.length==0){throw new Error("No roles supplied.")}const n=yield this.userClient.getUser({email:e.email});let s=n;if(!n){const t=this.passwordGenerator.generatePassword();const n=yield this.userClient.createUser({name:e.name,email:e.email,password:t});s=n}if(!s){throw new Error("Could not get an existing user or create a new user.")}const i=yield this.userClient.createRoles({roleNames:t});if(i.length==0){throw new Error("Received an empty set of roles.")}const r=i.map((e=>e.id));yield this.userClient.assignRolesToUser({userID:s.id,roleIDs:r});if(!n){yield this.userClient.sendChangePasswordEmail({email:s.email});this.logger.log(`${e.name} (${s.email}) has been invited.`)}else{this.logger.log(`${e.name} (${s.email}) has been updated.`)}}))}}t["default"]=Action},8245:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(n(2186));class Logger{log(e){console.log(e)}error(e){o.setFailed(e)}}t["default"]=Logger},2127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class PasswordGenerator{generatePassword(){let e="";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$";const n=18;for(let s=1;s<=n;s++){const n=Math.floor(Math.random()*t.length+1);e+=t.charAt(n)}return e}}t["default"]=PasswordGenerator},3834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class RoleNameParser{parse(e){return e.split(",").map((e=>e.trim().toLowerCase())).filter((e=>e.length>0))}}t["default"]=RoleNameParser},9531:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n={IS_POST:"isPost"};class KeyValueStateStore{constructor(e){this.writerReader=e;this.isPost=false}get isPost(){return!!this.writerReader.getState(n.IS_POST)}set isPost(e){this.writerReader.saveState(n.IS_POST,e)}}t["default"]=KeyValueStateStore},1485:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=i(n(8757));const o=n(4712);class Auth0UserClient{constructor(e){this.config=e;this.managementClient=new o.ManagementClient({domain:e.domain,clientId:e.clientId,clientSecret:e.clientSecret})}getUser(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.usersByEmail.getByEmail({email:e.email});if(t.data.length==0){return null}const n=t.data[0];return{id:n.user_id,email:n.email}}))}createUser(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.users.create({connection:"Username-Password-Authentication",name:e.name,email:e.email,email_verified:true,password:e.password,app_metadata:{has_pending_invitation:true}});return{id:t.data.user_id,email:t.data.email}}))}createRoles(e){return s(this,void 0,void 0,(function*(){const t=yield this.managementClient.roles.getAll();const n=t.data;const s=n.filter((t=>e.roleNames.includes(t.name))).map((e=>({id:e.id,name:e.name})));const i=e.roleNames.filter((e=>{const t=s.find((t=>t.name==e));return t==null}));const r=yield Promise.all(i.map((e=>this.managementClient.roles.create({name:e}))));const o=r.map((e=>({id:e.data.id,name:e.data.name})));return s.concat(o)}))}assignRolesToUser(e){return s(this,void 0,void 0,(function*(){yield this.managementClient.users.assignRoles({id:e.userID},{roles:e.roleIDs})}))}sendChangePasswordEmail(e){return s(this,void 0,void 0,(function*(){const t=yield this.getToken();yield r.default.post(this.getURL("/dbconnections/change_password"),{email:e.email,connection:"Username-Password-Authentication"},{headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}})}))}getToken(){return s(this,void 0,void 0,(function*(){const e=yield r.default.post(this.getURL("/oauth/token"),{grant_type:"client_credentials",client_id:this.config.clientId,client_secret:this.config.clientSecret,audience:`https://${this.config.domain}/api/v2/`},{headers:{"Content-Type":"application/x-www-form-urlencoded"}});return e.data.access_token}))}getURL(e){return`https://${this.config.domain}${e}`}}t["default"]=Auth0UserClient},8873:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(n(2186));function getOptions(){return{name:o.getInput("name"),email:o.getInput("email"),roles:o.getInput("roles")}}t["default"]=getOptions},4822:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const A=r(n(2186));const a=o(n(3658));const c=o(n(1485));const u=o(n(8873));const l=o(n(8245));const d=o(n(9531));const p=o(n(2127));const g=o(n(3834));const{AUTH0_MANAGEMENT_CLIENT_ID:h,AUTH0_MANAGEMENT_CLIENT_SECRET:f,AUTH0_MANAGEMENT_CLIENT_DOMAIN:E}=process.env;if(!h||h.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}else if(!f||f.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}else if(!E||E.length==0){throw new Error("AUTH0_MANAGEMENT_CLIENT_ID environment variable not set.")}const m=new d.default(A);const C=new l.default;const Q=new c.default({clientId:h,clientSecret:f,domain:E});const I=new p.default;const B=new g.default;const y=new a.default({stateStore:m,logger:C,userClient:Q,passwordGenerator:I,roleNameParser:B});y.run((0,u.default)()).catch((e=>{C.error(e.toString())}))},7351:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=r(n(2037));const A=n(5278);function issueCommand(e,t,n){const s=new Command(e,t,n);process.stdout.write(s.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const a="::";class Command{constructor(e,t,n){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=n}toString(){let e=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const s=this.properties[n];if(s){if(t){t=false}else{e+=","}e+=`${n}=${escapeProperty(s)}`}}}}e+=`${a}${escapeData(this.message)}`;return e}}function escapeData(e){return A.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return A.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const A=n(7351);const a=n(717);const c=n(5278);const u=r(n(2037));const l=r(n(1017));const d=n(8041);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const n=c.toCommandValue(t);process.env[e]=n;const s=process.env["GITHUB_ENV"]||"";if(s){return a.issueFileCommand("ENV",a.prepareKeyValueMessage(e,t))}A.issueCommand("set-env",{name:e},n)}t.exportVariable=exportVariable;function setSecret(e){A.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){a.issueFileCommand("PATH",e)}else{A.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${l.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const n=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!n){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return n}return n.trim()}t.getInput=getInput;function getMultilineInput(e,t){const n=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return n}return n.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const n=["true","True","TRUE"];const s=["false","False","FALSE"];const i=getInput(e,t);if(n.includes(i))return true;if(s.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const n=process.env["GITHUB_OUTPUT"]||"";if(n){return a.issueFileCommand("OUTPUT",a.prepareKeyValueMessage(e,t))}process.stdout.write(u.EOL);A.issueCommand("set-output",{name:e},c.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){A.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){A.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){A.issueCommand("error",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){A.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){A.issueCommand("notice",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){A.issue("group",e)}t.startGroup=startGroup;function endGroup(){A.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let n;try{n=yield t()}finally{endGroup()}return n}))}t.group=group;function saveState(e,t){const n=process.env["GITHUB_STATE"]||"";if(n){return a.issueFileCommand("STATE",a.prepareKeyValueMessage(e,t))}A.issueCommand("save-state",{name:e},c.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var g=n(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return g.summary}});var h=n(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return h.markdownSummary}});var f=n(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return f.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return f.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return f.toPlatformPath}})},717:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=r(n(7147));const A=r(n(2037));const a=n(5840);const c=n(5278);function issueFileCommand(e,t){const n=process.env[`GITHUB_${e}`];if(!n){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!o.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}o.appendFileSync(n,`${c.toCommandValue(t)}${A.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const n=`ghadelimiter_${a.v4()}`;const s=c.toCommandValue(t);if(e.includes(n)){throw new Error(`Unexpected input: name should not contain the delimiter "${n}"`)}if(s.includes(n)){throw new Error(`Unexpected input: value should not contain the delimiter "${n}"`)}return`${e}<<${n}${A.EOL}${s}${A.EOL}${n}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const i=n(6255);const r=n(5526);const o=n(2186);class OidcClient{static createHttpClient(e=true,t=10){const n={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new r.BearerCredentialHandler(OidcClient.getRequestToken())],n)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return s(this,void 0,void 0,(function*(){const n=OidcClient.createHttpClient();const s=yield n.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const i=(t=s.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return s(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const n=encodeURIComponent(e);t=`${t}&audience=${n}`}o.debug(`ID token url is ${t}`);const n=yield OidcClient.getCall(t);o.setSecret(n);return n}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=r(n(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,o.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const i=n(2037);const r=n(7147);const{access:o,appendFile:A,writeFile:a}=r.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return s(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield o(e,r.constants.R_OK|r.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,n={}){const s=Object.entries(n).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${s}>`}return`<${e}${s}>${t}`}write(e){return s(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const n=yield this.filePath();const s=t?a:A;yield s(n,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return s(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(i.EOL)}addCodeBlock(e,t){const n=Object.assign({},t&&{lang:t});const s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,t=false){const n=t?"ol":"ul";const s=e.map((e=>this.wrap("li",e))).join("");const i=this.wrap(n,s);return this.addRaw(i).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:n,colspan:s,rowspan:i}=e;const r=t?"th":"td";const o=Object.assign(Object.assign({},s&&{colspan:s}),i&&{rowspan:i});return this.wrap(r,n,o)})).join("");return this.wrap("tr",t)})).join("");const n=this.wrap("table",t);return this.addRaw(n).addEOL()}addDetails(e,t){const n=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(n).addEOL()}addImage(e,t,n){const{width:s,height:i}=n||{};const r=Object.assign(Object.assign({},s&&{width:s}),i&&{height:i});const o=this.wrap("img",null,Object.assign({src:e,alt:t},r));return this.addRaw(o).addEOL()}addHeading(e,t){const n=`h${t}`;const s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1";const i=this.wrap(s,e);return this.addRaw(i).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const n=Object.assign({},t&&{cite:t});const s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,t){const n=this.wrap("a",e,{href:t});return this.addRaw(n).addEOL()}}const c=new Summary;t.markdownSummary=c;t.summary=c},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},5526:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return n(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){if(s===undefined)s=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,s,i)}:function(e,t,n,s){if(s===undefined)s=n;e[s]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(t,e,n);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,s){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const A=r(n(3685));const a=r(n(5687));const c=r(n(9835));const u=r(n(4294));const l=n(1773);var d;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(d||(t.HttpCodes=d={}));var p;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(p||(t.Headers=p={}));var g;(function(e){e["ApplicationJson"]="application/json"})(g||(t.MediaTypes=g={}));function getProxyUrl(e){const t=c.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const f=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const E=["OPTIONS","GET","DELETE","HEAD"];const m=10;const C=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return o(this,void 0,void 0,(function*(){return new Promise((e=>o(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return o(this,void 0,void 0,(function*(){return new Promise((e=>o(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,n||{})}))}patch(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,n||{})}))}put(e,t,n){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,n||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,n,s){return o(this,void 0,void 0,(function*(){return this.request(e,t,n,s)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[p.Accept]=this._getExistingOrDefaultHeader(t,p.Accept,g.ApplicationJson);const n=yield this.get(e,t);return this._processResponse(n,this.requestOptions)}))}postJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.post(e,s,n);return this._processResponse(i,this.requestOptions)}))}putJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.put(e,s,n);return this._processResponse(i,this.requestOptions)}))}patchJson(e,t,n={}){return o(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);n[p.Accept]=this._getExistingOrDefaultHeader(n,p.Accept,g.ApplicationJson);n[p.ContentType]=this._getExistingOrDefaultHeader(n,p.ContentType,g.ApplicationJson);const i=yield this.patch(e,s,n);return this._processResponse(i,this.requestOptions)}))}request(e,t,n,s){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const i=new URL(t);let r=this._prepareRequest(e,i,s);const o=this._allowRetries&&E.includes(e)?this._maxRetries+1:1;let A=0;let a;do{a=yield this.requestRaw(r,n);if(a&&a.message&&a.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(a)){e=t;break}}if(e){return e.handleAuthentication(this,r,n)}else{return a}}let t=this._maxRedirects;while(a.message.statusCode&&h.includes(a.message.statusCode)&&this._allowRedirects&&t>0){const o=a.message.headers["location"];if(!o){break}const A=new URL(o);if(i.protocol==="https:"&&i.protocol!==A.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield a.readBody();if(A.hostname!==i.hostname){for(const e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}r=this._prepareRequest(e,A,s);a=yield this.requestRaw(r,n);t--}if(!a.message.statusCode||!f.includes(a.message.statusCode)){return a}A+=1;if(A{function callbackForResult(e,t){if(e){s(e)}else if(!t){s(new Error("Unknown error"))}else{n(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,n){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let s=false;function handleResult(e,t){if(!s){s=true;n(e,t)}}const i=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let r;i.on("socket",(e=>{r=e}));i.setTimeout(this._socketTimeout||3*6e4,(()=>{if(r){r.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));i.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){i.end()}));t.pipe(i)}else{i.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const n=c.getProxyUrl(t);const s=n&&n.hostname;if(!s){return}return this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){const s={};s.parsedUrl=t;const i=s.parsedUrl.protocol==="https:";s.httpModule=i?a:A;const r=i?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):r;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(n);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(s.options)}}return s}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,n){let s;if(this.requestOptions&&this.requestOptions.headers){s=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||s||n}_getAgent(e){let t;const n=c.getProxyUrl(e);const s=n&&n.hostname;if(this._keepAlive&&s){t=this._proxyAgent}if(this._keepAlive&&!s){t=this._agent}if(t){return t}const i=e.protocol==="https:";let r=100;if(this.requestOptions){r=this.requestOptions.maxSockets||A.globalAgent.maxSockets}if(n&&n.hostname){const e={maxSockets:r,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})};let s;const o=n.protocol==="https:";if(i){s=o?u.httpsOverHttps:u.httpsOverHttp}else{s=o?u.httpOverHttps:u.httpOverHttp}t=s(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:r};t=i?new a.Agent(e):new A.Agent(e);this._agent=t}if(!t){t=i?a.globalAgent:A.globalAgent}if(i&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let n;if(this._keepAlive){n=this._proxyAgentDispatcher}if(n){return n}const s=e.protocol==="https:";n=new l.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`${t.username}:${t.password}`}));this._proxyAgentDispatcher=n;if(s&&this._ignoreSslError){n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:false})}return n}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(m,e);const t=C*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((n,s)=>o(this,void 0,void 0,(function*(){const i=e.message.statusCode||0;const r={statusCode:i,result:null,headers:{}};if(i===d.NotFound){n(r)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let A;try{A=yield e.readBody();if(A&&A.length>0){if(t&&t.deserializeDates){o=JSON.parse(A,dateTimeDeserializer)}else{o=JSON.parse(A)}r.result=o}r.headers=e.message.headers}catch(e){}if(i>299){let e;if(o&&o.message){e=o.message}else if(A&&A.length>0){e=A}else{e=`Failed request: (${i})`}const t=new HttpClientError(e,i);t.result=r.result;s(t)}else{n(r)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const n=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(n){try{return new URL(n)}catch(e){if(!n.startsWith("http://")&&!n.startsWith("https://"))return new URL(`http://${n}`)}}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const n=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!n){return false}let s;if(e.port){s=Number(e.port)}else if(e.protocol==="http:"){s=80}else if(e.protocol==="https:"){s=443}const i=[e.hostname.toUpperCase()];if(typeof s==="number"){i.push(`${i[0]}:${s}`)}for(const e of n.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||i.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}},2856:(e,t,n)=>{"use strict";const s=n(4492).Writable;const i=n(7261).inherits;const r=n(8534);const o=n(8710);const A=n(333);const a=45;const c=Buffer.from("-");const u=Buffer.from("\r\n");const EMPTY_FN=function(){};function Dicer(e){if(!(this instanceof Dicer)){return new Dicer(e)}s.call(this,e);if(!e||!e.headerFirst&&typeof e.boundary!=="string"){throw new TypeError("Boundary required")}if(typeof e.boundary==="string"){this.setBoundary(e.boundary)}else{this._bparser=undefined}this._headerFirst=e.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:e.partHwm};this._pause=false;const t=this;this._hparser=new A(e);this._hparser.on("header",(function(e){t._inHeader=false;t._part.emit("header",e)}))}i(Dicer,s);Dicer.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){const e=this;process.nextTick((function(){e.emit("error",new Error("Unexpected end of multipart data"));if(e._part&&!e._ignoreData){const t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data"));e._part.push(null);process.nextTick((function(){e._realFinish=true;e.emit("finish");e._realFinish=false}));return}e._realFinish=true;e.emit("finish");e._realFinish=false}))}}else{s.prototype.emit.apply(this,arguments)}};Dicer.prototype._write=function(e,t,n){if(!this._hparser&&!this._bparser){return n()}if(this._headerFirst&&this._isPreamble){if(!this._part){this._part=new o(this._partOpts);if(this._events.preamble){this.emit("preamble",this._part)}else{this._ignore()}}const t=this._hparser.push(e);if(!this._inHeader&&t!==undefined&&t{"use strict";const s=n(5673).EventEmitter;const i=n(7261).inherits;const r=n(9692);const o=n(8534);const A=Buffer.from("\r\n\r\n");const a=/\r\n/g;const c=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function HeaderParser(e){s.call(this);e=e||{};const t=this;this.nread=0;this.maxed=false;this.npairs=0;this.maxHeaderPairs=r(e,"maxHeaderPairs",2e3);this.maxHeaderSize=r(e,"maxHeaderSize",80*1024);this.buffer="";this.header={};this.finished=false;this.ss=new o(A);this.ss.on("info",(function(e,n,s,i){if(n&&!t.maxed){if(t.nread+i-s>=t.maxHeaderSize){i=t.maxHeaderSize-t.nread+s;t.nread=t.maxHeaderSize;t.maxed=true}else{t.nread+=i-s}t.buffer+=n.toString("binary",s,i)}if(e){t._finish()}}))}i(HeaderParser,s);HeaderParser.prototype.push=function(e){const t=this.ss.push(e);if(this.finished){return t}};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 e=this.header;this.header={};this.buffer="";this.finished=true;this.nread=this.npairs=0;this.maxed=false;this.emit("header",e)};HeaderParser.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs){return}const e=this.buffer.split(a);const t=e.length;let n,s;for(var i=0;i{"use strict";const s=n(7261).inherits;const i=n(4492).Readable;function PartStream(e){i.call(this,e)}s(PartStream,i);PartStream.prototype._read=function(e){};e.exports=PartStream},8534:(e,t,n)=>{"use strict";const s=n(5673).EventEmitter;const i=n(7261).inherits;function SBMH(e){if(typeof e==="string"){e=Buffer.from(e)}if(!Buffer.isBuffer(e)){throw new TypeError("The needle has to be a String or a Buffer.")}const t=e.length;if(t===0){throw new Error("The needle cannot be an empty String/Buffer.")}if(t>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(t);this._lookbehind_size=0;this._needle=e;this._bufpos=0;this._lookbehind=Buffer.alloc(t);for(var n=0;n=0){this.emit("info",false,this._lookbehind,0,this._lookbehind_size);this._lookbehind_size=0}else{const n=this._lookbehind_size+r;if(n>0){this.emit("info",false,this._lookbehind,0,n)}this._lookbehind.copy(this._lookbehind,0,n,this._lookbehind_size-n);this._lookbehind_size-=n;e.copy(this._lookbehind,this._lookbehind_size);this._lookbehind_size+=t;this._bufpos=t;return t}}r+=(r>=0)*this._bufpos;if(e.indexOf(n,r)!==-1){r=e.indexOf(n,r);++this.matches;if(r>0){this.emit("info",true,e,this._bufpos,r)}else{this.emit("info",true)}return this._bufpos=r+s}else{r=t-s}while(r0){this.emit("info",false,e,this._bufpos,r{"use strict";const s=n(4492).Writable;const{inherits:i}=n(7261);const r=n(2856);const o=n(415);const A=n(6780);const a=n(4426);function Busboy(e){if(!(this instanceof Busboy)){return new Busboy(e)}if(typeof e!=="object"){throw new TypeError("Busboy expected an options-Object.")}if(typeof e.headers!=="object"){throw new TypeError("Busboy expected an options-Object with headers-attribute.")}if(typeof e.headers["content-type"]!=="string"){throw new TypeError("Missing Content-Type-header.")}const{headers:t,...n}=e;this.opts={autoDestroy:false,...n};s.call(this,this.opts);this._done=false;this._parser=this.getParserByHeaders(t);this._finished=false}i(Busboy,s);Busboy.prototype.emit=function(e){if(e==="finish"){if(!this._done){this._parser?.end();return}else if(this._finished){return}this._finished=true}s.prototype.emit.apply(this,arguments)};Busboy.prototype.getParserByHeaders=function(e){const t=a(e["content-type"]);const n={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:t,preservePath:this.opts.preservePath};if(o.detect.test(t[0])){return new o(this,n)}if(A.detect.test(t[0])){return new A(this,n)}throw new Error("Unsupported Content-Type.")};Busboy.prototype._write=function(e,t,n){this._parser.write(e,n)};e.exports=Busboy;e.exports["default"]=Busboy;e.exports.Busboy=Busboy;e.exports.Dicer=r},415:(e,t,n)=>{"use strict";const{Readable:s}=n(4492);const{inherits:i}=n(7261);const r=n(2856);const o=n(4426);const A=n(9136);const a=n(496);const c=n(9692);const u=/^boundary$/i;const l=/^form-data$/i;const d=/^charset$/i;const p=/^filename$/i;const g=/^name$/i;Multipart.detect=/^multipart\/form-data/i;function Multipart(e,t){let n;let s;const i=this;let h;const f=t.limits;const E=t.isPartAFile||((e,t,n)=>t==="application/octet-stream"||n!==undefined);const m=t.parsedConType||[];const C=t.defCharset||"utf8";const Q=t.preservePath;const I={highWaterMark:t.fileHwm};for(n=0,s=m.length;nR){i.parser.removeListener("part",onPart);i.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(N){const e=N;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(r){let c;let u;let h;let f;let m;let R;let v=0;if(r["content-type"]){h=o(r["content-type"][0]);if(h[0]){c=h[0].toLowerCase();for(n=0,s=h.length;ny){const s=y-v+e.length;if(s>0){n.push(e.slice(0,s))}n.truncated=true;n.bytesRead=y;t.removeAllListeners("data");n.emit("limit");return}else if(!n.push(e)){i._pause=true}n.bytesRead=v};F=function(){_=undefined;n.push(null)}}else{if(x===w){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++x;++D;let n="";let s=false;N=t;k=function(e){if((v+=e.length)>B){const i=B-(v-e.length);n+=e.toString("binary",0,i);s=true;t.removeAllListeners("data")}else{n+=e.toString("binary")}};F=function(){N=undefined;if(n.length){n=A(n,"binary",f)}e.emit("field",u,n,false,s,m,c);--D;checkFinished()}}t._readableState.sync=false;t.on("data",k);t.on("end",F)})).on("error",(function(e){if(_){_.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){F=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const n=this.parser.write(e);if(n&&!this._pause){t()}else{this._needDrain=!n;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){s.call(this,e);this.bytesRead=0;this.truncated=false}i(FileStream,s);FileStream.prototype._read=function(e){};e.exports=Multipart},6780:(e,t,n)=>{"use strict";const s=n(9730);const i=n(9136);const r=n(9692);const o=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const n=t.limits;const i=t.parsedConType;this.boy=e;this.fieldSizeLimit=r(n,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=r(n,"fieldNameSize",100);this.fieldsLimit=r(n,"fields",Infinity);let A;for(var a=0,c=i.length;ao){this._key+=this.decoder.write(e.toString("binary",o,n))}this._state="val";this._hitLimit=false;this._checkingBytes=true;this._val="";this._bytesVal=0;this._valTrunc=false;this.decoder.reset();o=n+1}else if(s!==undefined){++this._fields;let n;const r=this._keyTrunc;if(s>o){n=this._key+=this.decoder.write(e.toString("binary",o,s))}else{n=this._key}this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();if(n.length){this.boy.emit("field",i(n,"binary",this.charset),"",r,false)}o=s+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(r>o){this._key+=this.decoder.write(e.toString("binary",o,r))}o=r;if((this._bytesKey=this._key.length)===this.fieldNameSizeLimit){this._checkingBytes=false;this._keyTrunc=true}}else{if(oo){this._val+=this.decoder.write(e.toString("binary",o,s))}this.boy.emit("field",i(this._key,"binary",this.charset),i(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();o=s+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(r>o){this._val+=this.decoder.write(e.toString("binary",o,r))}o=r;if(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit){this._checkingBytes=false;this._valTrunc=true}}else{if(o0){this.boy.emit("field",i(this._key,"binary",this.charset),"",this._keyTrunc,false)}else if(this._state==="val"){this.boy.emit("field",i(this._key,"binary",this.charset),i(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc)}this.boy._done=true;this.boy.emit("finish")};e.exports=UrlEncoded},9730:e=>{"use strict";const t=/\+/g;const n=[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(e){e=e.replace(t," ");let s="";let i=0;let r=0;const o=e.length;for(;ir){s+=e.substring(r,i);r=i}this.buffer="";++r}}if(r{"use strict";e.exports=function basename(e){if(typeof e!=="string"){return""}for(var t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===".."||e==="."?"":e}}return e===".."||e==="."?"":e}},9136:e=>{"use strict";const t=new TextDecoder("utf-8");const n=new Map([["utf-8",t],["utf8",t]]);function decodeText(e,t,s){if(e){if(n.has(s)){try{return n.get(s).decode(Buffer.from(e,t))}catch(e){}}else{try{n.set(s,new TextDecoder(s));return n.get(s).decode(Buffer.from(e,t))}catch(e){}}}return e}e.exports=decodeText},9692:e=>{"use strict";e.exports=function getLimit(e,t,n){if(!e||e[t]===undefined||e[t]===null){return n}if(typeof e[t]!=="number"||isNaN(e[t])){throw new TypeError("Limit "+t+" is not a valid number")}return e[t]}},4426:(e,t,n)=>{"use strict";const s=n(9136);const i=/%([a-fA-F0-9]{2})/g;function encodedReplacer(e,t){return String.fromCharCode(parseInt(t,16))}function parseParams(e){const t=[];let n="key";let r="";let o=false;let A=false;let a=0;let c="";for(var u=0,l=e.length;u{e.exports={parallel:n(8210),serial:n(445),serialOrdered:n(3578)}},1700:e=>{e.exports=abort;function abort(e){Object.keys(e.jobs).forEach(clean.bind(e));e.jobs={}}function clean(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}},2794:(e,t,n)=>{var s=n(5295);e.exports=async;function async(e){var t=false;s((function(){t=true}));return function async_callback(n,i){if(t){e(n,i)}else{s((function nextTick_callback(){e(n,i)}))}}}},5295:e=>{e.exports=defer;function defer(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}},9023:(e,t,n)=>{var s=n(2794),i=n(1700);e.exports=iterate;function iterate(e,t,n,s){var r=n["keyedList"]?n["keyedList"][n.index]:n.index;n.jobs[r]=runJob(t,r,e[r],(function(e,t){if(!(r in n.jobs)){return}delete n.jobs[r];if(e){i(n)}else{n.results[r]=t}s(e,n.results)}))}function runJob(e,t,n,i){var r;if(e.length==2){r=e(n,s(i))}else{r=e(n,t,s(i))}return r}},2474:e=>{e.exports=state;function state(e,t){var n=!Array.isArray(e),s={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};if(t){s.keyedList.sort(n?t:function(n,s){return t(e[n],e[s])})}return s}},7942:(e,t,n)=>{var s=n(1700),i=n(2794);e.exports=terminator;function terminator(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;s(this);i(e)(null,this.results)}},8210:(e,t,n)=>{var s=n(9023),i=n(2474),r=n(7942);e.exports=parallel;function parallel(e,t,n){var o=i(e);while(o.index<(o["keyedList"]||e).length){s(e,t,o,(function(e,t){if(e){n(e,t);return}if(Object.keys(o.jobs).length===0){n(null,o.results);return}}));o.index++}return r.bind(o,n)}},445:(e,t,n)=>{var s=n(3578);e.exports=serial;function serial(e,t,n){return s(e,t,null,n)}},3578:(e,t,n)=>{var s=n(9023),i=n(2474),r=n(7942);e.exports=serialOrdered;e.exports.ascending=ascending;e.exports.descending=descending;function serialOrdered(e,t,n,o){var A=i(e,n);s(e,t,A,(function iteratorHandler(n,i){if(n){o(n,i);return}A.index++;if(A.index<(A["keyedList"]||e).length){s(e,t,A,iteratorHandler);return}o(null,A.results)}));return r.bind(A,o)}function ascending(e,t){return et?1:0}function descending(e,t){return-1*ascending(e,t)}},6008:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return A.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return r.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return a.default}});var s=_interopRequireDefault(n(272));var i=_interopRequireDefault(n(4867));var r=_interopRequireDefault(n(1537));var o=_interopRequireDefault(n(1453));var A=_interopRequireDefault(n(588));var a=_interopRequireDefault(n(5440));var c=_interopRequireDefault(n(2092));var u=_interopRequireDefault(n(61));var l=_interopRequireDefault(n(1855));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},1774:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("md5").update(e).digest()}var i=md5;t["default"]=i},5056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i={randomUUID:s.default.randomUUID};t["default"]=i},588:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n="00000000-0000-0000-0000-000000000000";t["default"]=n},1855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}let t;const n=new Uint8Array(16);n[0]=(t=parseInt(e.slice(0,8),16))>>>24;n[1]=t>>>16&255;n[2]=t>>>8&255;n[3]=t&255;n[4]=(t=parseInt(e.slice(9,13),16))>>>8;n[5]=t&255;n[6]=(t=parseInt(e.slice(14,18),16))>>>8;n[7]=t&255;n[8]=(t=parseInt(e.slice(19,23),16))>>>8;n[9]=t&255;n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;n[11]=t/4294967296&255;n[12]=t>>>24&255;n[13]=t>>>16&255;n[14]=t>>>8&255;n[15]=t&255;return n}var i=parse;t["default"]=i},2822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=/^(?:[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;t["default"]=n},2378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=new Uint8Array(256);let r=i.length;function rng(){if(r>i.length-16){s.default.randomFillSync(i);r=0}return i.slice(r,r+=16)}},2732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("sha1").update(e).digest()}var i=sha1;t["default"]=i},61:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;t.unsafeStringify=unsafeStringify;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=[];for(let e=0;e<256;++e){i.push((e+256).toString(16).slice(1))}function unsafeStringify(e,t=0){return i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]}function stringify(e,t=0){const n=unsafeStringify(e,t);if(!(0,s.default)(n)){throw TypeError("Stringified UUID is invalid")}return n}var r=stringify;t["default"]=r},272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2378));var i=n(61);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let r;let o;let A=0;let a=0;function v1(e,t,n){let c=t&&n||0;const u=t||new Array(16);e=e||{};let l=e.node||r;let d=e.clockseq!==undefined?e.clockseq:o;if(l==null||d==null){const t=e.random||(e.rng||s.default)();if(l==null){l=r=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=o=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let g=e.nsecs!==undefined?e.nsecs:a+1;const h=p-A+(g-a)/1e4;if(h<0&&e.clockseq===undefined){d=d+1&16383}if((h<0||p>A)&&e.nsecs===undefined){g=0}if(g>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}A=p;a=g;o=d;p+=122192928e5;const f=((p&268435455)*1e4+g)%4294967296;u[c++]=f>>>24&255;u[c++]=f>>>16&255;u[c++]=f>>>8&255;u[c++]=f&255;const E=p/4294967296*1e4&268435455;u[c++]=E>>>8&255;u[c++]=E&255;u[c++]=E>>>24&15|16;u[c++]=E>>>16&255;u[c++]=d>>>8|128;u[c++]=d&255;for(let e=0;e<6;++e){u[c+e]=l[e]}return t||(0,i.unsafeStringify)(u)}var c=v1;t["default"]=c},4867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6222));var i=_interopRequireDefault(n(1774));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v3",48,i.default);var o=r;t["default"]=o},6222:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.URL=t.DNS=void 0;t["default"]=v35;var s=n(61);var i=_interopRequireDefault(n(1855));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(5056));var i=_interopRequireDefault(n(2378));var r=n(61);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,n){if(s.default.randomUUID&&!t&&!e){return s.default.randomUUID()}e=e||{};const o=e.random||(e.rng||i.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){n=n||0;for(let e=0;e<16;++e){t[n+e]=o[e]}return t}return(0,r.unsafeStringify)(o)}var o=v4;t["default"]=o},1453:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(6222));var i=_interopRequireDefault(n(2732));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r=(0,s.default)("v5",80,i.default);var o=r;t["default"]=o},2092:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2822));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&s.default.test(e)}var i=validate;t["default"]=i},5440:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(n(2092));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.slice(14,15),16)}var i=version;t["default"]=i},5443:(e,t,n)=>{var s=n(3837);var i=n(2781).Stream;var r=n(8611);e.exports=CombinedStream;function CombinedStream(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}s.inherits(CombinedStream,i);CombinedStream.create=function(e){var t=new this;e=e||{};for(var n in e){t[n]=e[n]}return t};CombinedStream.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};CombinedStream.prototype.append=function(e){var t=CombinedStream.isStreamLike(e);if(t){if(!(e instanceof r)){var n=r.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=n}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};CombinedStream.prototype.pipe=function(e,t){i.prototype.pipe.call(this,e,t);this.resume();return e};CombinedStream.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};CombinedStream.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(e){var t=CombinedStream.isStreamLike(e);if(t){e.on("data",this._checkDataSize.bind(this));this._handleErrors(e)}this._pipeNext(e)}.bind(this))};CombinedStream.prototype._pipeNext=function(e){this._currentStream=e;var t=CombinedStream.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var n=e;this.write(n);this._getNext()};CombinedStream.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))};CombinedStream.prototype.write=function(e){this.emit("data",e)};CombinedStream.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};CombinedStream.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}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")};CombinedStream.prototype.destroy=function(){this._reset();this.emit("close")};CombinedStream.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};CombinedStream.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};CombinedStream.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize}));if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};CombinedStream.prototype._emitError=function(e){this._reset();this.emit("error",e)}},8611:(e,t,n)=>{var s=n(2781).Stream;var i=n(3837);e.exports=DelayedStream;function DelayedStream(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}i.inherits(DelayedStream,s);DelayedStream.create=function(e,t){var n=new this;t=t||{};for(var s in t){n[s]=t[s]}n.source=e;var i=e.emit;e.emit=function(){n._handleEmit(arguments);return i.apply(e,arguments)};e.on("error",(function(){}));if(n.pauseStream){e.pause()}return n};Object.defineProperty(DelayedStream.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});DelayedStream.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};DelayedStream.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};DelayedStream.prototype.pause=function(){this.source.pause()};DelayedStream.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};DelayedStream.prototype.pipe=function(){var e=s.prototype.pipe.apply(this,arguments);this.resume();return e};DelayedStream.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};DelayedStream.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},1133:(e,t,n)=>{var s;e.exports=function(){if(!s){try{s=n(6167)("follow-redirects")}catch(e){}if(typeof s!=="function"){s=function(){}}}s.apply(null,arguments)}},7707:(e,t,n)=>{var s=n(7310);var i=s.URL;var r=n(3685);var o=n(5687);var A=n(2781).Writable;var a=n(9491);var c=n(1133);var u=["abort","aborted","connect","error","socket","timeout"];var l=Object.create(null);u.forEach((function(e){l[e]=function(t,n,s){this._redirectable.emit(e,t,n,s)}}));var d=createErrorType("ERR_INVALID_URL","Invalid URL",TypeError);var p=createErrorType("ERR_FR_REDIRECTION_FAILURE","Redirected request failed");var g=createErrorType("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded");var h=createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit");var f=createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");var E=A.prototype.destroy||noop;function RedirectableRequest(e,t){A.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var n=this;this._onNativeResponse=function(e){n._processResponse(e)};this._performRequest()}RedirectableRequest.prototype=Object.create(A.prototype);RedirectableRequest.prototype.abort=function(){destroyRequest(this._currentRequest);this._currentRequest.abort();this.emit("abort")};RedirectableRequest.prototype.destroy=function(e){destroyRequest(this._currentRequest,e);E.call(this,e);return this};RedirectableRequest.prototype.write=function(e,t,n){if(this._ending){throw new f}if(!isString(e)&&!isBuffer(e)){throw new TypeError("data should be a string, Buffer or Uint8Array")}if(isFunction(t)){n=t;t=null}if(e.length===0){if(n){n()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,n)}else{this.emit("error",new h);this.abort()}};RedirectableRequest.prototype.end=function(e,t,n){if(isFunction(e)){n=e;e=t=null}else if(isFunction(t)){n=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,n)}else{var s=this;var i=this._currentRequest;this.write(e,t,(function(){s._ended=true;i.end(null,null,n)}));this._ending=true}};RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};RedirectableRequest.prototype.setTimeout=function(e,t){var n=this;function destroyOnTimeout(t){t.setTimeout(e);t.removeListener("timeout",t.destroy);t.addListener("timeout",t.destroy)}function startTimer(t){if(n._timeout){clearTimeout(n._timeout)}n._timeout=setTimeout((function(){n.emit("timeout");clearTimer()}),e);destroyOnTimeout(t)}function clearTimer(){if(n._timeout){clearTimeout(n._timeout);n._timeout=null}n.removeListener("abort",clearTimer);n.removeListener("error",clearTimer);n.removeListener("response",clearTimer);n.removeListener("close",clearTimer);if(t){n.removeListener("timeout",t)}if(!n.socket){n._currentRequest.removeListener("socket",startTimer)}}if(t){this.on("timeout",t)}if(this.socket){startTimer(this.socket)}else{this._currentRequest.once("socket",startTimer)}this.on("socket",destroyOnTimeout);this.on("abort",clearTimer);this.on("error",clearTimer);this.on("response",clearTimer);this.on("close",clearTimer);return this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){RedirectableRequest.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}}));["aborted","connection","socket"].forEach((function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})}));RedirectableRequest.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){this.emit("error",new TypeError("Unsupported protocol "+e));return}if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var r of u){i.on(r,l[r])}this._currentUrl=/^\//.test(this._options.path)?s.format(this._options):this._options.path;if(this._isRedirect){var o=0;var A=this;var a=this._requestBodyBuffers;(function writeNext(e){if(i===A._currentRequest){if(e){A.emit("error",e)}else if(o=400){e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[];return}destroyRequest(this._currentRequest);e.destroy();if(++this._redirectCount>this._options.maxRedirects){this.emit("error",new g);return}var i;var r=this._options.beforeRedirect;if(r){i=Object.assign({Host:e.req.getHeader("host")},this._options.headers)}var o=this._options.method;if((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method)){this._options.method="GET";this._requestBodyBuffers=[];removeMatchingHeaders(/^content-/i,this._options.headers)}var A=removeMatchingHeaders(/^host$/i,this._options.headers);var a=s.parse(this._currentUrl);var u=A||a.host;var l=/^\w+:/.test(n)?this._currentUrl:s.format(Object.assign(a,{host:u}));var d;try{d=s.resolve(l,n)}catch(e){this.emit("error",new p({cause:e}));return}c("redirecting to",d);this._isRedirect=true;var h=s.parse(d);Object.assign(this._options,h);if(h.protocol!==a.protocol&&h.protocol!=="https:"||h.host!==u&&!isSubdomain(h.host,u)){removeMatchingHeaders(/^(?:authorization|cookie)$/i,this._options.headers)}if(isFunction(r)){var f={headers:e.headers,statusCode:t};var E={url:l,method:o,headers:i};try{r(this._options,f,E)}catch(e){this.emit("error",e);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new p({cause:e}))}};function wrap(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var n={};Object.keys(e).forEach((function(r){var o=r+":";var A=n[o]=e[r];var u=t[r]=Object.create(A);function request(e,r,A){if(isString(e)){var u;try{u=urlToOptions(new i(e))}catch(t){u=s.parse(e)}if(!isString(u.protocol)){throw new d({input:e})}e=u}else if(i&&e instanceof i){e=urlToOptions(e)}else{A=r;r=e;e={protocol:o}}if(isFunction(r)){A=r;r=null}r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r);r.nativeProtocols=n;if(!isString(r.host)&&!isString(r.hostname)){r.hostname="::1"}a.equal(r.protocol,o,"protocol mismatch");c("options",r);return new RedirectableRequest(r,A)}function get(e,t,n){var s=u.request(e,t,n);s.end();return s}Object.defineProperties(u,{request:{value:request,configurable:true,enumerable:true,writable:true},get:{value:get,configurable:true,enumerable:true,writable:true}})}));return t}function noop(){}function urlToOptions(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};if(e.port!==""){t.port=Number(e.port)}return t}function removeMatchingHeaders(e,t){var n;for(var s in t){if(e.test(s)){n=t[s];delete t[s]}}return n===null||typeof n==="undefined"?undefined:String(n).trim()}function createErrorType(e,t,n){function CustomError(n){Error.captureStackTrace(this,this.constructor);Object.assign(this,n||{});this.code=e;this.message=this.cause?t+": "+this.cause.message:t}CustomError.prototype=new(n||Error);CustomError.prototype.constructor=CustomError;CustomError.prototype.name="Error ["+e+"]";return CustomError}function destroyRequest(e,t){for(var n of u){e.removeListener(n,l[n])}e.on("error",noop);e.destroy(t)}function isSubdomain(e,t){a(isString(e)&&isString(t));var n=e.length-t.length-1;return n>0&&e[n]==="."&&e.endsWith(t)}function isString(e){return typeof e==="string"||e instanceof String}function isFunction(e){return typeof e==="function"}function isBuffer(e){return typeof e==="object"&&"length"in e}e.exports=wrap({http:r,https:o});e.exports.wrap=wrap},4334:(e,t,n)=>{var s=n(5443);var i=n(3837);var r=n(1017);var o=n(3685);var A=n(5687);var a=n(7310).parse;var c=n(7147);var u=n(2781).Stream;var l=n(3583);var d=n(4812);var p=n(7142);e.exports=FormData;i.inherits(FormData,s);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];s.call(this);e=e||{};for(var t in e){this[t]=e[t]}}FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,n){n=n||{};if(typeof n=="string"){n={filename:n}}var r=s.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(i.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,n);var A=this._multiPartFooter();r(o);r(t);r(A);this._trackLength(o,t,n)};FormData.prototype._trackLength=function(e,t,n){var s=0;if(n.knownLength!=null){s+=+n.knownLength}else if(Buffer.isBuffer(t)){s=t.length}else if(typeof t==="string"){s=Buffer.byteLength(t)}this._valueLength+=s;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof u)){return}if(!n.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{c.stat(e.path,(function(n,s){var i;if(n){t(n);return}i=s.size-(e.start?e.start:0);t(null,i)}))}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",(function(n){e.pause();t(null,+n.headers["content-length"])}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,n){if(typeof n.header=="string"){return n.header}var s=this._getContentDisposition(t,n);var i=this._getContentType(t,n);var r="";var o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(s||[]),"Content-Type":[].concat(i||[])};if(typeof n.header=="object"){p(o,n.header)}var A;for(var a in o){if(!o.hasOwnProperty(a))continue;A=o[a];if(A==null){continue}if(!Array.isArray(A)){A=[A]}if(A.length){r+=a+": "+A.join("; ")+FormData.LINE_BREAK}}return"--"+this.getBoundary()+FormData.LINE_BREAK+r+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var n,s;if(typeof t.filepath==="string"){n=r.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){n=r.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){n=r.basename(e.client._httpMessage.path||"")}if(n){s='filename="'+n+'"'}return s};FormData.prototype._getContentType=function(e,t){var n=t.contentType;if(!n&&e.name){n=l.lookup(e.name)}if(!n&&e.path){n=l.lookup(e.path)}if(!n&&e.readable&&e.hasOwnProperty("httpVersion")){n=e.headers["content-type"]}if(!n&&(t.filepath||t.filename)){n=l.lookup(t.filepath||t.filename)}if(!n&&typeof e=="object"){n=FormData.DEFAULT_CONTENT_TYPE}return n};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var n=this._streams.length===0;if(n){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){n[t.toLowerCase()]=e[t]}}return n};FormData.prototype.setBoundary=function(e){this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var n=0,s=this._streams.length;n{e.exports=function(e,t){Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]}));return e}},4061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.cryptoRuntime=t.base64url=t.generateSecret=t.generateKeyPair=t.errors=t.decodeJwt=t.decodeProtectedHeader=t.importJWK=t.importX509=t.importPKCS8=t.importSPKI=t.exportJWK=t.exportSPKI=t.exportPKCS8=t.UnsecuredJWT=t.createRemoteJWKSet=t.createLocalJWKSet=t.EmbeddedJWK=t.calculateJwkThumbprintUri=t.calculateJwkThumbprint=t.EncryptJWT=t.SignJWT=t.GeneralSign=t.FlattenedSign=t.CompactSign=t.FlattenedEncrypt=t.CompactEncrypt=t.jwtDecrypt=t.jwtVerify=t.generalVerify=t.flattenedVerify=t.compactVerify=t.GeneralEncrypt=t.generalDecrypt=t.flattenedDecrypt=t.compactDecrypt=void 0;var s=n(7651);Object.defineProperty(t,"compactDecrypt",{enumerable:true,get:function(){return s.compactDecrypt}});var i=n(7566);Object.defineProperty(t,"flattenedDecrypt",{enumerable:true,get:function(){return i.flattenedDecrypt}});var r=n(5684);Object.defineProperty(t,"generalDecrypt",{enumerable:true,get:function(){return r.generalDecrypt}});var o=n(3992);Object.defineProperty(t,"GeneralEncrypt",{enumerable:true,get:function(){return o.GeneralEncrypt}});var A=n(5212);Object.defineProperty(t,"compactVerify",{enumerable:true,get:function(){return A.compactVerify}});var a=n(2095);Object.defineProperty(t,"flattenedVerify",{enumerable:true,get:function(){return a.flattenedVerify}});var c=n(4975);Object.defineProperty(t,"generalVerify",{enumerable:true,get:function(){return c.generalVerify}});var u=n(9887);Object.defineProperty(t,"jwtVerify",{enumerable:true,get:function(){return u.jwtVerify}});var l=n(3378);Object.defineProperty(t,"jwtDecrypt",{enumerable:true,get:function(){return l.jwtDecrypt}});var d=n(6203);Object.defineProperty(t,"CompactEncrypt",{enumerable:true,get:function(){return d.CompactEncrypt}});var p=n(1555);Object.defineProperty(t,"FlattenedEncrypt",{enumerable:true,get:function(){return p.FlattenedEncrypt}});var g=n(8257);Object.defineProperty(t,"CompactSign",{enumerable:true,get:function(){return g.CompactSign}});var h=n(4825);Object.defineProperty(t,"FlattenedSign",{enumerable:true,get:function(){return h.FlattenedSign}});var f=n(4268);Object.defineProperty(t,"GeneralSign",{enumerable:true,get:function(){return f.GeneralSign}});var E=n(8882);Object.defineProperty(t,"SignJWT",{enumerable:true,get:function(){return E.SignJWT}});var m=n(960);Object.defineProperty(t,"EncryptJWT",{enumerable:true,get:function(){return m.EncryptJWT}});var C=n(3494);Object.defineProperty(t,"calculateJwkThumbprint",{enumerable:true,get:function(){return C.calculateJwkThumbprint}});Object.defineProperty(t,"calculateJwkThumbprintUri",{enumerable:true,get:function(){return C.calculateJwkThumbprintUri}});var Q=n(1751);Object.defineProperty(t,"EmbeddedJWK",{enumerable:true,get:function(){return Q.EmbeddedJWK}});var I=n(9970);Object.defineProperty(t,"createLocalJWKSet",{enumerable:true,get:function(){return I.createLocalJWKSet}});var B=n(9035);Object.defineProperty(t,"createRemoteJWKSet",{enumerable:true,get:function(){return B.createRemoteJWKSet}});var y=n(8568);Object.defineProperty(t,"UnsecuredJWT",{enumerable:true,get:function(){return y.UnsecuredJWT}});var b=n(465);Object.defineProperty(t,"exportPKCS8",{enumerable:true,get:function(){return b.exportPKCS8}});Object.defineProperty(t,"exportSPKI",{enumerable:true,get:function(){return b.exportSPKI}});Object.defineProperty(t,"exportJWK",{enumerable:true,get:function(){return b.exportJWK}});var w=n(4230);Object.defineProperty(t,"importSPKI",{enumerable:true,get:function(){return w.importSPKI}});Object.defineProperty(t,"importPKCS8",{enumerable:true,get:function(){return w.importPKCS8}});Object.defineProperty(t,"importX509",{enumerable:true,get:function(){return w.importX509}});Object.defineProperty(t,"importJWK",{enumerable:true,get:function(){return w.importJWK}});var R=n(3991);Object.defineProperty(t,"decodeProtectedHeader",{enumerable:true,get:function(){return R.decodeProtectedHeader}});var v=n(5611);Object.defineProperty(t,"decodeJwt",{enumerable:true,get:function(){return v.decodeJwt}});t.errors=n(4419);var k=n(1036);Object.defineProperty(t,"generateKeyPair",{enumerable:true,get:function(){return k.generateKeyPair}});var S=n(6617);Object.defineProperty(t,"generateSecret",{enumerable:true,get:function(){return S.generateSecret}});t.base64url=n(3238);var x=n(1173);Object.defineProperty(t,"cryptoRuntime",{enumerable:true,get:function(){return x.default}})},7651:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.compactDecrypt=void 0;const s=n(7566);const i=n(4419);const r=n(1691);async function compactDecrypt(e,t,n){if(e instanceof Uint8Array){e=r.decoder.decode(e)}if(typeof e!=="string"){throw new i.JWEInvalid("Compact JWE must be a string or Uint8Array")}const{0:o,1:A,2:a,3:c,4:u,length:l}=e.split(".");if(l!==5){throw new i.JWEInvalid("Invalid Compact JWE")}const d=await(0,s.flattenedDecrypt)({ciphertext:c,iv:a||undefined,protected:o||undefined,tag:u||undefined,encrypted_key:A||undefined},t,n);const p={plaintext:d.plaintext,protectedHeader:d.protectedHeader};if(typeof t==="function"){return{...p,key:d.key}}return p}t.compactDecrypt=compactDecrypt},6203:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CompactEncrypt=void 0;const s=n(1555);class CompactEncrypt{constructor(e){this._flattened=new s.FlattenedEncrypt(e)}setContentEncryptionKey(e){this._flattened.setContentEncryptionKey(e);return this}setInitializationVector(e){this._flattened.setInitializationVector(e);return this}setProtectedHeader(e){this._flattened.setProtectedHeader(e);return this}setKeyManagementParameters(e){this._flattened.setKeyManagementParameters(e);return this}async encrypt(e,t){const n=await this._flattened.encrypt(e,t);return[n.protected,n.encrypted_key,n.iv,n.ciphertext,n.tag].join(".")}}t.CompactEncrypt=CompactEncrypt},7566:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.flattenedDecrypt=void 0;const s=n(518);const i=n(6137);const r=n(7022);const o=n(4419);const A=n(6063);const a=n(9127);const c=n(6127);const u=n(1691);const l=n(3987);const d=n(863);const p=n(5148);async function flattenedDecrypt(e,t,n){var g;if(!(0,a.default)(e)){throw new o.JWEInvalid("Flattened JWE must be an object")}if(e.protected===undefined&&e.header===undefined&&e.unprotected===undefined){throw new o.JWEInvalid("JOSE Header missing")}if(typeof e.iv!=="string"){throw new o.JWEInvalid("JWE Initialization Vector missing or incorrect type")}if(typeof e.ciphertext!=="string"){throw new o.JWEInvalid("JWE Ciphertext missing or incorrect type")}if(typeof e.tag!=="string"){throw new o.JWEInvalid("JWE Authentication Tag missing or incorrect type")}if(e.protected!==undefined&&typeof e.protected!=="string"){throw new o.JWEInvalid("JWE Protected Header incorrect type")}if(e.encrypted_key!==undefined&&typeof e.encrypted_key!=="string"){throw new o.JWEInvalid("JWE Encrypted Key incorrect type")}if(e.aad!==undefined&&typeof e.aad!=="string"){throw new o.JWEInvalid("JWE AAD incorrect type")}if(e.header!==undefined&&!(0,a.default)(e.header)){throw new o.JWEInvalid("JWE Shared Unprotected Header incorrect type")}if(e.unprotected!==undefined&&!(0,a.default)(e.unprotected)){throw new o.JWEInvalid("JWE Per-Recipient Unprotected Header incorrect type")}let h;if(e.protected){try{const t=(0,s.decode)(e.protected);h=JSON.parse(u.decoder.decode(t))}catch{throw new o.JWEInvalid("JWE Protected Header is invalid")}}if(!(0,A.default)(h,e.header,e.unprotected)){throw new o.JWEInvalid("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint")}const f={...h,...e.header,...e.unprotected};(0,d.default)(o.JWEInvalid,new Map,n===null||n===void 0?void 0:n.crit,h,f);if(f.zip!==undefined){if(!h||!h.zip){throw new o.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}if(f.zip!=="DEF"){throw new o.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}}const{alg:E,enc:m}=f;if(typeof E!=="string"||!E){throw new o.JWEInvalid("missing JWE Algorithm (alg) in JWE Header")}if(typeof m!=="string"||!m){throw new o.JWEInvalid("missing JWE Encryption Algorithm (enc) in JWE Header")}const C=n&&(0,p.default)("keyManagementAlgorithms",n.keyManagementAlgorithms);const Q=n&&(0,p.default)("contentEncryptionAlgorithms",n.contentEncryptionAlgorithms);if(C&&!C.has(E)){throw new o.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed')}if(Q&&!Q.has(m)){throw new o.JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter not allowed')}let I;if(e.encrypted_key!==undefined){try{I=(0,s.decode)(e.encrypted_key)}catch{throw new o.JWEInvalid("Failed to base64url decode the encrypted_key")}}let B=false;if(typeof t==="function"){t=await t(h,e);B=true}let y;try{y=await(0,c.default)(E,t,I,f,n)}catch(e){if(e instanceof TypeError||e instanceof o.JWEInvalid||e instanceof o.JOSENotSupported){throw e}y=(0,l.default)(m)}let b;let w;try{b=(0,s.decode)(e.iv)}catch{throw new o.JWEInvalid("Failed to base64url decode the iv")}try{w=(0,s.decode)(e.tag)}catch{throw new o.JWEInvalid("Failed to base64url decode the tag")}const R=u.encoder.encode((g=e.protected)!==null&&g!==void 0?g:"");let v;if(e.aad!==undefined){v=(0,u.concat)(R,u.encoder.encode("."),u.encoder.encode(e.aad))}else{v=R}let k;try{k=(0,s.decode)(e.ciphertext)}catch{throw new o.JWEInvalid("Failed to base64url decode the ciphertext")}let S=await(0,i.default)(m,y,k,b,w,v);if(f.zip==="DEF"){S=await((n===null||n===void 0?void 0:n.inflateRaw)||r.inflate)(S)}const x={plaintext:S};if(e.protected!==undefined){x.protectedHeader=h}if(e.aad!==undefined){try{x.additionalAuthenticatedData=(0,s.decode)(e.aad)}catch{throw new o.JWEInvalid("Failed to base64url decode the aad")}}if(e.unprotected!==undefined){x.sharedUnprotectedHeader=e.unprotected}if(e.header!==undefined){x.unprotectedHeader=e.header}if(B){return{...x,key:t}}return x}t.flattenedDecrypt=flattenedDecrypt},1555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FlattenedEncrypt=t.unprotected=void 0;const s=n(518);const i=n(6476);const r=n(7022);const o=n(4630);const A=n(3286);const a=n(4419);const c=n(6063);const u=n(1691);const l=n(863);t.unprotected=Symbol();class FlattenedEncrypt{constructor(e){if(!(e instanceof Uint8Array)){throw new TypeError("plaintext must be an instance of Uint8Array")}this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters){throw new TypeError("setKeyManagementParameters can only be called once")}this._keyManagementParameters=e;return this}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader){throw new TypeError("setSharedUnprotectedHeader can only be called once")}this._sharedUnprotectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}setContentEncryptionKey(e){if(this._cek){throw new TypeError("setContentEncryptionKey can only be called once")}this._cek=e;return this}setInitializationVector(e){if(this._iv){throw new TypeError("setInitializationVector can only be called once")}this._iv=e;return this}async encrypt(e,n){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader){throw new a.JWEInvalid("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()")}if(!(0,c.default)(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader)){throw new a.JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint")}const d={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};(0,l.default)(a.JWEInvalid,new Map,n===null||n===void 0?void 0:n.crit,this._protectedHeader,d);if(d.zip!==undefined){if(!this._protectedHeader||!this._protectedHeader.zip){throw new a.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}if(d.zip!=="DEF"){throw new a.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}}const{alg:p,enc:g}=d;if(typeof p!=="string"||!p){throw new a.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid')}if(typeof g!=="string"||!g){throw new a.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid')}let h;if(p==="dir"){if(this._cek){throw new TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}}else if(p==="ECDH-ES"){if(this._cek){throw new TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement")}}let f;{let s;({cek:f,encryptedKey:h,parameters:s}=await(0,A.default)(p,g,e,this._cek,this._keyManagementParameters));if(s){if(n&&t.unprotected in n){if(!this._unprotectedHeader){this.setUnprotectedHeader(s)}else{this._unprotectedHeader={...this._unprotectedHeader,...s}}}else{if(!this._protectedHeader){this.setProtectedHeader(s)}else{this._protectedHeader={...this._protectedHeader,...s}}}}}this._iv||(this._iv=(0,o.default)(g));let E;let m;let C;if(this._protectedHeader){m=u.encoder.encode((0,s.encode)(JSON.stringify(this._protectedHeader)))}else{m=u.encoder.encode("")}if(this._aad){C=(0,s.encode)(this._aad);E=(0,u.concat)(m,u.encoder.encode("."),u.encoder.encode(C))}else{E=m}let Q;let I;if(d.zip==="DEF"){const e=await((n===null||n===void 0?void 0:n.deflateRaw)||r.deflate)(this._plaintext);({ciphertext:Q,tag:I}=await(0,i.default)(g,e,f,this._iv,E))}else{({ciphertext:Q,tag:I}=await(0,i.default)(g,this._plaintext,f,this._iv,E))}const B={ciphertext:(0,s.encode)(Q),iv:(0,s.encode)(this._iv),tag:(0,s.encode)(I)};if(h){B.encrypted_key=(0,s.encode)(h)}if(C){B.aad=C}if(this._protectedHeader){B.protected=u.decoder.decode(m)}if(this._sharedUnprotectedHeader){B.unprotected=this._sharedUnprotectedHeader}if(this._unprotectedHeader){B.header=this._unprotectedHeader}return B}}t.FlattenedEncrypt=FlattenedEncrypt},5684:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generalDecrypt=void 0;const s=n(7566);const i=n(4419);const r=n(9127);async function generalDecrypt(e,t,n){if(!(0,r.default)(e)){throw new i.JWEInvalid("General JWE must be an object")}if(!Array.isArray(e.recipients)||!e.recipients.every(r.default)){throw new i.JWEInvalid("JWE Recipients missing or incorrect type")}if(!e.recipients.length){throw new i.JWEInvalid("JWE Recipients has no members")}for(const i of e.recipients){try{return await(0,s.flattenedDecrypt)({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:i.encrypted_key,header:i.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,n)}catch{}}throw new i.JWEDecryptionFailed}t.generalDecrypt=generalDecrypt},3992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GeneralEncrypt=void 0;const s=n(1555);const i=n(4419);const r=n(3987);const o=n(6063);const A=n(3286);const a=n(518);const c=n(863);class IndividualRecipient{constructor(e,t,n){this.parent=e;this.key=t;this.options=n}setUnprotectedHeader(e){if(this.unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this.unprotectedHeader=e;return this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class GeneralEncrypt{constructor(e){this._recipients=[];this._plaintext=e}addRecipient(e,t){const n=new IndividualRecipient(this,e,{crit:t===null||t===void 0?void 0:t.crit});this._recipients.push(n);return n}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setSharedUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}async encrypt(e){var t,n,u;if(!this._recipients.length){throw new i.JWEInvalid("at least one recipient must be added")}e={deflateRaw:e===null||e===void 0?void 0:e.deflateRaw};if(this._recipients.length===1){const[t]=this._recipients;const n=await new s.FlattenedEncrypt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options,...e});let i={ciphertext:n.ciphertext,iv:n.iv,recipients:[{}],tag:n.tag};if(n.aad)i.aad=n.aad;if(n.protected)i.protected=n.protected;if(n.unprotected)i.unprotected=n.unprotected;if(n.encrypted_key)i.recipients[0].encrypted_key=n.encrypted_key;if(n.header)i.recipients[0].header=n.header;return i}let l;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EmbeddedJWK=void 0;const s=n(4230);const i=n(9127);const r=n(4419);async function EmbeddedJWK(e,t){const n={...e,...t===null||t===void 0?void 0:t.header};if(!(0,i.default)(n.jwk)){throw new r.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object')}const o=await(0,s.importJWK)({...n.jwk,ext:true},n.alg,true);if(o instanceof Uint8Array||o.type!=="public"){throw new r.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key')}return o}t.EmbeddedJWK=EmbeddedJWK},3494:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.calculateJwkThumbprintUri=t.calculateJwkThumbprint=void 0;const s=n(2355);const i=n(518);const r=n(4419);const o=n(1691);const A=n(9127);const check=(e,t)=>{if(typeof e!=="string"||!e){throw new r.JWKInvalid(`${t} missing or invalid`)}};async function calculateJwkThumbprint(e,t){if(!(0,A.default)(e)){throw new TypeError("JWK must be an object")}t!==null&&t!==void 0?t:t="sha256";if(t!=="sha256"&&t!=="sha384"&&t!=="sha512"){throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"')}let n;switch(e.kty){case"EC":check(e.crv,'"crv" (Curve) Parameter');check(e.x,'"x" (X Coordinate) Parameter');check(e.y,'"y" (Y Coordinate) Parameter');n={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":check(e.crv,'"crv" (Subtype of Key Pair) Parameter');check(e.x,'"x" (Public Key) Parameter');n={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":check(e.e,'"e" (Exponent) Parameter');check(e.n,'"n" (Modulus) Parameter');n={e:e.e,kty:e.kty,n:e.n};break;case"oct":check(e.k,'"k" (Key Value) Parameter');n={k:e.k,kty:e.kty};break;default:throw new r.JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported')}const a=o.encoder.encode(JSON.stringify(n));return(0,i.encode)(await(0,s.default)(t,a))}t.calculateJwkThumbprint=calculateJwkThumbprint;async function calculateJwkThumbprintUri(e,t){t!==null&&t!==void 0?t:t="sha256";const n=await calculateJwkThumbprint(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${n}`}t.calculateJwkThumbprintUri=calculateJwkThumbprintUri},9970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createLocalJWKSet=t.LocalJWKSet=t.isJWKSLike=void 0;const s=n(4230);const i=n(4419);const r=n(9127);function getKtyFromAlg(e){switch(typeof e==="string"&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new i.JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set')}}function isJWKSLike(e){return e&&typeof e==="object"&&Array.isArray(e.keys)&&e.keys.every(isJWKLike)}t.isJWKSLike=isJWKSLike;function isJWKLike(e){return(0,r.default)(e)}function clone(e){if(typeof structuredClone==="function"){return structuredClone(e)}return JSON.parse(JSON.stringify(e))}class LocalJWKSet{constructor(e){this._cached=new WeakMap;if(!isJWKSLike(e)){throw new i.JWKSInvalid("JSON Web Key Set malformed")}this._jwks=clone(e)}async getKey(e,t){const{alg:n,kid:s}={...e,...t===null||t===void 0?void 0:t.header};const r=getKtyFromAlg(n);const o=this._jwks.keys.filter((e=>{let t=r===e.kty;if(t&&typeof s==="string"){t=s===e.kid}if(t&&typeof e.alg==="string"){t=n===e.alg}if(t&&typeof e.use==="string"){t=e.use==="sig"}if(t&&Array.isArray(e.key_ops)){t=e.key_ops.includes("verify")}if(t&&n==="EdDSA"){t=e.crv==="Ed25519"||e.crv==="Ed448"}if(t){switch(n){case"ES256":t=e.crv==="P-256";break;case"ES256K":t=e.crv==="secp256k1";break;case"ES384":t=e.crv==="P-384";break;case"ES512":t=e.crv==="P-521";break}}return t}));const{0:A,length:a}=o;if(a===0){throw new i.JWKSNoMatchingKey}else if(a!==1){const e=new i.JWKSMultipleMatchingKeys;const{_cached:t}=this;e[Symbol.asyncIterator]=async function*(){for(const e of o){try{yield await importWithAlgCache(t,e,n)}catch{continue}}};throw e}return importWithAlgCache(this._cached,A,n)}}t.LocalJWKSet=LocalJWKSet;async function importWithAlgCache(e,t,n){const r=e.get(t)||e.set(t,{}).get(t);if(r[n]===undefined){const e=await(0,s.importJWK)({...t,ext:true},n);if(e instanceof Uint8Array||e.type!=="public"){throw new i.JWKSInvalid("JSON Web Key Set members must be public keys")}r[n]=e}return r[n]}function createLocalJWKSet(e){const t=new LocalJWKSet(e);return async function(e,n){return t.getKey(e,n)}}t.createLocalJWKSet=createLocalJWKSet},9035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createRemoteJWKSet=void 0;const s=n(3650);const i=n(4419);const r=n(9970);function isCloudflareWorkers(){return typeof WebSocketPair!=="undefined"||typeof navigator!=="undefined"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime!=="undefined"&&EdgeRuntime==="vercel"}class RemoteJWKSet extends r.LocalJWKSet{constructor(e,t){super({keys:[]});this._jwks=undefined;if(!(e instanceof URL)){throw new TypeError("url must be an instance of URL")}this._url=new URL(e.href);this._options={agent:t===null||t===void 0?void 0:t.agent,headers:t===null||t===void 0?void 0:t.headers};this._timeoutDuration=typeof(t===null||t===void 0?void 0:t.timeoutDuration)==="number"?t===null||t===void 0?void 0:t.timeoutDuration:5e3;this._cooldownDuration=typeof(t===null||t===void 0?void 0:t.cooldownDuration)==="number"?t===null||t===void 0?void 0:t.cooldownDuration:3e4;this._cacheMaxAge=typeof(t===null||t===void 0?void 0:t.cacheMaxAge)==="number"?t===null||t===void 0?void 0:t.cacheMaxAge:6e5}coolingDown(){return typeof this._jwksTimestamp==="number"?Date.now(){if(!(0,r.isJWKSLike)(e)){throw new i.JWKSInvalid("JSON Web Key Set malformed")}this._jwks={keys:e.keys};this._jwksTimestamp=Date.now();this._pendingFetch=undefined})).catch((e=>{this._pendingFetch=undefined;throw e})));await this._pendingFetch}}function createRemoteJWKSet(e,t){const n=new RemoteJWKSet(e,t);return async function(e,t){return n.getKey(e,t)}}t.createRemoteJWKSet=createRemoteJWKSet},8257:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CompactSign=void 0;const s=n(4825);class CompactSign{constructor(e){this._flattened=new s.FlattenedSign(e)}setProtectedHeader(e){this._flattened.setProtectedHeader(e);return this}async sign(e,t){const n=await this._flattened.sign(e,t);if(n.payload===undefined){throw new TypeError("use the flattened module for creating JWS with b64: false")}return`${n.protected}.${n.payload}.${n.signature}`}}t.CompactSign=CompactSign},5212:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.compactVerify=void 0;const s=n(2095);const i=n(4419);const r=n(1691);async function compactVerify(e,t,n){if(e instanceof Uint8Array){e=r.decoder.decode(e)}if(typeof e!=="string"){throw new i.JWSInvalid("Compact JWS must be a string or Uint8Array")}const{0:o,1:A,2:a,length:c}=e.split(".");if(c!==3){throw new i.JWSInvalid("Invalid Compact JWS")}const u=await(0,s.flattenedVerify)({payload:A,protected:o,signature:a},t,n);const l={payload:u.payload,protectedHeader:u.protectedHeader};if(typeof t==="function"){return{...l,key:u.key}}return l}t.compactVerify=compactVerify},4825:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FlattenedSign=void 0;const s=n(518);const i=n(9935);const r=n(6063);const o=n(4419);const A=n(1691);const a=n(6241);const c=n(863);class FlattenedSign{constructor(e){if(!(e instanceof Uint8Array)){throw new TypeError("payload must be an instance of Uint8Array")}this._payload=e}setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this._unprotectedHeader=e;return this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader){throw new o.JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()")}if(!(0,r.default)(this._protectedHeader,this._unprotectedHeader)){throw new o.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint")}const n={...this._protectedHeader,...this._unprotectedHeader};const u=(0,c.default)(o.JWSInvalid,new Map([["b64",true]]),t===null||t===void 0?void 0:t.crit,this._protectedHeader,n);let l=true;if(u.has("b64")){l=this._protectedHeader.b64;if(typeof l!=="boolean"){throw new o.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}}const{alg:d}=n;if(typeof d!=="string"||!d){throw new o.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid')}(0,a.default)(d,e,"sign");let p=this._payload;if(l){p=A.encoder.encode((0,s.encode)(p))}let g;if(this._protectedHeader){g=A.encoder.encode((0,s.encode)(JSON.stringify(this._protectedHeader)))}else{g=A.encoder.encode("")}const h=(0,A.concat)(g,A.encoder.encode("."),p);const f=await(0,i.default)(d,e,h);const E={signature:(0,s.encode)(f),payload:""};if(l){E.payload=A.decoder.decode(p)}if(this._unprotectedHeader){E.header=this._unprotectedHeader}if(this._protectedHeader){E.protected=A.decoder.decode(g)}return E}}t.FlattenedSign=FlattenedSign},2095:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.flattenedVerify=void 0;const s=n(518);const i=n(3569);const r=n(4419);const o=n(1691);const A=n(6063);const a=n(9127);const c=n(6241);const u=n(863);const l=n(5148);async function flattenedVerify(e,t,n){var d;if(!(0,a.default)(e)){throw new r.JWSInvalid("Flattened JWS must be an object")}if(e.protected===undefined&&e.header===undefined){throw new r.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members')}if(e.protected!==undefined&&typeof e.protected!=="string"){throw new r.JWSInvalid("JWS Protected Header incorrect type")}if(e.payload===undefined){throw new r.JWSInvalid("JWS Payload missing")}if(typeof e.signature!=="string"){throw new r.JWSInvalid("JWS Signature missing or incorrect type")}if(e.header!==undefined&&!(0,a.default)(e.header)){throw new r.JWSInvalid("JWS Unprotected Header incorrect type")}let p={};if(e.protected){try{const t=(0,s.decode)(e.protected);p=JSON.parse(o.decoder.decode(t))}catch{throw new r.JWSInvalid("JWS Protected Header is invalid")}}if(!(0,A.default)(p,e.header)){throw new r.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint")}const g={...p,...e.header};const h=(0,u.default)(r.JWSInvalid,new Map([["b64",true]]),n===null||n===void 0?void 0:n.crit,p,g);let f=true;if(h.has("b64")){f=p.b64;if(typeof f!=="boolean"){throw new r.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}}const{alg:E}=g;if(typeof E!=="string"||!E){throw new r.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid')}const m=n&&(0,l.default)("algorithms",n.algorithms);if(m&&!m.has(E)){throw new r.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed')}if(f){if(typeof e.payload!=="string"){throw new r.JWSInvalid("JWS Payload must be a string")}}else if(typeof e.payload!=="string"&&!(e.payload instanceof Uint8Array)){throw new r.JWSInvalid("JWS Payload must be a string or an Uint8Array instance")}let C=false;if(typeof t==="function"){t=await t(p,e);C=true}(0,c.default)(E,t,"verify");const Q=(0,o.concat)(o.encoder.encode((d=e.protected)!==null&&d!==void 0?d:""),o.encoder.encode("."),typeof e.payload==="string"?o.encoder.encode(e.payload):e.payload);let I;try{I=(0,s.decode)(e.signature)}catch{throw new r.JWSInvalid("Failed to base64url decode the signature")}const B=await(0,i.default)(E,t,I,Q);if(!B){throw new r.JWSSignatureVerificationFailed}let y;if(f){try{y=(0,s.decode)(e.payload)}catch{throw new r.JWSInvalid("Failed to base64url decode the payload")}}else if(typeof e.payload==="string"){y=o.encoder.encode(e.payload)}else{y=e.payload}const b={payload:y};if(e.protected!==undefined){b.protectedHeader=p}if(e.header!==undefined){b.unprotectedHeader=e.header}if(C){return{...b,key:t}}return b}t.flattenedVerify=flattenedVerify},4268:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GeneralSign=void 0;const s=n(4825);const i=n(4419);class IndividualSignature{constructor(e,t,n){this.parent=e;this.key=t;this.options=n}setProtectedHeader(e){if(this.protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this.protectedHeader=e;return this}setUnprotectedHeader(e){if(this.unprotectedHeader){throw new TypeError("setUnprotectedHeader can only be called once")}this.unprotectedHeader=e;return this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class GeneralSign{constructor(e){this._signatures=[];this._payload=e}addSignature(e,t){const n=new IndividualSignature(this,e,t);this._signatures.push(n);return n}async sign(){if(!this._signatures.length){throw new i.JWSInvalid("at least one signature must be added")}const e={signatures:[],payload:""};for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generalVerify=void 0;const s=n(2095);const i=n(4419);const r=n(9127);async function generalVerify(e,t,n){if(!(0,r.default)(e)){throw new i.JWSInvalid("General JWS must be an object")}if(!Array.isArray(e.signatures)||!e.signatures.every(r.default)){throw new i.JWSInvalid("JWS Signatures missing or incorrect type")}for(const i of e.signatures){try{return await(0,s.flattenedVerify)({header:i.header,payload:e.payload,protected:i.protected,signature:i.signature},t,n)}catch{}}throw new i.JWSSignatureVerificationFailed}t.generalVerify=generalVerify},3378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwtDecrypt=void 0;const s=n(7651);const i=n(7274);const r=n(4419);async function jwtDecrypt(e,t,n){const o=await(0,s.compactDecrypt)(e,t,n);const A=(0,i.default)(o.protectedHeader,o.plaintext,n);const{protectedHeader:a}=o;if(a.iss!==undefined&&a.iss!==A.iss){throw new r.JWTClaimValidationFailed('replicated "iss" claim header parameter mismatch',"iss","mismatch")}if(a.sub!==undefined&&a.sub!==A.sub){throw new r.JWTClaimValidationFailed('replicated "sub" claim header parameter mismatch',"sub","mismatch")}if(a.aud!==undefined&&JSON.stringify(a.aud)!==JSON.stringify(A.aud)){throw new r.JWTClaimValidationFailed('replicated "aud" claim header parameter mismatch',"aud","mismatch")}const c={payload:A,protectedHeader:a};if(typeof t==="function"){return{...c,key:o.key}}return c}t.jwtDecrypt=jwtDecrypt},960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EncryptJWT=void 0;const s=n(6203);const i=n(1691);const r=n(1908);class EncryptJWT extends r.ProduceJWT{setProtectedHeader(e){if(this._protectedHeader){throw new TypeError("setProtectedHeader can only be called once")}this._protectedHeader=e;return this}setKeyManagementParameters(e){if(this._keyManagementParameters){throw new TypeError("setKeyManagementParameters can only be called once")}this._keyManagementParameters=e;return this}setContentEncryptionKey(e){if(this._cek){throw new TypeError("setContentEncryptionKey can only be called once")}this._cek=e;return this}setInitializationVector(e){if(this._iv){throw new TypeError("setInitializationVector can only be called once")}this._iv=e;return this}replicateIssuerAsHeader(){this._replicateIssuerAsHeader=true;return this}replicateSubjectAsHeader(){this._replicateSubjectAsHeader=true;return this}replicateAudienceAsHeader(){this._replicateAudienceAsHeader=true;return this}async encrypt(e,t){const n=new s.CompactEncrypt(i.encoder.encode(JSON.stringify(this._payload)));if(this._replicateIssuerAsHeader){this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}}if(this._replicateSubjectAsHeader){this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}}if(this._replicateAudienceAsHeader){this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}}n.setProtectedHeader(this._protectedHeader);if(this._iv){n.setInitializationVector(this._iv)}if(this._cek){n.setContentEncryptionKey(this._cek)}if(this._keyManagementParameters){n.setKeyManagementParameters(this._keyManagementParameters)}return n.encrypt(e,t)}}t.EncryptJWT=EncryptJWT},1908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ProduceJWT=void 0;const s=n(4476);const i=n(9127);const r=n(7810);class ProduceJWT{constructor(e){if(!(0,i.default)(e)){throw new TypeError("JWT Claims Set MUST be an object")}this._payload=e}setIssuer(e){this._payload={...this._payload,iss:e};return this}setSubject(e){this._payload={...this._payload,sub:e};return this}setAudience(e){this._payload={...this._payload,aud:e};return this}setJti(e){this._payload={...this._payload,jti:e};return this}setNotBefore(e){if(typeof e==="number"){this._payload={...this._payload,nbf:e}}else{this._payload={...this._payload,nbf:(0,s.default)(new Date)+(0,r.default)(e)}}return this}setExpirationTime(e){if(typeof e==="number"){this._payload={...this._payload,exp:e}}else{this._payload={...this._payload,exp:(0,s.default)(new Date)+(0,r.default)(e)}}return this}setIssuedAt(e){if(typeof e==="undefined"){this._payload={...this._payload,iat:(0,s.default)(new Date)}}else{this._payload={...this._payload,iat:e}}return this}}t.ProduceJWT=ProduceJWT},8882:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SignJWT=void 0;const s=n(8257);const i=n(4419);const r=n(1691);const o=n(1908);class SignJWT extends o.ProduceJWT{setProtectedHeader(e){this._protectedHeader=e;return this}async sign(e,t){var n;const o=new s.CompactSign(r.encoder.encode(JSON.stringify(this._payload)));o.setProtectedHeader(this._protectedHeader);if(Array.isArray((n=this._protectedHeader)===null||n===void 0?void 0:n.crit)&&this._protectedHeader.crit.includes("b64")&&this._protectedHeader.b64===false){throw new i.JWTInvalid("JWTs MUST NOT use unencoded payload")}return o.sign(e,t)}}t.SignJWT=SignJWT},8568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UnsecuredJWT=void 0;const s=n(518);const i=n(1691);const r=n(4419);const o=n(7274);const A=n(1908);class UnsecuredJWT extends A.ProduceJWT{encode(){const e=s.encode(JSON.stringify({alg:"none"}));const t=s.encode(JSON.stringify(this._payload));return`${e}.${t}.`}static decode(e,t){if(typeof e!=="string"){throw new r.JWTInvalid("Unsecured JWT must be a string")}const{0:n,1:A,2:a,length:c}=e.split(".");if(c!==3||a!==""){throw new r.JWTInvalid("Invalid Unsecured JWT")}let u;try{u=JSON.parse(i.decoder.decode(s.decode(n)));if(u.alg!=="none")throw new Error}catch{throw new r.JWTInvalid("Invalid Unsecured JWT")}const l=(0,o.default)(u,s.decode(A),t);return{payload:l,header:u}}}t.UnsecuredJWT=UnsecuredJWT},9887:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwtVerify=void 0;const s=n(5212);const i=n(7274);const r=n(4419);async function jwtVerify(e,t,n){var o;const A=await(0,s.compactVerify)(e,t,n);if(((o=A.protectedHeader.crit)===null||o===void 0?void 0:o.includes("b64"))&&A.protectedHeader.b64===false){throw new r.JWTInvalid("JWTs MUST NOT use unencoded payload")}const a=(0,i.default)(A.protectedHeader,A.payload,n);const c={payload:a,protectedHeader:A.protectedHeader};if(typeof t==="function"){return{...c,key:A.key}}return c}t.jwtVerify=jwtVerify},465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.exportJWK=t.exportPKCS8=t.exportSPKI=void 0;const s=n(858);const i=n(858);const r=n(997);async function exportSPKI(e){return(0,s.toSPKI)(e)}t.exportSPKI=exportSPKI;async function exportPKCS8(e){return(0,i.toPKCS8)(e)}t.exportPKCS8=exportPKCS8;async function exportJWK(e){return(0,r.default)(e)}t.exportJWK=exportJWK},1036:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateKeyPair=void 0;const s=n(9378);async function generateKeyPair(e,t){return(0,s.generateKeyPair)(e,t)}t.generateKeyPair=generateKeyPair},6617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateSecret=void 0;const s=n(9378);async function generateSecret(e,t){return(0,s.generateSecret)(e,t)}t.generateSecret=generateSecret},4230:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.importJWK=t.importPKCS8=t.importX509=t.importSPKI=void 0;const s=n(518);const i=n(858);const r=n(2659);const o=n(4419);const A=n(9127);async function importSPKI(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN PUBLIC KEY-----")!==0){throw new TypeError('"spki" must be SPKI formatted string')}return(0,i.fromSPKI)(e,t,n)}t.importSPKI=importSPKI;async function importX509(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN CERTIFICATE-----")!==0){throw new TypeError('"x509" must be X.509 formatted string')}return(0,i.fromX509)(e,t,n)}t.importX509=importX509;async function importPKCS8(e,t,n){if(typeof e!=="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0){throw new TypeError('"pkcs8" must be PKCS#8 formatted string')}return(0,i.fromPKCS8)(e,t,n)}t.importPKCS8=importPKCS8;async function importJWK(e,t,n){var i;if(!(0,A.default)(e)){throw new TypeError("JWK must be an object")}t||(t=e.alg);switch(e.kty){case"oct":if(typeof e.k!=="string"||!e.k){throw new TypeError('missing "k" (Key Value) Parameter value')}n!==null&&n!==void 0?n:n=e.ext!==true;if(n){return(0,r.default)({...e,alg:t,ext:(i=e.ext)!==null&&i!==void 0?i:false})}return(0,s.decode)(e.k);case"RSA":if(e.oth!==undefined){throw new o.JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported')}case"EC":case"OKP":return(0,r.default)({...e,alg:t});default:throw new o.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value')}}t.importJWK=importJWK},233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unwrap=t.wrap=void 0;const s=n(6476);const i=n(6137);const r=n(4630);const o=n(518);async function wrap(e,t,n,i){const A=e.slice(0,7);i||(i=(0,r.default)(A));const{ciphertext:a,tag:c}=await(0,s.default)(A,n,t,i,new Uint8Array(0));return{encryptedKey:a,iv:(0,o.encode)(i),tag:(0,o.encode)(c)}}t.wrap=wrap;async function unwrap(e,t,n,s,r){const o=e.slice(0,7);return(0,i.default)(o,t,n,s,r,new Uint8Array(0))}t.unwrap=unwrap},1691:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.concatKdf=t.lengthAndInput=t.uint32be=t.uint64be=t.p2s=t.concat=t.decoder=t.encoder=void 0;const s=n(2355);t.encoder=new TextEncoder;t.decoder=new TextDecoder;const i=2**32;function concat(...e){const t=e.reduce(((e,{length:t})=>e+t),0);const n=new Uint8Array(t);let s=0;e.forEach((e=>{n.set(e,s);s+=e.length}));return n}t.concat=concat;function p2s(e,n){return concat(t.encoder.encode(e),new Uint8Array([0]),n)}t.p2s=p2s;function writeUInt32BE(e,t,n){if(t<0||t>=i){throw new RangeError(`value must be >= 0 and <= ${i-1}. Received ${t}`)}e.set([t>>>24,t>>>16,t>>>8,t&255],n)}function uint64be(e){const t=Math.floor(e/i);const n=e%i;const s=new Uint8Array(8);writeUInt32BE(s,t,0);writeUInt32BE(s,n,4);return s}t.uint64be=uint64be;function uint32be(e){const t=new Uint8Array(4);writeUInt32BE(t,e);return t}t.uint32be=uint32be;function lengthAndInput(e){return concat(uint32be(e.length),e)}t.lengthAndInput=lengthAndInput;async function concatKdf(e,t,n){const i=Math.ceil((t>>3)/32);const r=new Uint8Array(i*32);for(let t=0;t>3)}t.concatKdf=concatKdf},3987:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.bitLength=void 0;const s=n(4419);const i=n(5770);function bitLength(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new s.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}t.bitLength=bitLength;t["default"]=e=>(0,i.default)(new Uint8Array(bitLength(e)>>3))},1120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(4630);const checkIvLength=(e,t)=>{if(t.length<<3!==(0,i.bitLength)(e)){throw new s.JWEInvalid("Invalid Initialization Vector length")}};t["default"]=checkIvLength},6241:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(1146);const i=n(7947);const symmetricTypeCheck=(e,t)=>{if(t instanceof Uint8Array)return;if(!(0,i.default)(t)){throw new TypeError((0,s.withAlg)(e,t,...i.types,"Uint8Array"))}if(t.type!=="secret"){throw new TypeError(`${i.types.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}};const asymmetricTypeCheck=(e,t,n)=>{if(!(0,i.default)(t)){throw new TypeError((0,s.withAlg)(e,t,...i.types))}if(t.type==="secret"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`)}if(n==="sign"&&t.type==="public"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`)}if(n==="decrypt"&&t.type==="public"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`)}if(t.algorithm&&n==="verify"&&t.type==="private"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`)}if(t.algorithm&&n==="encrypt"&&t.type==="private"){throw new TypeError(`${i.types.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)}};const checkKeyType=(e,t,n)=>{const s=e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e);if(s){symmetricTypeCheck(e,t)}else{asymmetricTypeCheck(e,t,n)}};t["default"]=checkKeyType},3499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function checkP2s(e){if(!(e instanceof Uint8Array)||e.length<8){throw new s.JWEInvalid("PBES2 Salt Input must be 8 or more octets")}}t["default"]=checkP2s},3386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkEncCryptoKey=t.checkSigCryptoKey=void 0;function unusable(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function isAlgorithm(e,t){return e.name===t}function getHashLength(e){return parseInt(e.name.slice(4),10)}function getNamedCurve(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function checkUsage(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const n=t.pop();e+=`one of ${t.join(", ")}, or ${n}.`}else if(t.length===2){e+=`one of ${t[0]} or ${t[1]}.`}else{e+=`${t[0]}.`}throw new TypeError(e)}}function checkSigCryptoKey(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!isAlgorithm(e.algorithm,"HMAC"))throw unusable("HMAC");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!isAlgorithm(e.algorithm,"RSASSA-PKCS1-v1_5"))throw unusable("RSASSA-PKCS1-v1_5");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!isAlgorithm(e.algorithm,"RSA-PSS"))throw unusable("RSA-PSS");const n=parseInt(t.slice(2),10);const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":{if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448"){throw unusable("Ed25519 or Ed448")}break}case"ES256":case"ES384":case"ES512":{if(!isAlgorithm(e.algorithm,"ECDSA"))throw unusable("ECDSA");const n=getNamedCurve(t);const s=e.algorithm.namedCurve;if(s!==n)throw unusable(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(e,n)}t.checkSigCryptoKey=checkSigCryptoKey;function checkEncCryptoKey(e,t,...n){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!isAlgorithm(e.algorithm,"AES-GCM"))throw unusable("AES-GCM");const n=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==n)throw unusable(n,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!isAlgorithm(e.algorithm,"AES-KW"))throw unusable("AES-KW");const n=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==n)throw unusable(n,"algorithm.length");break}case"ECDH":{switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw unusable("ECDH, X25519, or X448")}break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!isAlgorithm(e.algorithm,"PBKDF2"))throw unusable("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!isAlgorithm(e.algorithm,"RSA-OAEP"))throw unusable("RSA-OAEP");const n=parseInt(t.slice(9),10)||1;const s=getHashLength(e.algorithm.hash);if(s!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(e,n)}t.checkEncCryptoKey=checkEncCryptoKey},6127:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6083);const i=n(3706);const r=n(6898);const o=n(9526);const A=n(518);const a=n(4419);const c=n(3987);const u=n(4230);const l=n(6241);const d=n(9127);const p=n(233);async function decryptKeyManagement(e,t,n,g,h){(0,l.default)(e,t,"decrypt");switch(e){case"dir":{if(n!==undefined)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");return t}case"ECDH-ES":if(n!==undefined)throw new a.JWEInvalid("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!(0,d.default)(g.epk))throw new a.JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`);if(!i.ecdhAllowed(t))throw new a.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime");const r=await(0,u.importJWK)(g.epk,e);let o;let l;if(g.apu!==undefined){if(typeof g.apu!=="string")throw new a.JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`);try{o=(0,A.decode)(g.apu)}catch{throw new a.JWEInvalid("Failed to base64url decode the apu")}}if(g.apv!==undefined){if(typeof g.apv!=="string")throw new a.JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`);try{l=(0,A.decode)(g.apv)}catch{throw new a.JWEInvalid("Failed to base64url decode the apv")}}const p=await i.deriveKey(r,t,e==="ECDH-ES"?g.enc:e,e==="ECDH-ES"?(0,c.bitLength)(g.enc):parseInt(e.slice(-5,-2),10),o,l);if(e==="ECDH-ES")return p;if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,s.unwrap)(e.slice(-6),p,n)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,o.decrypt)(e,t,n)}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");if(typeof g.p2c!=="number")throw new a.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`);const s=(h===null||h===void 0?void 0:h.maxPBES2Count)||1e4;if(g.p2c>s)throw new a.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds`);if(typeof g.p2s!=="string")throw new a.JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`);let i;try{i=(0,A.decode)(g.p2s)}catch{throw new a.JWEInvalid("Failed to base64url decode the p2s")}return(0,r.decrypt)(e,t,n,g.p2c,i)}case"A128KW":case"A192KW":case"A256KW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");return(0,s.unwrap)(e,t,n)}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(n===undefined)throw new a.JWEInvalid("JWE Encrypted Key missing");if(typeof g.iv!=="string")throw new a.JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`);if(typeof g.tag!=="string")throw new a.JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`);let s;try{s=(0,A.decode)(g.iv)}catch{throw new a.JWEInvalid("Failed to base64url decode the iv")}let i;try{i=(0,A.decode)(g.tag)}catch{throw new a.JWEInvalid("Failed to base64url decode the tag")}return(0,p.unwrap)(e,t,n,s,i)}default:{throw new a.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}}t["default"]=decryptKeyManagement},3286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6083);const i=n(3706);const r=n(6898);const o=n(9526);const A=n(518);const a=n(3987);const c=n(4419);const u=n(465);const l=n(6241);const d=n(233);async function encryptKeyManagement(e,t,n,p,g={}){let h;let f;let E;(0,l.default)(e,n,"encrypt");switch(e){case"dir":{E=n;break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!i.ecdhAllowed(n)){throw new c.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime")}const{apu:r,apv:o}=g;let{epk:l}=g;l||(l=(await i.generateEpk(n)).privateKey);const{x:d,y:m,crv:C,kty:Q}=await(0,u.exportJWK)(l);const I=await i.deriveKey(n,l,e==="ECDH-ES"?t:e,e==="ECDH-ES"?(0,a.bitLength)(t):parseInt(e.slice(-5,-2),10),r,o);f={epk:{x:d,crv:C,kty:Q}};if(Q==="EC")f.epk.y=m;if(r)f.apu=(0,A.encode)(r);if(o)f.apv=(0,A.encode)(o);if(e==="ECDH-ES"){E=I;break}E=p||(0,a.default)(t);const B=e.slice(-6);h=await(0,s.wrap)(B,I,E);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{E=p||(0,a.default)(t);h=await(0,o.encrypt)(e,n,E);break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{E=p||(0,a.default)(t);const{p2c:s,p2s:i}=g;({encryptedKey:h,...f}=await(0,r.encrypt)(e,n,E,s,i));break}case"A128KW":case"A192KW":case"A256KW":{E=p||(0,a.default)(t);h=await(0,s.wrap)(e,n,E);break}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{E=p||(0,a.default)(t);const{iv:s}=g;({encryptedKey:h,...f}=await(0,d.wrap)(e,n,E,s));break}default:{throw new c.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}return{cek:E,encryptedKey:h,parameters:f}}t["default"]=encryptKeyManagement},4476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=e=>Math.floor(e.getTime()/1e3)},1146:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.withAlg=void 0;function message(e,t,...n){if(n.length>2){const t=n.pop();e+=`one of type ${n.join(", ")}, or ${t}.`}else if(n.length===2){e+=`one of type ${n[0]} or ${n[1]}.`}else{e+=`of type ${n[0]}.`}if(t==null){e+=` Received ${t}`}else if(typeof t==="function"&&t.name){e+=` Received function ${t.name}`}else if(typeof t==="object"&&t!=null){if(t.constructor&&t.constructor.name){e+=` Received an instance of ${t.constructor.name}`}}return e}t["default"]=(e,...t)=>message("Key must be ",e,...t);function withAlg(e,t,...n){return message(`Key for the ${e} algorithm must be `,t,...n)}t.withAlg=withAlg},6063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const isDisjoint=(...e)=>{const t=e.filter(Boolean);if(t.length===0||t.length===1){return true}let n;for(const e of t){const t=Object.keys(e);if(!n||n.size===0){n=new Set(t);continue}for(const e of t){if(n.has(e)){return false}n.add(e)}}return true};t["default"]=isDisjoint},9127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function isObjectLike(e){return typeof e==="object"&&e!==null}function isObject(e){if(!isObjectLike(e)||Object.prototype.toString.call(e)!=="[object Object]"){return false}if(Object.getPrototypeOf(e)===null){return true}let t=e;while(Object.getPrototypeOf(t)!==null){t=Object.getPrototypeOf(t)}return Object.getPrototypeOf(e)===t}t["default"]=isObject},4630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.bitLength=void 0;const s=n(4419);const i=n(5770);function bitLength(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new s.JOSENotSupported(`Unsupported JWE Algorithm: ${e}`)}}t.bitLength=bitLength;t["default"]=e=>(0,i.default)(new Uint8Array(bitLength(e)>>3))},7274:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(1691);const r=n(4476);const o=n(7810);const A=n(9127);const normalizeTyp=e=>e.toLowerCase().replace(/^application\//,"");const checkAudiencePresence=(e,t)=>{if(typeof e==="string"){return t.includes(e)}if(Array.isArray(e)){return t.some(Set.prototype.has.bind(new Set(e)))}return false};t["default"]=(e,t,n={})=>{const{typ:a}=n;if(a&&(typeof e.typ!=="string"||normalizeTyp(e.typ)!==normalizeTyp(a))){throw new s.JWTClaimValidationFailed('unexpected "typ" JWT header value',"typ","check_failed")}let c;try{c=JSON.parse(i.decoder.decode(t))}catch{}if(!(0,A.default)(c)){throw new s.JWTInvalid("JWT Claims Set must be a top-level JSON object")}const{requiredClaims:u=[],issuer:l,subject:d,audience:p,maxTokenAge:g}=n;if(g!==undefined)u.push("iat");if(p!==undefined)u.push("aud");if(d!==undefined)u.push("sub");if(l!==undefined)u.push("iss");for(const e of new Set(u.reverse())){if(!(e in c)){throw new s.JWTClaimValidationFailed(`missing required "${e}" claim`,e,"missing")}}if(l&&!(Array.isArray(l)?l:[l]).includes(c.iss)){throw new s.JWTClaimValidationFailed('unexpected "iss" claim value',"iss","check_failed")}if(d&&c.sub!==d){throw new s.JWTClaimValidationFailed('unexpected "sub" claim value',"sub","check_failed")}if(p&&!checkAudiencePresence(c.aud,typeof p==="string"?[p]:p)){throw new s.JWTClaimValidationFailed('unexpected "aud" claim value',"aud","check_failed")}let h;switch(typeof n.clockTolerance){case"string":h=(0,o.default)(n.clockTolerance);break;case"number":h=n.clockTolerance;break;case"undefined":h=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:f}=n;const E=(0,r.default)(f||new Date);if((c.iat!==undefined||g)&&typeof c.iat!=="number"){throw new s.JWTClaimValidationFailed('"iat" claim must be a number',"iat","invalid")}if(c.nbf!==undefined){if(typeof c.nbf!=="number"){throw new s.JWTClaimValidationFailed('"nbf" claim must be a number',"nbf","invalid")}if(c.nbf>E+h){throw new s.JWTClaimValidationFailed('"nbf" claim timestamp check failed',"nbf","check_failed")}}if(c.exp!==undefined){if(typeof c.exp!=="number"){throw new s.JWTClaimValidationFailed('"exp" claim must be a number',"exp","invalid")}if(c.exp<=E-h){throw new s.JWTExpired('"exp" claim timestamp check failed',"exp","check_failed")}}if(g){const e=E-c.iat;const t=typeof g==="number"?g:(0,o.default)(g);if(e-h>t){throw new s.JWTExpired('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed")}if(e<0-h){throw new s.JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}}return c}},7810:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=60;const s=n*60;const i=s*24;const r=i*7;const o=i*365.25;const A=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i;t["default"]=e=>{const t=A.exec(e);if(!t){throw new TypeError("Invalid time period format")}const a=parseFloat(t[1]);const c=t[2].toLowerCase();switch(c){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(a);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(a*n);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(a*s);case"day":case"days":case"d":return Math.round(a*i);case"week":case"weeks":case"w":return Math.round(a*r);default:return Math.round(a*o)}}},5148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const validateAlgorithms=(e,t)=>{if(t!==undefined&&(!Array.isArray(t)||t.some((e=>typeof e!=="string")))){throw new TypeError(`"${e}" option must be an array of strings`)}if(!t){return undefined}return new Set(t)};t["default"]=validateAlgorithms},863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function validateCrit(e,t,n,i,r){if(r.crit!==undefined&&i.crit===undefined){throw new e('"crit" (Critical) Header Parameter MUST be integrity protected')}if(!i||i.crit===undefined){return new Set}if(!Array.isArray(i.crit)||i.crit.length===0||i.crit.some((e=>typeof e!=="string"||e.length===0))){throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present')}let o;if(n!==undefined){o=new Map([...Object.entries(n),...t.entries()])}else{o=t}for(const t of i.crit){if(!o.has(t)){throw new s.JOSENotSupported(`Extension Header Parameter "${t}" is not recognized`)}if(r[t]===undefined){throw new e(`Extension Header Parameter "${t}" is missing`)}else if(o.get(t)&&i[t]===undefined){throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}}return new Set(i.crit)}t["default"]=validateCrit},6083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unwrap=t.wrap=void 0;const s=n(4300);const i=n(6113);const r=n(4419);const o=n(1691);const A=n(6852);const a=n(3386);const c=n(2768);const u=n(1146);const l=n(4618);const d=n(7947);function checkKeySize(e,t){if(e.symmetricKeySize<<3!==parseInt(t.slice(1,4),10)){throw new TypeError(`Invalid key size for alg: ${t}`)}}function ensureKeyObject(e,t,n){if((0,c.default)(e)){return e}if(e instanceof Uint8Array){return(0,i.createSecretKey)(e)}if((0,A.isCryptoKey)(e)){(0,a.checkEncCryptoKey)(e,t,n);return i.KeyObject.from(e)}throw new TypeError((0,u.default)(e,...d.types,"Uint8Array"))}const wrap=(e,t,n)=>{const A=parseInt(e.slice(1,4),10);const a=`aes${A}-wrap`;if(!(0,l.default)(a)){throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}const c=ensureKeyObject(t,e,"wrapKey");checkKeySize(c,e);const u=(0,i.createCipheriv)(a,c,s.Buffer.alloc(8,166));return(0,o.concat)(u.update(n),u.final())};t.wrap=wrap;const unwrap=(e,t,n)=>{const A=parseInt(e.slice(1,4),10);const a=`aes${A}-wrap`;if(!(0,l.default)(a)){throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}const c=ensureKeyObject(t,e,"unwrapKey");checkKeySize(c,e);const u=(0,i.createDecipheriv)(a,c,s.Buffer.alloc(8,166));return(0,o.concat)(u.update(n),u.final())};t.unwrap=unwrap},858:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.fromX509=t.fromSPKI=t.fromPKCS8=t.toPKCS8=t.toSPKI=void 0;const s=n(6113);const i=n(4300);const r=n(6852);const o=n(2768);const A=n(1146);const a=n(7947);const genericExport=(e,t,n)=>{let i;if((0,r.isCryptoKey)(n)){if(!n.extractable){throw new TypeError("CryptoKey is not extractable")}i=s.KeyObject.from(n)}else if((0,o.default)(n)){i=n}else{throw new TypeError((0,A.default)(n,...a.types))}if(i.type!==e){throw new TypeError(`key is not a ${e} key`)}return i.export({format:"pem",type:t})};const toSPKI=e=>genericExport("public","spki",e);t.toSPKI=toSPKI;const toPKCS8=e=>genericExport("private","pkcs8",e);t.toPKCS8=toPKCS8;const fromPKCS8=e=>(0,s.createPrivateKey)({key:i.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,""),"base64"),type:"pkcs8",format:"der"});t.fromPKCS8=fromPKCS8;const fromSPKI=e=>(0,s.createPublicKey)({key:i.Buffer.from(e.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,""),"base64"),type:"spki",format:"der"});t.fromSPKI=fromSPKI;const fromX509=e=>(0,s.createPublicKey)({key:e,type:"spki",format:"pem"});t.fromX509=fromX509},3888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=2;const s=48;class Asn1SequenceDecoder{constructor(e){if(e[0]!==s){throw new TypeError}this.buffer=e;this.offset=1;const t=this.decodeLength();if(t!==e.length-this.offset){throw new TypeError}}decodeLength(){let e=this.buffer[this.offset++];if(e&128){const t=e&~128;e=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4300);const i=n(4419);const r=2;const o=3;const A=4;const a=48;const c=s.Buffer.from([0]);const u=s.Buffer.from([r]);const l=s.Buffer.from([o]);const d=s.Buffer.from([a]);const p=s.Buffer.from([A]);const encodeLength=e=>{if(e<128)return s.Buffer.from([e]);const t=s.Buffer.alloc(5);t.writeUInt32BE(e,1);let n=1;while(t[n]===0)n++;t[n-1]=128|5-n;return t.slice(n-1)};const g=new Map([["P-256",s.Buffer.from("06 08 2A 86 48 CE 3D 03 01 07".replace(/ /g,""),"hex")],["secp256k1",s.Buffer.from("06 05 2B 81 04 00 0A".replace(/ /g,""),"hex")],["P-384",s.Buffer.from("06 05 2B 81 04 00 22".replace(/ /g,""),"hex")],["P-521",s.Buffer.from("06 05 2B 81 04 00 23".replace(/ /g,""),"hex")],["ecPublicKey",s.Buffer.from("06 07 2A 86 48 CE 3D 02 01".replace(/ /g,""),"hex")],["X25519",s.Buffer.from("06 03 2B 65 6E".replace(/ /g,""),"hex")],["X448",s.Buffer.from("06 03 2B 65 6F".replace(/ /g,""),"hex")],["Ed25519",s.Buffer.from("06 03 2B 65 70".replace(/ /g,""),"hex")],["Ed448",s.Buffer.from("06 03 2B 65 71".replace(/ /g,""),"hex")]]);class DumbAsn1Encoder{constructor(){this.length=0;this.elements=[]}oidFor(e){const t=g.get(e);if(!t){throw new i.JOSENotSupported("Invalid or unsupported OID")}this.elements.push(t);this.length+=t.length}zero(){this.elements.push(u,s.Buffer.from([1]),c);this.length+=3}one(){this.elements.push(u,s.Buffer.from([1]),s.Buffer.from([1]));this.length+=3}unsignedInteger(e){if(e[0]&128){const t=encodeLength(e.length+1);this.elements.push(u,t,c,e);this.length+=2+t.length+e.length}else{let t=0;while(e[t]===0&&(e[t+1]&128)===0)t++;const n=encodeLength(e.length-t);this.elements.push(u,encodeLength(e.length-t),e.slice(t));this.length+=1+n.length+e.length-t}}octStr(e){const t=encodeLength(e.length);this.elements.push(p,encodeLength(e.length),e);this.length+=1+t.length+e.length}bitStr(e){const t=encodeLength(e.length+1);this.elements.push(l,encodeLength(e.length+1),c,e);this.length+=1+t.length+e.length+1}add(e){this.elements.push(e);this.length+=e.length}end(e=d){const t=encodeLength(this.length);return s.Buffer.concat([e,t,...this.elements],1+t.length+this.length)}}t["default"]=DumbAsn1Encoder},518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=t.encodeBase64=t.decodeBase64=void 0;const s=n(4300);const i=n(1691);let r;function normalize(e){let t=e;if(t instanceof Uint8Array){t=i.decoder.decode(t)}return t}if(s.Buffer.isEncoding("base64url")){t.encode=r=e=>s.Buffer.from(e).toString("base64url")}else{t.encode=r=e=>s.Buffer.from(e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}const decodeBase64=e=>s.Buffer.from(e,"base64");t.decodeBase64=decodeBase64;const encodeBase64=e=>s.Buffer.from(e).toString("base64");t.encodeBase64=encodeBase64;const decode=e=>s.Buffer.from(normalize(e),"base64");t.decode=decode},4519:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1691);function cbcTag(e,t,n,r,o,A){const a=(0,i.concat)(e,t,n,(0,i.uint64be)(e.length<<3));const c=(0,s.createHmac)(`sha${r}`,o);c.update(a);return c.digest().slice(0,A>>3)}t["default"]=cbcTag},4047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);const i=n(2768);const checkCekLength=(e,t)=>{let n;switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":n=parseInt(e.slice(-3),10);break;case"A128GCM":case"A192GCM":case"A256GCM":n=parseInt(e.slice(1,4),10);break;default:throw new s.JOSENotSupported(`Content Encryption Algorithm ${e} is not supported either by JOSE or your javascript runtime`)}if(t instanceof Uint8Array){const e=t.byteLength<<3;if(e!==n){throw new s.JWEInvalid(`Invalid Content Encryption Key length. Expected ${n} bits, got ${e} bits`)}return}if((0,i.default)(t)&&t.type==="secret"){const e=t.symmetricKeySize<<3;if(e!==n){throw new s.JWEInvalid(`Invalid Content Encryption Key length. Expected ${n} bits, got ${e} bits`)}return}throw new TypeError("Invalid Content Encryption Key type")};t["default"]=checkCekLength},122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setModulusLength=t.weakMap=void 0;t.weakMap=new WeakMap;const getLength=(e,t)=>{let n=e.readUInt8(1);if((n&128)===0){if(t===0){return n}return getLength(e.subarray(2+n),t-1)}const s=n&127;n=0;for(let t=0;t{const n=e.readUInt8(1);if((n&128)===0){return getLength(e.subarray(2),t)}const s=n&127;return getLength(e.subarray(2+s),t)};const getModulusLength=e=>{var n,s;if(t.weakMap.has(e)){return t.weakMap.get(e)}const i=(s=(n=e.asymmetricKeyDetails)===null||n===void 0?void 0:n.modulusLength)!==null&&s!==void 0?s:getLengthOfSeqIndex(e.export({format:"der",type:"pkcs1"}),e.type==="private"?1:0)-1<<3;t.weakMap.set(e,i);return i};const setModulusLength=(e,n)=>{t.weakMap.set(e,n)};t.setModulusLength=setModulusLength;t["default"]=(e,t)=>{if(getModulusLength(e)<2048){throw new TypeError(`${t} requires key modulusLength to be 2048 bits or larger`)}}},4618:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);let i;t["default"]=e=>{i||(i=new Set((0,s.getCiphers)()));return i.has(e)}},6137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1120);const r=n(4047);const o=n(1691);const A=n(4419);const a=n(5390);const c=n(4519);const u=n(6852);const l=n(3386);const d=n(2768);const p=n(1146);const g=n(4618);const h=n(7947);function cbcDecrypt(e,t,n,i,r,u){const l=parseInt(e.slice(1,4),10);if((0,d.default)(t)){t=t.export()}const p=t.subarray(l>>3);const h=t.subarray(0,l>>3);const f=parseInt(e.slice(-3),10);const E=`aes-${l}-cbc`;if(!(0,g.default)(E)){throw new A.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const m=(0,c.default)(u,i,n,f,h,l);let C;try{C=(0,a.default)(r,m)}catch{}if(!C){throw new A.JWEDecryptionFailed}let Q;try{const e=(0,s.createDecipheriv)(E,p,i);Q=(0,o.concat)(e.update(n),e.final())}catch{}if(!Q){throw new A.JWEDecryptionFailed}return Q}function gcmDecrypt(e,t,n,i,r,o){const a=parseInt(e.slice(1,4),10);const c=`aes-${a}-gcm`;if(!(0,g.default)(c)){throw new A.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}try{const e=(0,s.createDecipheriv)(c,t,i,{authTagLength:16});e.setAuthTag(r);if(o.byteLength){e.setAAD(o,{plaintextLength:n.length})}const A=e.update(n);e.final();return A}catch{throw new A.JWEDecryptionFailed}}const decrypt=(e,t,n,o,a,c)=>{let g;if((0,u.isCryptoKey)(t)){(0,l.checkEncCryptoKey)(t,e,"decrypt");g=s.KeyObject.from(t)}else if(t instanceof Uint8Array||(0,d.default)(t)){g=t}else{throw new TypeError((0,p.default)(t,...h.types,"Uint8Array"))}(0,r.default)(e,g);(0,i.default)(e,o);switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return cbcDecrypt(e,g,n,o,a,c);case"A128GCM":case"A192GCM":case"A256GCM":return gcmDecrypt(e,g,n,o,a,c);default:throw new A.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}};t["default"]=decrypt},2355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const digest=(e,t)=>(0,s.createHash)(e).update(t).digest();t["default"]=digest},4965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function dsaDigest(e){switch(e){case"PS256":case"RS256":case"ES256":case"ES256K":return"sha256";case"PS384":case"RS384":case"ES384":return"sha384";case"PS512":case"RS512":case"ES512":return"sha512";case"EdDSA":return undefined;default:throw new s.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=dsaDigest},3706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ecdhAllowed=t.generateEpk=t.deriveKey=void 0;const s=n(6113);const i=n(3837);const r=n(9302);const o=n(1691);const A=n(4419);const a=n(6852);const c=n(3386);const u=n(2768);const l=n(1146);const d=n(7947);const p=(0,i.promisify)(s.generateKeyPair);async function deriveKey(e,t,n,i,r=new Uint8Array(0),A=new Uint8Array(0)){let p;if((0,a.isCryptoKey)(e)){(0,c.checkEncCryptoKey)(e,"ECDH");p=s.KeyObject.from(e)}else if((0,u.default)(e)){p=e}else{throw new TypeError((0,l.default)(e,...d.types))}let g;if((0,a.isCryptoKey)(t)){(0,c.checkEncCryptoKey)(t,"ECDH","deriveBits");g=s.KeyObject.from(t)}else if((0,u.default)(t)){g=t}else{throw new TypeError((0,l.default)(t,...d.types))}const h=(0,o.concat)((0,o.lengthAndInput)(o.encoder.encode(n)),(0,o.lengthAndInput)(r),(0,o.lengthAndInput)(A),(0,o.uint32be)(i));const f=(0,s.diffieHellman)({privateKey:g,publicKey:p});return(0,o.concatKdf)(f,i,h)}t.deriveKey=deriveKey;async function generateEpk(e){let t;if((0,a.isCryptoKey)(e)){t=s.KeyObject.from(e)}else if((0,u.default)(e)){t=e}else{throw new TypeError((0,l.default)(e,...d.types))}switch(t.asymmetricKeyType){case"x25519":return p("x25519");case"x448":{return p("x448")}case"ec":{const e=(0,r.default)(t);return p("ec",{namedCurve:e})}default:throw new A.JOSENotSupported("Invalid or unsupported EPK")}}t.generateEpk=generateEpk;const ecdhAllowed=e=>["P-256","P-384","P-521","X25519","X448"].includes((0,r.default)(e));t.ecdhAllowed=ecdhAllowed},6476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(1120);const r=n(4047);const o=n(1691);const A=n(4519);const a=n(6852);const c=n(3386);const u=n(2768);const l=n(1146);const d=n(4419);const p=n(4618);const g=n(7947);function cbcEncrypt(e,t,n,i,r){const a=parseInt(e.slice(1,4),10);if((0,u.default)(n)){n=n.export()}const c=n.subarray(a>>3);const l=n.subarray(0,a>>3);const g=`aes-${a}-cbc`;if(!(0,p.default)(g)){throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const h=(0,s.createCipheriv)(g,c,i);const f=(0,o.concat)(h.update(t),h.final());const E=parseInt(e.slice(-3),10);const m=(0,A.default)(r,i,f,E,l,a);return{ciphertext:f,tag:m}}function gcmEncrypt(e,t,n,i,r){const o=parseInt(e.slice(1,4),10);const A=`aes-${o}-gcm`;if(!(0,p.default)(A)){throw new d.JOSENotSupported(`alg ${e} is not supported by your javascript runtime`)}const a=(0,s.createCipheriv)(A,n,i,{authTagLength:16});if(r.byteLength){a.setAAD(r,{plaintextLength:t.length})}const c=a.update(t);a.final();const u=a.getAuthTag();return{ciphertext:c,tag:u}}const encrypt=(e,t,n,o,A)=>{let p;if((0,a.isCryptoKey)(n)){(0,c.checkEncCryptoKey)(n,e,"encrypt");p=s.KeyObject.from(n)}else if(n instanceof Uint8Array||(0,u.default)(n)){p=n}else{throw new TypeError((0,l.default)(n,...g.types,"Uint8Array"))}(0,r.default)(e,p);(0,i.default)(e,o);switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return cbcEncrypt(e,t,p,o,A);case"A128GCM":case"A192GCM":case"A256GCM":return gcmEncrypt(e,t,p,o,A);default:throw new d.JOSENotSupported("Unsupported JWE Content Encryption Algorithm")}};t["default"]=encrypt},3650:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(3685);const i=n(5687);const r=n(2361);const o=n(4419);const A=n(1691);const fetchJwks=async(e,t,n)=>{let a;switch(e.protocol){case"https:":a=i.get;break;case"http:":a=s.get;break;default:throw new TypeError("Unsupported URL protocol.")}const{agent:c,headers:u}=n;const l=a(e.href,{agent:c,timeout:t,headers:u});const[d]=await Promise.race([(0,r.once)(l,"response"),(0,r.once)(l,"timeout")]);if(!d){l.destroy();throw new o.JWKSTimeout}if(d.statusCode!==200){throw new o.JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response")}const p=[];for await(const e of d){p.push(e)}try{return JSON.parse(A.decoder.decode((0,A.concat)(...p)))}catch{throw new o.JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON")}};t["default"]=fetchJwks},9737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.jwkImport=t.jwkExport=t.rsaPssParams=t.oneShotCallback=void 0;const[n,s]=process.versions.node.split(".").map((e=>parseInt(e,10)));t.oneShotCallback=n>=16||n===15&&s>=13;t.rsaPssParams=!("electron"in process.versions)&&(n>=17||n===16&&s>=9);t.jwkExport=n>=16||n===15&&s>=9;t.jwkImport=n>=16||n===15&&s>=12},9378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateKeyPair=t.generateSecret=void 0;const s=n(6113);const i=n(3837);const r=n(5770);const o=n(122);const A=n(4419);const a=(0,i.promisify)(s.generateKeyPair);async function generateSecret(e,t){let n;switch(e){case"HS256":case"HS384":case"HS512":case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":n=parseInt(e.slice(-3),10);break;case"A128KW":case"A192KW":case"A256KW":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":n=parseInt(e.slice(1,4),10);break;default:throw new A.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return(0,s.createSecretKey)((0,r.default)(new Uint8Array(n>>3)))}t.generateSecret=generateSecret;async function generateKeyPair(e,t){var n,s;switch(e){case"RS256":case"RS384":case"RS512":case"PS256":case"PS384":case"PS512":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":case"RSA1_5":{const e=(n=t===null||t===void 0?void 0:t.modulusLength)!==null&&n!==void 0?n:2048;if(typeof e!=="number"||e<2048){throw new A.JOSENotSupported("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used")}const s=await a("rsa",{modulusLength:e,publicExponent:65537});(0,o.setModulusLength)(s.privateKey,e);(0,o.setModulusLength)(s.publicKey,e);return s}case"ES256":return a("ec",{namedCurve:"P-256"});case"ES256K":return a("ec",{namedCurve:"secp256k1"});case"ES384":return a("ec",{namedCurve:"P-384"});case"ES512":return a("ec",{namedCurve:"P-521"});case"EdDSA":{switch(t===null||t===void 0?void 0:t.crv){case undefined:case"Ed25519":return a("ed25519");case"Ed448":return a("ed448");default:throw new A.JOSENotSupported("Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448")}}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":const e=(s=t===null||t===void 0?void 0:t.crv)!==null&&s!==void 0?s:"P-256";switch(e){case undefined:case"P-256":case"P-384":case"P-521":return a("ec",{namedCurve:e});case"X25519":return a("x25519");case"X448":return a("x448");default:throw new A.JOSENotSupported("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}default:throw new A.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}}t.generateKeyPair=generateKeyPair},9302:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setCurve=t.weakMap=void 0;const s=n(4300);const i=n(6113);const r=n(4419);const o=n(6852);const A=n(2768);const a=n(1146);const c=n(7947);const u=s.Buffer.from([42,134,72,206,61,3,1,7]);const l=s.Buffer.from([43,129,4,0,34]);const d=s.Buffer.from([43,129,4,0,35]);const p=s.Buffer.from([43,129,4,0,10]);t.weakMap=new WeakMap;const namedCurveToJOSE=e=>{switch(e){case"prime256v1":return"P-256";case"secp384r1":return"P-384";case"secp521r1":return"P-521";case"secp256k1":return"secp256k1";default:throw new r.JOSENotSupported("Unsupported key curve for this operation")}};const getNamedCurve=(e,n)=>{var s;let g;if((0,o.isCryptoKey)(e)){g=i.KeyObject.from(e)}else if((0,A.default)(e)){g=e}else{throw new TypeError((0,a.default)(e,...c.types))}if(g.type==="secret"){throw new TypeError('only "private" or "public" type keys can be used for this operation')}switch(g.asymmetricKeyType){case"ed25519":case"ed448":return`Ed${g.asymmetricKeyType.slice(2)}`;case"x25519":case"x448":return`X${g.asymmetricKeyType.slice(1)}`;case"ec":{if(t.weakMap.has(g)){return t.weakMap.get(g)}let e=(s=g.asymmetricKeyDetails)===null||s===void 0?void 0:s.namedCurve;if(!e&&g.type==="private"){e=getNamedCurve((0,i.createPublicKey)(g),true)}else if(!e){const t=g.export({format:"der",type:"spki"});const n=t[1]<128?14:15;const s=t[n];const i=t.slice(n+1,n+1+s);if(i.equals(u)){e="prime256v1"}else if(i.equals(l)){e="secp384r1"}else if(i.equals(d)){e="secp521r1"}else if(i.equals(p)){e="secp256k1"}else{throw new r.JOSENotSupported("Unsupported key curve for this operation")}}if(n)return e;const o=namedCurveToJOSE(e);t.weakMap.set(g,o);return o}default:throw new TypeError("Invalid asymmetric key type for this operation")}};function setCurve(e,n){t.weakMap.set(e,n)}t.setCurve=setCurve;t["default"]=getNamedCurve},3170:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(6852);const r=n(3386);const o=n(1146);const A=n(7947);function getSignVerifyKey(e,t,n){if(t instanceof Uint8Array){if(!e.startsWith("HS")){throw new TypeError((0,o.default)(t,...A.types))}return(0,s.createSecretKey)(t)}if(t instanceof s.KeyObject){return t}if((0,i.isCryptoKey)(t)){(0,r.checkSigCryptoKey)(t,e,n);return s.KeyObject.from(t)}throw new TypeError((0,o.default)(t,...A.types,"Uint8Array"))}t["default"]=getSignVerifyKey},3811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4419);function hmacDigest(e){switch(e){case"HS256":return"sha256";case"HS384":return"sha384";case"HS512":return"sha512";default:throw new s.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=hmacDigest},7947:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.types=void 0;const s=n(6852);const i=n(2768);t["default"]=e=>(0,i.default)(e)||(0,s.isCryptoKey)(e);const r=["KeyObject"];t.types=r;if(globalThis.CryptoKey||(s.default===null||s.default===void 0?void 0:s.default.CryptoKey)){r.push("CryptoKey")}},2768:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);t["default"]=i.types.isKeyObject?e=>i.types.isKeyObject(e):e=>e!=null&&e instanceof s.KeyObject},2659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(4300);const i=n(6113);const r=n(518);const o=n(4419);const A=n(9302);const a=n(122);const c=n(3341);const u=n(9737);const parse=e=>{if(u.jwkImport&&e.kty!=="oct"){return e.d?(0,i.createPrivateKey)({format:"jwk",key:e}):(0,i.createPublicKey)({format:"jwk",key:e})}switch(e.kty){case"oct":{return(0,i.createSecretKey)((0,r.decode)(e.k))}case"RSA":{const t=new c.default;const n=e.d!==undefined;const r=s.Buffer.from(e.n,"base64");const o=s.Buffer.from(e.e,"base64");if(n){t.zero();t.unsignedInteger(r);t.unsignedInteger(o);t.unsignedInteger(s.Buffer.from(e.d,"base64"));t.unsignedInteger(s.Buffer.from(e.p,"base64"));t.unsignedInteger(s.Buffer.from(e.q,"base64"));t.unsignedInteger(s.Buffer.from(e.dp,"base64"));t.unsignedInteger(s.Buffer.from(e.dq,"base64"));t.unsignedInteger(s.Buffer.from(e.qi,"base64"))}else{t.unsignedInteger(r);t.unsignedInteger(o)}const A=t.end();const u={key:A,format:"der",type:"pkcs1"};const l=n?(0,i.createPrivateKey)(u):(0,i.createPublicKey)(u);(0,a.setModulusLength)(l,r.length<<3);return l}case"EC":{const t=new c.default;const n=e.d!==undefined;const r=s.Buffer.concat([s.Buffer.alloc(1,4),s.Buffer.from(e.x,"base64"),s.Buffer.from(e.y,"base64")]);if(n){t.zero();const n=new c.default;n.oidFor("ecPublicKey");n.oidFor(e.crv);t.add(n.end());const o=new c.default;o.one();o.octStr(s.Buffer.from(e.d,"base64"));const a=new c.default;a.bitStr(r);const u=a.end(s.Buffer.from([161]));o.add(u);const l=o.end();const d=new c.default;d.add(l);const p=d.end(s.Buffer.from([4]));t.add(p);const g=t.end();const h=(0,i.createPrivateKey)({key:g,format:"der",type:"pkcs8"});(0,A.setCurve)(h,e.crv);return h}const o=new c.default;o.oidFor("ecPublicKey");o.oidFor(e.crv);t.add(o.end());t.bitStr(r);const a=t.end();const u=(0,i.createPublicKey)({key:a,format:"der",type:"spki"});(0,A.setCurve)(u,e.crv);return u}case"OKP":{const t=new c.default;const n=e.d!==undefined;if(n){t.zero();const n=new c.default;n.oidFor(e.crv);t.add(n.end());const r=new c.default;r.octStr(s.Buffer.from(e.d,"base64"));const o=r.end(s.Buffer.from([4]));t.add(o);const A=t.end();return(0,i.createPrivateKey)({key:A,format:"der",type:"pkcs8"})}const r=new c.default;r.oidFor(e.crv);t.add(r.end());t.bitStr(s.Buffer.from(e.x,"base64"));const o=t.end();return(0,i.createPublicKey)({key:o,format:"der",type:"spki"})}default:throw new o.JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}};t["default"]=parse},997:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(518);const r=n(3888);const o=n(4419);const A=n(9302);const a=n(6852);const c=n(2768);const u=n(1146);const l=n(7947);const d=n(9737);const keyToJWK=e=>{let t;if((0,a.isCryptoKey)(e)){if(!e.extractable){throw new TypeError("CryptoKey is not extractable")}t=s.KeyObject.from(e)}else if((0,c.default)(e)){t=e}else if(e instanceof Uint8Array){return{kty:"oct",k:(0,i.encode)(e)}}else{throw new TypeError((0,u.default)(e,...l.types,"Uint8Array"))}if(d.jwkExport){if(t.type!=="secret"&&!["rsa","ec","ed25519","x25519","ed448","x448"].includes(t.asymmetricKeyType)){throw new o.JOSENotSupported("Unsupported key asymmetricKeyType")}return t.export({format:"jwk"})}switch(t.type){case"secret":return{kty:"oct",k:(0,i.encode)(t.export())};case"private":case"public":{switch(t.asymmetricKeyType){case"rsa":{const e=t.export({format:"der",type:"pkcs1"});const n=new r.default(e);if(t.type==="private"){n.unsignedInteger()}const s=(0,i.encode)(n.unsignedInteger());const o=(0,i.encode)(n.unsignedInteger());let A;if(t.type==="private"){A={d:(0,i.encode)(n.unsignedInteger()),p:(0,i.encode)(n.unsignedInteger()),q:(0,i.encode)(n.unsignedInteger()),dp:(0,i.encode)(n.unsignedInteger()),dq:(0,i.encode)(n.unsignedInteger()),qi:(0,i.encode)(n.unsignedInteger())}}n.end();return{kty:"RSA",n:s,e:o,...A}}case"ec":{const e=(0,A.default)(t);let n;let r;let a;switch(e){case"secp256k1":n=64;r=31+2;a=-1;break;case"P-256":n=64;r=34+2;a=-1;break;case"P-384":n=96;r=33+2;a=-3;break;case"P-521":n=132;r=33+2;a=-3;break;default:throw new o.JOSENotSupported("Unsupported curve")}if(t.type==="public"){const s=t.export({type:"spki",format:"der"});return{kty:"EC",crv:e,x:(0,i.encode)(s.subarray(-n,-n/2)),y:(0,i.encode)(s.subarray(-n/2))}}const c=t.export({type:"pkcs8",format:"der"});if(c.length<100){r+=a}return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(c.subarray(r,r+n/2))}}case"ed25519":case"x25519":{const e=(0,A.default)(t);if(t.type==="public"){const n=t.export({type:"spki",format:"der"});return{kty:"OKP",crv:e,x:(0,i.encode)(n.subarray(-32))}}const n=t.export({type:"pkcs8",format:"der"});return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(n.subarray(-32))}}case"ed448":case"x448":{const e=(0,A.default)(t);if(t.type==="public"){const n=t.export({type:"spki",format:"der"});return{kty:"OKP",crv:e,x:(0,i.encode)(n.subarray(e==="Ed448"?-57:-56))}}const n=t.export({type:"pkcs8",format:"der"});return{...keyToJWK((0,s.createPublicKey)(t)),d:(0,i.encode)(n.subarray(e==="Ed448"?-57:-56))}}default:throw new o.JOSENotSupported("Unsupported key asymmetricKeyType")}}default:throw new o.JOSENotSupported("Unsupported key type")}};t["default"]=keyToJWK},2413:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(9302);const r=n(4419);const o=n(122);const A=n(9737);const a={padding:s.constants.RSA_PKCS1_PSS_PADDING,saltLength:s.constants.RSA_PSS_SALTLEN_DIGEST};const c=new Map([["ES256","P-256"],["ES256K","secp256k1"],["ES384","P-384"],["ES512","P-521"]]);function keyForCrypto(e,t){switch(e){case"EdDSA":if(!["ed25519","ed448"].includes(t.asymmetricKeyType)){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448")}return t;case"RS256":case"RS384":case"RS512":if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,o.default)(t,e);return t;case A.rsaPssParams&&"PS256":case A.rsaPssParams&&"PS384":case A.rsaPssParams&&"PS512":if(t.asymmetricKeyType==="rsa-pss"){const{hashAlgorithm:n,mgf1HashAlgorithm:s,saltLength:i}=t.asymmetricKeyDetails;const r=parseInt(e.slice(-3),10);if(n!==undefined&&(n!==`sha${r}`||s!==n)){throw new TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}`)}if(i!==undefined&&i>r>>3){throw new TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}`)}}else if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss")}(0,o.default)(t,e);return{key:t,...a};case!A.rsaPssParams&&"PS256":case!A.rsaPssParams&&"PS384":case!A.rsaPssParams&&"PS512":if(t.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,o.default)(t,e);return{key:t,...a};case"ES256":case"ES256K":case"ES384":case"ES512":{if(t.asymmetricKeyType!=="ec"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be ec")}const n=(0,i.default)(t);const s=c.get(e);if(n!==s){throw new TypeError(`Invalid key curve for the algorithm, its curve must be ${s}, got ${n}`)}return{dsaEncoding:"ieee-p1363",key:t}}default:throw new r.JOSENotSupported(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}t["default"]=keyForCrypto},6898:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.encrypt=void 0;const s=n(3837);const i=n(6113);const r=n(5770);const o=n(1691);const A=n(518);const a=n(6083);const c=n(3499);const u=n(6852);const l=n(3386);const d=n(2768);const p=n(1146);const g=n(7947);const h=(0,s.promisify)(i.pbkdf2);function getPassword(e,t){if((0,d.default)(e)){return e.export()}if(e instanceof Uint8Array){return e}if((0,u.isCryptoKey)(e)){(0,l.checkEncCryptoKey)(e,t,"deriveBits","deriveKey");return i.KeyObject.from(e).export()}throw new TypeError((0,p.default)(e,...g.types,"Uint8Array"))}const encrypt=async(e,t,n,s=2048,i=(0,r.default)(new Uint8Array(16)))=>{(0,c.default)(i);const u=(0,o.p2s)(e,i);const l=parseInt(e.slice(13,16),10)>>3;const d=getPassword(t,e);const p=await h(d,u,s,l,`sha${e.slice(8,11)}`);const g=await(0,a.wrap)(e.slice(-6),p,n);return{encryptedKey:g,p2c:s,p2s:(0,A.encode)(i)}};t.encrypt=encrypt;const decrypt=async(e,t,n,s,i)=>{(0,c.default)(i);const r=(0,o.p2s)(e,i);const A=parseInt(e.slice(13,16),10)>>3;const u=getPassword(t,e);const l=await h(u,r,s,A,`sha${e.slice(8,11)}`);return(0,a.unwrap)(e.slice(-6),l,n)};t.decrypt=decrypt},5770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=n(6113);Object.defineProperty(t,"default",{enumerable:true,get:function(){return s.randomFillSync}})},9526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.encrypt=void 0;const s=n(6113);const i=n(122);const r=n(6852);const o=n(3386);const A=n(2768);const a=n(1146);const c=n(7947);const checkKey=(e,t)=>{if(e.asymmetricKeyType!=="rsa"){throw new TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa")}(0,i.default)(e,t)};const resolvePadding=e=>{switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return s.constants.RSA_PKCS1_OAEP_PADDING;case"RSA1_5":return s.constants.RSA_PKCS1_PADDING;default:return undefined}};const resolveOaepHash=e=>{switch(e){case"RSA-OAEP":return"sha1";case"RSA-OAEP-256":return"sha256";case"RSA-OAEP-384":return"sha384";case"RSA-OAEP-512":return"sha512";default:return undefined}};function ensureKeyObject(e,t,...n){if((0,A.default)(e)){return e}if((0,r.isCryptoKey)(e)){(0,o.checkEncCryptoKey)(e,t,...n);return s.KeyObject.from(e)}throw new TypeError((0,a.default)(e,...c.types))}const encrypt=(e,t,n)=>{const i=resolvePadding(e);const r=resolveOaepHash(e);const o=ensureKeyObject(t,e,"wrapKey","encrypt");checkKey(o,e);return(0,s.publicEncrypt)({key:o,oaepHash:r,padding:i},n)};t.encrypt=encrypt;const decrypt=(e,t,n)=>{const i=resolvePadding(e);const r=resolveOaepHash(e);const o=ensureKeyObject(t,e,"unwrapKey","decrypt");checkKey(o,e);return(0,s.privateDecrypt)({key:o,oaepHash:r,padding:i},n)};t.decrypt=decrypt},1622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]="node:crypto"},9935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);const r=n(4965);const o=n(3811);const A=n(2413);const a=n(3170);let c;if(s.sign.length>3){c=(0,i.promisify)(s.sign)}else{c=s.sign}const sign=async(e,t,n)=>{const i=(0,a.default)(e,t,"sign");if(e.startsWith("HS")){const t=s.createHmac((0,o.default)(e),i);t.update(n);return t.digest()}return c((0,r.default)(e),n,(0,A.default)(e,i))};t["default"]=sign},5390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=s.timingSafeEqual;t["default"]=i},3569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(6113);const i=n(3837);const r=n(4965);const o=n(2413);const A=n(9935);const a=n(3170);const c=n(9737);let u;if(s.verify.length>4&&c.oneShotCallback){u=(0,i.promisify)(s.verify)}else{u=s.verify}const verify=async(e,t,n,i)=>{const c=(0,a.default)(e,t,"verify");if(e.startsWith("HS")){const t=await(0,A.default)(e,c,i);const r=n;try{return s.timingSafeEqual(r,t)}catch{return false}}const l=(0,r.default)(e);const d=(0,o.default)(e,c);try{return await u(l,i,d,n)}catch{return false}};t["default"]=verify},6852:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isCryptoKey=void 0;const s=n(6113);const i=n(3837);const r=s.webcrypto;t["default"]=r;t.isCryptoKey=i.types.isCryptoKey?e=>i.types.isCryptoKey(e):e=>false},7022:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.deflate=t.inflate=void 0;const s=n(3837);const i=n(9796);const r=(0,s.promisify)(i.inflateRaw);const o=(0,s.promisify)(i.deflateRaw);const inflate=e=>r(e);t.inflate=inflate;const deflate=e=>o(e);t.deflate=deflate},3238:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=void 0;const s=n(518);t.encode=s.encode;t.decode=s.decode},5611:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decodeJwt=void 0;const s=n(3238);const i=n(1691);const r=n(9127);const o=n(4419);function decodeJwt(e){if(typeof e!=="string")throw new o.JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:n}=e.split(".");if(n===5)throw new o.JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");if(n!==3)throw new o.JWTInvalid("Invalid JWT");if(!t)throw new o.JWTInvalid("JWTs must contain a payload");let A;try{A=(0,s.decode)(t)}catch{throw new o.JWTInvalid("Failed to base64url decode the payload")}let a;try{a=JSON.parse(i.decoder.decode(A))}catch{throw new o.JWTInvalid("Failed to parse the decoded payload as JSON")}if(!(0,r.default)(a))throw new o.JWTInvalid("Invalid JWT Claims Set");return a}t.decodeJwt=decodeJwt},3991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decodeProtectedHeader=void 0;const s=n(3238);const i=n(1691);const r=n(9127);function decodeProtectedHeader(e){let t;if(typeof e==="string"){const n=e.split(".");if(n.length===3||n.length===5){[t]=n}}else if(typeof e==="object"&&e){if("protected"in e){t=e.protected}else{throw new TypeError("Token does not contain a Protected Header")}}try{if(typeof t!=="string"||!t){throw new Error}const e=JSON.parse(i.decoder.decode((0,s.decode)(t)));if(!(0,r.default)(e)){throw new Error}return e}catch{throw new TypeError("Invalid Token or Protected Header formatting")}}t.decodeProtectedHeader=decodeProtectedHeader},4419:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JWSSignatureVerificationFailed=t.JWKSTimeout=t.JWKSMultipleMatchingKeys=t.JWKSNoMatchingKey=t.JWKSInvalid=t.JWKInvalid=t.JWTInvalid=t.JWSInvalid=t.JWEInvalid=t.JWEDecryptionFailed=t.JOSENotSupported=t.JOSEAlgNotAllowed=t.JWTExpired=t.JWTClaimValidationFailed=t.JOSEError=void 0;class JOSEError extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e);this.code="ERR_JOSE_GENERIC";this.name=this.constructor.name;(t=Error.captureStackTrace)===null||t===void 0?void 0:t.call(Error,this,this.constructor)}}t.JOSEError=JOSEError;class JWTClaimValidationFailed extends JOSEError{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t="unspecified",n="unspecified"){super(e);this.code="ERR_JWT_CLAIM_VALIDATION_FAILED";this.claim=t;this.reason=n}}t.JWTClaimValidationFailed=JWTClaimValidationFailed;class JWTExpired extends JOSEError{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t="unspecified",n="unspecified"){super(e);this.code="ERR_JWT_EXPIRED";this.claim=t;this.reason=n}}t.JWTExpired=JWTExpired;class JOSEAlgNotAllowed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}t.JOSEAlgNotAllowed=JOSEAlgNotAllowed;class JOSENotSupported extends JOSEError{constructor(){super(...arguments);this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}t.JOSENotSupported=JOSENotSupported;class JWEDecryptionFailed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWE_DECRYPTION_FAILED";this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}t.JWEDecryptionFailed=JWEDecryptionFailed;class JWEInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}t.JWEInvalid=JWEInvalid;class JWSInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}t.JWSInvalid=JWSInvalid;class JWTInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}t.JWTInvalid=JWTInvalid;class JWKInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}t.JWKInvalid=JWKInvalid;class JWKSInvalid extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}t.JWKSInvalid=JWKSInvalid;class JWKSNoMatchingKey extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_NO_MATCHING_KEY";this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}t.JWKSNoMatchingKey=JWKSNoMatchingKey;class JWKSMultipleMatchingKeys extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}t.JWKSMultipleMatchingKeys=JWKSMultipleMatchingKeys;Symbol.asyncIterator;class JWKSTimeout extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWKS_TIMEOUT";this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}t.JWKSTimeout=JWKSTimeout;class JWSSignatureVerificationFailed extends JOSEError{constructor(){super(...arguments);this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}t.JWSSignatureVerificationFailed=JWSSignatureVerificationFailed},1173:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=n(1622);t["default"]=s.default},7426:(e,t,n)=>{ /*! * mime-db * Copyright(c) 2014 Jonathan Ong diff --git a/.github/actions/invite-user/src/Action.ts b/.github/actions/invite-user/src/Action.ts index f2f9e703..8ff1604c 100644 --- a/.github/actions/invite-user/src/Action.ts +++ b/.github/actions/invite-user/src/Action.ts @@ -79,9 +79,9 @@ export default class Action { }) if (!existingUser) { await this.userClient.sendChangePasswordEmail({ email: user.email }) - this.logger.log(`${user.id} (${user.email}) has been invited.`) + this.logger.log(`${options.name} (${user.email}) has been invited.`) } else { - this.logger.log(`${user.id} (${user.email}) has been updated.`) + this.logger.log(`${options.name} (${user.email}) has been updated.`) } } } From 4c77fae629d0cbc851ef00a63a47d937c7a32992 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 07:19:30 +0000 Subject: [PATCH 21/53] Bump tailwindcss from 3.3.3 to 3.3.5 Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.3.3 to 3.3.5. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.3.3...v3.3.5) --- updated-dependencies: - dependency-name: tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4329670f..d87ccfbb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13661,9 +13661,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz", - "integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz", + "integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==", "dev": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", @@ -13671,10 +13671,10 @@ "chokidar": "^3.5.3", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.2.12", + "fast-glob": "^3.3.0", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", - "jiti": "^1.18.2", + "jiti": "^1.19.1", "lilconfig": "^2.1.0", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", From 1e2345745113c0c9b11047ac847978505c399bd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 07:19:44 +0000 Subject: [PATCH 22/53] Bump core-js from 3.33.1 to 3.33.2 Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.33.1 to 3.33.2. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/commits/v3.33.2/packages/core-js) --- updated-dependencies: - dependency-name: core-js dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4329670f..33bf79ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@octokit/core": "^5.0.1", "@octokit/webhooks": "^12.0.3", "auth0": "^4.0.2", - "core-js": "^3.33.1", + "core-js": "^3.33.2", "encoding": "^0.1.13", "figma-squircle": "^0.3.1", "install": "^0.13.0", @@ -4423,9 +4423,9 @@ } }, "node_modules/core-js": { - "version": "3.33.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.1.tgz", - "integrity": "sha512-qVSq3s+d4+GsqN0teRCJtM6tdEEXyWxjzbhVrCHmBS5ZTM0FS2MOS0D13dUXAWDUN6a+lHI/N1hF9Ytz6iLl9Q==", + "version": "3.33.2", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.2.tgz", + "integrity": "sha512-XeBzWI6QL3nJQiHmdzbAOiMYqjrb7hwU7A39Qhvd/POSa/t9E1AeZyEZx3fNvp/vtM8zXwhoL0FsiS0hD0pruQ==", "hasInstallScript": true, "funding": { "type": "opencollective", diff --git a/package.json b/package.json index 822cd552..d66f4f6b 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@octokit/core": "^5.0.1", "@octokit/webhooks": "^12.0.3", "auth0": "^4.0.2", - "core-js": "^3.33.1", + "core-js": "^3.33.2", "encoding": "^0.1.13", "figma-squircle": "^0.3.1", "install": "^0.13.0", From db508a56d0816266a78398d06bfd5c0232d29756 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 07:20:10 +0000 Subject: [PATCH 23/53] Bump @typescript-eslint/parser from 6.9.0 to 6.9.1 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.9.0 to 6.9.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 90 ++++++++++++++++++++++++++++++++++++++++++----- package.json | 2 +- 2 files changed, 83 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4329670f..cd107f4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "@types/react-dom": "^18", "@types/swagger-ui-react": "^4.18.2", "@typescript-eslint/eslint-plugin": "^6.9.0", - "@typescript-eslint/parser": "^6.9.0", + "@typescript-eslint/parser": "^6.9.1", "autoprefixer": "^10", "eslint": "^8.52.0", "eslint-config-next": "13.5.6", @@ -3215,15 +3215,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.0.tgz", - "integrity": "sha512-GZmjMh4AJ/5gaH4XF2eXA8tMnHWP+Pm1mjQR2QN4Iz+j/zO04b9TOvJYOX2sCNIQHtRStKTxRY1FX7LhpJT4Gw==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.1.tgz", + "integrity": "sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.9.0", - "@typescript-eslint/types": "6.9.0", - "@typescript-eslint/typescript-estree": "6.9.0", - "@typescript-eslint/visitor-keys": "6.9.0", + "@typescript-eslint/scope-manager": "6.9.1", + "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/typescript-estree": "6.9.1", + "@typescript-eslint/visitor-keys": "6.9.1", "debug": "^4.3.4" }, "engines": { @@ -3242,6 +3242,80 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.1.tgz", + "integrity": "sha512-38IxvKB6NAne3g/+MyXMs2Cda/Sz+CEpmm+KLGEM8hx/CvnSRuw51i8ukfwB/B/sESdeTGet1NH1Wj7I0YXswg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/visitor-keys": "6.9.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.1.tgz", + "integrity": "sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.1.tgz", + "integrity": "sha512-U+mUylTHfcqeO7mLWVQ5W/tMLXqVpRv61wm9ZtfE5egz7gtnmqVIw9ryh0mgIlkKk9rZLY3UHygsBSdB9/ftyw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/visitor-keys": "6.9.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.1.tgz", + "integrity": "sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.9.1", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { "version": "6.9.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.0.tgz", diff --git a/package.json b/package.json index 822cd552..b8361efe 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@types/react-dom": "^18", "@types/swagger-ui-react": "^4.18.2", "@typescript-eslint/eslint-plugin": "^6.9.0", - "@typescript-eslint/parser": "^6.9.0", + "@typescript-eslint/parser": "^6.9.1", "autoprefixer": "^10", "eslint": "^8.52.0", "eslint-config-next": "13.5.6", From 0b08e1ecd48aa0bd548616ce90ad1414efad7dce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 07:20:56 +0000 Subject: [PATCH 24/53] Bump npm from 10.2.1 to 10.2.3 Bumps [npm](https://github.com/npm/cli) from 10.2.1 to 10.2.3. - [Release notes](https://github.com/npm/cli/releases) - [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md) - [Commits](https://github.com/npm/cli/compare/v10.2.1...v10.2.3) --- updated-dependencies: - dependency-name: npm dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 493 ++++------------------------------------------ package.json | 2 +- 2 files changed, 36 insertions(+), 459 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4329670f..572c3a7a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "ioredis": "^5.3.2", "mobx": "^6.10.2", "next": "13.5.6", - "npm": "^10.2.1", + "npm": "^10.2.3", "octokit": "^3.1.1", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -8226,9 +8226,9 @@ } }, "node_modules/npm": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/npm/-/npm-10.2.1.tgz", - "integrity": "sha512-YVh8UDw5lR2bPS6rrS0aPG9ZXKDWeaeO/zMoZMp7g3Thrho9cqEnSrcvg4Pic2QhDAQptAynx5KgrPgCSRscqg==", + "version": "10.2.3", + "resolved": "https://registry.npmjs.org/npm/-/npm-10.2.3.tgz", + "integrity": "sha512-GbUui/rHTl0mW8HhJSn4A0Xg89yCR3I9otgJT1i0z1QBPOVlgbh6rlcUTpHT8Gut9O1SJjWRUU0nEcAymhG2tQ==", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", @@ -8304,13 +8304,13 @@ ], "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^7.2.0", + "@npmcli/arborist": "^7.2.1", "@npmcli/config": "^8.0.1", "@npmcli/fs": "^3.1.0", "@npmcli/map-workspaces": "^3.0.4", "@npmcli/package-json": "^5.0.0", "@npmcli/promise-spawn": "^7.0.0", - "@npmcli/run-script": "^7.0.1", + "@npmcli/run-script": "^7.0.2", "@sigstore/tuf": "^2.1.0", "abbrev": "^2.0.0", "archy": "~1.0.0", @@ -8330,22 +8330,22 @@ "is-cidr": "^4.0.2", "json-parse-even-better-errors": "^3.0.0", "libnpmaccess": "^8.0.1", - "libnpmdiff": "^6.0.2", - "libnpmexec": "^7.0.2", - "libnpmfund": "^5.0.0", + "libnpmdiff": "^6.0.3", + "libnpmexec": "^7.0.3", + "libnpmfund": "^5.0.1", "libnpmhook": "^10.0.0", "libnpmorg": "^6.0.1", - "libnpmpack": "^6.0.2", + "libnpmpack": "^6.0.3", "libnpmpublish": "^9.0.1", "libnpmsearch": "^7.0.0", "libnpmteam": "^6.0.0", - "libnpmversion": "^5.0.0", + "libnpmversion": "^5.0.1", "make-fetch-happen": "^13.0.0", "minimatch": "^9.0.3", "minipass": "^7.0.4", "minipass-pipeline": "^1.2.4", "ms": "^2.1.2", - "node-gyp": "^9.4.0", + "node-gyp": "^10.0.1", "nopt": "^7.2.0", "normalize-package-data": "^6.0.0", "npm-audit-report": "^5.0.0", @@ -8536,7 +8536,7 @@ } }, "node_modules/npm/node_modules/@npmcli/arborist": { - "version": "7.2.0", + "version": "7.2.1", "inBundle": true, "license": "ISC", "dependencies": { @@ -8549,7 +8549,7 @@ "@npmcli/node-gyp": "^3.0.0", "@npmcli/package-json": "^5.0.0", "@npmcli/query": "^3.0.1", - "@npmcli/run-script": "^7.0.1", + "@npmcli/run-script": "^7.0.2", "bin-links": "^4.0.1", "cacache": "^18.0.0", "common-ancestor-path": "^1.0.1", @@ -8738,13 +8738,13 @@ } }, "node_modules/npm/node_modules/@npmcli/run-script": { - "version": "7.0.1", + "version": "7.0.2", "inBundle": true, "license": "ISC", "dependencies": { "@npmcli/node-gyp": "^3.0.0", "@npmcli/promise-spawn": "^7.0.0", - "node-gyp": "^9.0.0", + "node-gyp": "^10.0.0", "read-package-json-fast": "^3.0.0", "which": "^4.0.0" }, @@ -8805,14 +8805,6 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/npm/node_modules/@tootallnate/once": { - "version": "2.0.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, "node_modules/npm/node_modules/@tufjs/canonical-json": { "version": "2.0.0", "inBundle": true, @@ -8852,28 +8844,6 @@ "node": ">=6.5" } }, - "node_modules/npm/node_modules/agent-base": { - "version": "6.0.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/npm/node_modules/agentkeepalive": { - "version": "4.5.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "humanize-ms": "^1.2.1" - }, - "engines": { - "node": ">= 8.0.0" - } - }, "node_modules/npm/node_modules/aggregate-error": { "version": "3.1.0", "inBundle": true, @@ -9172,11 +9142,6 @@ "inBundle": true, "license": "ISC" }, - "node_modules/npm/node_modules/concat-map": { - "version": "0.0.1", - "inBundle": true, - "license": "MIT" - }, "node_modules/npm/node_modules/console-control-strings": { "version": "1.1.0", "inBundle": true, @@ -9352,11 +9317,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm/node_modules/fs.realpath": { - "version": "1.0.0", - "inBundle": true, - "license": "ISC" - }, "node_modules/npm/node_modules/function-bind": { "version": "1.1.1", "inBundle": true, @@ -9438,39 +9398,6 @@ "inBundle": true, "license": "BSD-2-Clause" }, - "node_modules/npm/node_modules/http-proxy-agent": { - "version": "5.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/npm/node_modules/https-proxy-agent": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/npm/node_modules/humanize-ms": { - "version": "1.2.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ms": "^2.0.0" - } - }, "node_modules/npm/node_modules/iconv-lite": { "version": "0.6.3", "inBundle": true, @@ -9529,20 +9456,6 @@ "node": ">=8" } }, - "node_modules/npm/node_modules/inflight": { - "version": "1.0.6", - "inBundle": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/npm/node_modules/inherits": { - "version": "2.0.4", - "inBundle": true, - "license": "ISC" - }, "node_modules/npm/node_modules/ini": { "version": "4.1.1", "inBundle": true, @@ -9685,11 +9598,11 @@ } }, "node_modules/npm/node_modules/libnpmdiff": { - "version": "6.0.2", + "version": "6.0.3", "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.2.0", + "@npmcli/arborist": "^7.2.1", "@npmcli/disparity-colors": "^3.0.0", "@npmcli/installed-package-contents": "^2.0.2", "binary-extensions": "^2.2.0", @@ -9704,12 +9617,12 @@ } }, "node_modules/npm/node_modules/libnpmexec": { - "version": "7.0.2", + "version": "7.0.3", "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.2.0", - "@npmcli/run-script": "^7.0.1", + "@npmcli/arborist": "^7.2.1", + "@npmcli/run-script": "^7.0.2", "ci-info": "^3.7.1", "npm-package-arg": "^11.0.1", "npmlog": "^7.0.1", @@ -9725,11 +9638,11 @@ } }, "node_modules/npm/node_modules/libnpmfund": { - "version": "5.0.0", + "version": "5.0.1", "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.2.0" + "@npmcli/arborist": "^7.2.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" @@ -9760,12 +9673,12 @@ } }, "node_modules/npm/node_modules/libnpmpack": { - "version": "6.0.2", + "version": "6.0.3", "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.2.0", - "@npmcli/run-script": "^7.0.1", + "@npmcli/arborist": "^7.2.1", + "@npmcli/run-script": "^7.0.2", "npm-package-arg": "^11.0.1", "pacote": "^17.0.4" }, @@ -9815,12 +9728,12 @@ } }, "node_modules/npm/node_modules/libnpmversion": { - "version": "5.0.0", + "version": "5.0.1", "inBundle": true, "license": "ISC", "dependencies": { "@npmcli/git": "^5.0.3", - "@npmcli/run-script": "^7.0.1", + "@npmcli/run-script": "^7.0.2", "json-parse-even-better-errors": "^3.0.0", "proc-log": "^3.0.0", "semver": "^7.3.7" @@ -10060,275 +9973,26 @@ } }, "node_modules/npm/node_modules/node-gyp": { - "version": "9.4.0", + "version": "10.0.1", "inBundle": true, "license": "MIT", "dependencies": { "env-paths": "^2.2.0", "exponential-backoff": "^3.1.1", - "glob": "^7.1.4", + "glob": "^10.3.10", "graceful-fs": "^4.2.6", - "make-fetch-happen": "^11.0.3", - "nopt": "^6.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", + "make-fetch-happen": "^13.0.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", "semver": "^7.3.5", "tar": "^6.1.2", - "which": "^2.0.2" + "which": "^4.0.0" }, "bin": { "node-gyp": "bin/node-gyp.js" }, "engines": { - "node": "^12.13 || ^14.13 || >=16" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/abbrev": { - "version": "1.1.1", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/node-gyp/node_modules/are-we-there-yet": { - "version": "3.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/brace-expansion": { - "version": "1.1.11", - "inBundle": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/cacache": { - "version": "17.1.4", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/fs": "^3.1.0", - "fs-minipass": "^3.0.0", - "glob": "^10.2.2", - "lru-cache": "^7.7.1", - "minipass": "^7.0.3", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "p-map": "^4.0.0", - "ssri": "^10.0.0", - "tar": "^6.1.11", - "unique-filename": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion": { - "version": "2.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob": { - "version": "10.3.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch": { - "version": "9.0.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minipass": { - "version": "7.0.4", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/gauge": { - "version": "4.0.4", - "inBundle": true, - "license": "ISC", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/glob": { - "version": "7.2.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/lru-cache": { - "version": "7.18.3", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/make-fetch-happen": { - "version": "11.1.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "agentkeepalive": "^4.2.1", - "cacache": "^17.0.0", - "http-cache-semantics": "^4.1.1", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^5.0.0", - "minipass-fetch": "^3.0.0", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^10.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/minimatch": { - "version": "3.1.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/minipass": { - "version": "5.0.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/nopt": { - "version": "6.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "abbrev": "^1.0.0" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/npmlog": { - "version": "6.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/readable-stream": { - "version": "3.6.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/npm/node_modules/node-gyp/node_modules/signal-exit": { - "version": "3.0.7", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/node-gyp/node_modules/which": { - "version": "2.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" + "node": "^16.14.0 || >=18.0.0" } }, "node_modules/npm/node_modules/nopt": { @@ -10487,14 +10151,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm/node_modules/once": { - "version": "1.4.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/npm/node_modules/p-map": { "version": "4.0.0", "inBundle": true, @@ -10553,14 +10209,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm/node_modules/path-is-absolute": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/npm/node_modules/path-key": { "version": "3.1.1", "inBundle": true, @@ -10731,59 +10379,6 @@ "node": ">= 4" } }, - "node_modules/npm/node_modules/rimraf": { - "version": "3.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.11", - "inBundle": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/npm/node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/npm/node_modules/safe-buffer": { "version": "5.2.1", "funding": [ @@ -10905,19 +10500,6 @@ "npm": ">= 3.0.0" } }, - "node_modules/npm/node_modules/socks-proxy-agent": { - "version": "7.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/npm/node_modules/spdx-correct": { "version": "3.2.0", "inBundle": true, @@ -11283,11 +10865,6 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/npm/node_modules/wrappy": { - "version": "1.0.2", - "inBundle": true, - "license": "ISC" - }, "node_modules/npm/node_modules/write-file-atomic": { "version": "5.0.1", "inBundle": true, diff --git a/package.json b/package.json index 822cd552..b974df93 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "ioredis": "^5.3.2", "mobx": "^6.10.2", "next": "13.5.6", - "npm": "^10.2.1", + "npm": "^10.2.3", "octokit": "^3.1.1", "react": "^18.2.0", "react-dom": "^18.2.0", From e83341f7c2d615281957e47fe0ad9a23a55b4793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 08:57:48 +0100 Subject: [PATCH 25/53] Moves errors to common --- src/app/api/user/projects/route.ts | 2 +- src/app/layout.tsx | 2 +- src/common/{errorHandling => errors}/client/ErrorHandler.tsx | 0 .../auth/domain/AuthError.ts => common/errors/index.ts} | 0 src/common/session/Auth0Session.ts | 2 +- src/features/auth/data/Auth0RefreshTokenReader.ts | 2 +- src/features/auth/data/GitHubOAuthTokenRefresher.ts | 2 +- src/features/auth/domain/OAuthTokenRepository.ts | 2 +- src/features/auth/domain/SessionOAuthTokenRepository.ts | 2 +- 9 files changed, 7 insertions(+), 7 deletions(-) rename src/common/{errorHandling => errors}/client/ErrorHandler.tsx (100%) rename src/{features/auth/domain/AuthError.ts => common/errors/index.ts} (100%) diff --git a/src/app/api/user/projects/route.ts b/src/app/api/user/projects/route.ts index a0ac3816..6e259994 100644 --- a/src/app/api/user/projects/route.ts +++ b/src/app/api/user/projects/route.ts @@ -1,6 +1,6 @@ import { NextResponse } from "next/server" import { projectDataSource } from "@/composition" -import { UnauthorizedError } from "@/features/auth/domain/AuthError" +import { UnauthorizedError } from "@/common/errors" export async function GET() { try { diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 6d89e3d4..1760b426 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -4,7 +4,7 @@ import { UserProvider } from "@auth0/nextjs-auth0/client" import { config as fontAwesomeConfig } from "@fortawesome/fontawesome-svg-core" import { CssBaseline } from "@mui/material" import ThemeRegistry from "@/common/theme/ThemeRegistry" -import ErrorHandler from "@/common/errorHandling/client/ErrorHandler" +import ErrorHandler from "@/common/errors/client/ErrorHandler" import "@fortawesome/fontawesome-svg-core/styles.css" fontAwesomeConfig.autoAddCss = false diff --git a/src/common/errorHandling/client/ErrorHandler.tsx b/src/common/errors/client/ErrorHandler.tsx similarity index 100% rename from src/common/errorHandling/client/ErrorHandler.tsx rename to src/common/errors/client/ErrorHandler.tsx diff --git a/src/features/auth/domain/AuthError.ts b/src/common/errors/index.ts similarity index 100% rename from src/features/auth/domain/AuthError.ts rename to src/common/errors/index.ts diff --git a/src/common/session/Auth0Session.ts b/src/common/session/Auth0Session.ts index 4131b040..0971235b 100644 --- a/src/common/session/Auth0Session.ts +++ b/src/common/session/Auth0Session.ts @@ -1,6 +1,6 @@ import { getSession } from "@auth0/nextjs-auth0" +import { UnauthorizedError } from "@/common/errors" import ISession from "./ISession" -import { UnauthorizedError } from "@/features/auth/domain/AuthError" export default class Auth0Session implements ISession { async getUserId(): Promise { diff --git a/src/features/auth/data/Auth0RefreshTokenReader.ts b/src/features/auth/data/Auth0RefreshTokenReader.ts index 57bf2cde..79fd6bfb 100644 --- a/src/features/auth/data/Auth0RefreshTokenReader.ts +++ b/src/features/auth/data/Auth0RefreshTokenReader.ts @@ -1,6 +1,6 @@ import { ManagementClient } from "auth0" +import { UnauthorizedError } from "@/common/errors" import IRefreshTokenReader from "../domain/IRefreshTokenReader" -import { UnauthorizedError } from "../domain/AuthError" interface Auth0RefreshTokenReaderConfig { domain: string diff --git a/src/features/auth/data/GitHubOAuthTokenRefresher.ts b/src/features/auth/data/GitHubOAuthTokenRefresher.ts index 68dd12c4..d5e88607 100644 --- a/src/features/auth/data/GitHubOAuthTokenRefresher.ts +++ b/src/features/auth/data/GitHubOAuthTokenRefresher.ts @@ -1,6 +1,6 @@ +import { UnauthorizedError } from "@/common/errors" import OAuthToken from "../domain/OAuthToken" import IOAuthTokenRefresher from "../domain/IOAuthTokenRefresher" -import { UnauthorizedError } from "../domain/AuthError" export interface GitHubOAuthTokenRefresherConfig { readonly clientId: string diff --git a/src/features/auth/domain/OAuthTokenRepository.ts b/src/features/auth/domain/OAuthTokenRepository.ts index d8bdfe17..fd416386 100644 --- a/src/features/auth/domain/OAuthTokenRepository.ts +++ b/src/features/auth/domain/OAuthTokenRepository.ts @@ -1,7 +1,7 @@ import ZodJSONCoder from "@/common/utils/ZodJSONCoder" import IUserDataRepository from "@/common/userData/IUserDataRepository" +import { UnauthorizedError } from "@/common/errors" import IOAuthTokenRepository from "./IOAuthTokenRepository" -import { UnauthorizedError } from "./AuthError" import OAuthToken, { OAuthTokenSchema } from "./OAuthToken" export default class OAuthTokenRepository implements IOAuthTokenRepository { diff --git a/src/features/auth/domain/SessionOAuthTokenRepository.ts b/src/features/auth/domain/SessionOAuthTokenRepository.ts index c7942598..b4add594 100644 --- a/src/features/auth/domain/SessionOAuthTokenRepository.ts +++ b/src/features/auth/domain/SessionOAuthTokenRepository.ts @@ -1,7 +1,7 @@ +import { UnauthorizedError } from "@/common/errors" import ZodJSONCoder from "../../../common/utils/ZodJSONCoder" import ISessionDataRepository from "@/common/userData/ISessionDataRepository" import ISessionOAuthTokenRepository from "./SessionOAuthTokenRepository" -import { UnauthorizedError } from "./AuthError" import OAuthToken, { OAuthTokenSchema } from "./OAuthToken" export default class SessionOAuthTokenRepository implements ISessionOAuthTokenRepository { From a477edac4acf0fbcfb4f33f262282f30af046ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 09:49:06 +0100 Subject: [PATCH 26/53] Extends GitHubClient to get org membership status --- .../AccessTokenRefreshingGitHubClient.ts | 12 +++++- src/common/github/GitHubClient.ts | 37 ++++++++++++++++++- src/common/github/IGitHubClient.ts | 13 +++++++ 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/src/common/github/AccessTokenRefreshingGitHubClient.ts b/src/common/github/AccessTokenRefreshingGitHubClient.ts index e9a3a29a..4d5ea36d 100644 --- a/src/common/github/AccessTokenRefreshingGitHubClient.ts +++ b/src/common/github/AccessTokenRefreshingGitHubClient.ts @@ -4,9 +4,11 @@ import IGitHubClient, { GraphQlQueryResponse, GetRepositoryContentRequest, GetPullRequestCommentsRequest, + GetOrganizationMembershipStatusRequest, AddCommentToPullRequestRequest, RepositoryContent, - PullRequestComment + PullRequestComment, + OrganizationMembershipStatus } from "./IGitHubClient" const HttpErrorSchema = z.object({ @@ -60,6 +62,14 @@ export default class AccessTokenRefreshingGitHubClient implements IGitHubClient }) } + async getOrganizationMembershipStatus( + request: GetOrganizationMembershipStatusRequest + ): Promise { + return await this.send(async () => { + return await this.gitHubClient.getOrganizationMembershipStatus(request) + }) + } + private async send(fn: () => Promise): Promise { const accessToken = await this.accessTokenReader.getAccessToken() try { diff --git a/src/common/github/GitHubClient.ts b/src/common/github/GitHubClient.ts index 2b03cbe2..843c802d 100644 --- a/src/common/github/GitHubClient.ts +++ b/src/common/github/GitHubClient.ts @@ -6,8 +6,10 @@ import IGitHubClient, { GetRepositoryContentRequest, GetPullRequestCommentsRequest, AddCommentToPullRequestRequest, + GetOrganizationMembershipStatusRequest, RepositoryContent, - PullRequestComment + PullRequestComment, + OrganizationMembershipStatus } from "./IGitHubClient" type GitHubClientConfig = { @@ -90,4 +92,37 @@ export default class GitHubClient implements IGitHubClient { body: request.body }) } + + async getOrganizationMembershipStatus( + request: GetOrganizationMembershipStatusRequest + ): Promise { + const accessToken = await this.accessTokenReader.getAccessToken() + const octokit = new Octokit({ auth: accessToken }) + try { + const response = await octokit.rest.orgs.getMembershipForAuthenticatedUser({ + org: request.organizationName + }) + console.log(response) + if (response.data.state == "active") { + return OrganizationMembershipStatus.ACTIVE + } else if (response.data.state == "pending") { + return OrganizationMembershipStatus.PENDING + } else { + return OrganizationMembershipStatus.UNKNOWN + } + } catch (error: any) { + console.log(error) + if (error.status) { + if (error.status == 404) { + return OrganizationMembershipStatus.NOT_A_MEMBER + } else if (error.status == 403) { + return OrganizationMembershipStatus.GITHUB_APP_BLOCKED + } else { + throw error + } + } else { + throw error + } + } + } } diff --git a/src/common/github/IGitHubClient.ts b/src/common/github/IGitHubClient.ts index 9537786e..a66e689f 100644 --- a/src/common/github/IGitHubClient.ts +++ b/src/common/github/IGitHubClient.ts @@ -40,9 +40,22 @@ export type AddCommentToPullRequestRequest = { readonly body: string } +export type GetOrganizationMembershipStatusRequest = { + readonly organizationName: string +} + +export enum OrganizationMembershipStatus { + NOT_A_MEMBER = "not_a_member", + ACTIVE = "active", + PENDING = "pending", + GITHUB_APP_BLOCKED = "github_app_blocked", + UNKNOWN = "unknown" +} + export default interface IGitHubClient { graphql(request: GraphQLQueryRequest): Promise getRepositoryContent(request: GetRepositoryContentRequest): Promise getPullRequestComments(request: GetPullRequestCommentsRequest): Promise addCommentToPullRequest(request: AddCommentToPullRequestRequest): Promise + getOrganizationMembershipStatus(request: GetOrganizationMembershipStatusRequest): Promise } From 2681ef78000bddd2811759ccf31e675bb63caf89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 09:49:36 +0100 Subject: [PATCH 27/53] Throws InvalidSessionError when fetching projects with invalid session --- src/common/errors/index.ts | 1 + .../GitHubOrganizationSessionValidator.ts | 19 ++++++++++++++ src/common/session/ISessionValidator.ts | 3 +++ .../SessionValidatingProjectDataSource.ts | 25 +++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 src/common/session/GitHubOrganizationSessionValidator.ts create mode 100644 src/common/session/ISessionValidator.ts create mode 100644 src/features/projects/domain/SessionValidatingProjectDataSource.ts diff --git a/src/common/errors/index.ts b/src/common/errors/index.ts index 2e482071..74acb8d0 100644 --- a/src/common/errors/index.ts +++ b/src/common/errors/index.ts @@ -1 +1,2 @@ export class UnauthorizedError extends Error {} +export class InvalidSessionError extends Error {} diff --git a/src/common/session/GitHubOrganizationSessionValidator.ts b/src/common/session/GitHubOrganizationSessionValidator.ts new file mode 100644 index 00000000..837bc030 --- /dev/null +++ b/src/common/session/GitHubOrganizationSessionValidator.ts @@ -0,0 +1,19 @@ +import IGitHubClient, { OrganizationMembershipStatus } from "../github/IGitHubClient" +import ISessionValidator from "./ISessionValidator" + +export default class GitHubOrganizationSessionValidator implements ISessionValidator { + private readonly gitHubClient: IGitHubClient + private readonly acceptedOrganization: string + + constructor(gitHubClient: IGitHubClient, acceptedOrganization: string) { + this.gitHubClient = gitHubClient + this.acceptedOrganization = acceptedOrganization + } + + async validateSession(): Promise { + const status = await this.gitHubClient.getOrganizationMembershipStatus({ + organizationName: this.acceptedOrganization + }) + return status == OrganizationMembershipStatus.ACTIVE + } +} diff --git a/src/common/session/ISessionValidator.ts b/src/common/session/ISessionValidator.ts new file mode 100644 index 00000000..b51cd5e6 --- /dev/null +++ b/src/common/session/ISessionValidator.ts @@ -0,0 +1,3 @@ +export default interface ISessionValidator { + validateSession(): Promise +} diff --git a/src/features/projects/domain/SessionValidatingProjectDataSource.ts b/src/features/projects/domain/SessionValidatingProjectDataSource.ts new file mode 100644 index 00000000..2ccc96a1 --- /dev/null +++ b/src/features/projects/domain/SessionValidatingProjectDataSource.ts @@ -0,0 +1,25 @@ +import { InvalidSessionError } from "@/common/errors" +import ISessionValidator from "@/common/session/ISessionValidator" +import IProjectDataSource from "../domain/IProjectDataSource" +import Project from "../domain/Project" + +export default class SessionValidatingProjectDataSource implements IProjectDataSource { + private readonly sessionValidator: ISessionValidator + private readonly projectDataSource: IProjectDataSource + + constructor( + sessionValidator: ISessionValidator, + projectDataSource: IProjectDataSource + ) { + this.sessionValidator = sessionValidator + this.projectDataSource = projectDataSource + } + + async getProjects(): Promise { + const isValid = await this.sessionValidator.validateSession() + if (!isValid) { + throw new InvalidSessionError() + } + return await this.projectDataSource.getProjects() + } +} From ff014c33acd577d3ba153fa5804943d280601758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 09:49:53 +0100 Subject: [PATCH 28/53] Shows invalid session page when catching InvalidSessionError --- src/app/api/user/projects/route.ts | 23 +++++++------- src/app/invalid-session/page.tsx | 5 ++++ src/common/errors/client/ErrorHandler.tsx | 9 ++++-- src/features/auth/view/InvalidSessionPage.tsx | 12 ++++++++ .../auth/view/client/InvalidSession.tsx | 30 +++++++++++++++++++ 5 files changed, 63 insertions(+), 16 deletions(-) create mode 100644 src/app/invalid-session/page.tsx create mode 100644 src/features/auth/view/InvalidSessionPage.tsx create mode 100644 src/features/auth/view/client/InvalidSession.tsx diff --git a/src/app/api/user/projects/route.ts b/src/app/api/user/projects/route.ts index 6e259994..799f13f6 100644 --- a/src/app/api/user/projects/route.ts +++ b/src/app/api/user/projects/route.ts @@ -1,6 +1,6 @@ import { NextResponse } from "next/server" import { projectDataSource } from "@/composition" -import { UnauthorizedError } from "@/common/errors" +import { UnauthorizedError, InvalidSessionError } from "@/common/errors" export async function GET() { try { @@ -8,20 +8,17 @@ export async function GET() { return NextResponse.json({projects}) } catch (error) { if (error instanceof UnauthorizedError) { - return NextResponse.json({ - status: 401, - message: error.message - }, { status: 401 }) + return errorResponse(401, error.message) + } else if (error instanceof InvalidSessionError) { + return errorResponse(403, error.message) } else if (error instanceof Error) { - return NextResponse.json({ - status: 500, - message: error.message - }, { status: 500 }) + return errorResponse(500, error.message) } else { - return NextResponse.json({ - status: 500, - message: "Unknown error" - }, { status: 500 }) + return errorResponse(500, "Unknown error") } } } + +function errorResponse(status: number, message: string): NextResponse { + return NextResponse.json({ status, message }, { status }) +} diff --git a/src/app/invalid-session/page.tsx b/src/app/invalid-session/page.tsx new file mode 100644 index 00000000..ee33fec5 --- /dev/null +++ b/src/app/invalid-session/page.tsx @@ -0,0 +1,5 @@ +import InvalidSessionPage from "@/features/auth/view/InvalidSessionPage" + +export default async function Page() { + return +} diff --git a/src/common/errors/client/ErrorHandler.tsx b/src/common/errors/client/ErrorHandler.tsx index 83b68d45..20ba19a3 100644 --- a/src/common/errors/client/ErrorHandler.tsx +++ b/src/common/errors/client/ErrorHandler.tsx @@ -9,10 +9,13 @@ export default function ErrorHandler({ children: React.ReactNode }) { const onSWRError = (error: FetcherError) => { + if (typeof window === "undefined") { + return + } if (error.status == 401) { - if (typeof window !== "undefined") { - window.location.href = "/api/auth/logout" - } + window.location.href = "/api/auth/logout" + } else if (error.status == 403) { + window.location.href = "/invalid-session" } } return ( diff --git a/src/features/auth/view/InvalidSessionPage.tsx b/src/features/auth/view/InvalidSessionPage.tsx new file mode 100644 index 00000000..ec99a970 --- /dev/null +++ b/src/features/auth/view/InvalidSessionPage.tsx @@ -0,0 +1,12 @@ +import { redirect } from "next/navigation" +import { sessionValidator } from "@/composition" +import InvalidSession from "./client/InvalidSession" + +export default async function InvalidSessionPage() { + const isSessionValid = await sessionValidator.validateSession() + if (isSessionValid) { + // User ended up here by mistake so lets send them to the front page. + redirect("/") + } + return +} diff --git a/src/features/auth/view/client/InvalidSession.tsx b/src/features/auth/view/client/InvalidSession.tsx new file mode 100644 index 00000000..01a5b95f --- /dev/null +++ b/src/features/auth/view/client/InvalidSession.tsx @@ -0,0 +1,30 @@ +"use client" + +import { Box, Button, Typography } from "@mui/material" + +export default function InvalidSession() { + const navigateToFrontPage = () => { + if (typeof window !== "undefined") { + window.location.href = "/api/auth/logout" + } + } + const siteName = process.env.NEXT_PUBLIC_SHAPE_DOCS_TITLE + return ( + + + {`Your account does not have access to ${siteName}.`} + + + + ) +} From 1ab92ea57029adc65401cec54bbc4f0c00076834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 09:50:02 +0100 Subject: [PATCH 29/53] Adds session validation to composition --- src/composition.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/composition.ts b/src/composition.ts index 37a60313..dcfac50c 100644 --- a/src/composition.ts +++ b/src/composition.ts @@ -4,6 +4,7 @@ import Auth0Session from "@/common/session/Auth0Session" import CachingProjectDataSource from "@/features/projects/domain/CachingProjectDataSource" import GitHubClient from "@/common/github/GitHubClient" import GitHubOAuthTokenRefresher from "@/features/auth/data/GitHubOAuthTokenRefresher" +import GitHubOrganizationSessionValidator from "@/common/session/GitHubOrganizationSessionValidator" import GitHubProjectDataSource from "@/features/projects/data/GitHubProjectDataSource" import InitialOAuthTokenService from "@/features/auth/domain/InitialOAuthTokenService" import KeyValueUserDataRepository from "@/common/userData/KeyValueUserDataRepository" @@ -15,6 +16,7 @@ import SessionDataRepository from "@/common/userData/SessionDataRepository" import SessionMutexFactory from "@/common/mutex/SessionMutexFactory" import SessionOAuthTokenRepository from "@/features/auth/domain/SessionOAuthTokenRepository" import SessionProjectRepository from "@/features/projects/domain/SessionProjectRepository" +import SessionValidatingProjectDataSource from "@/features/projects/domain/SessionValidatingProjectDataSource" import OAuthTokenRepository from "@/features/auth/domain/OAuthTokenRepository" import authLogoutHandler from "@/common/authHandler/logout" @@ -70,6 +72,11 @@ export const gitHubClient = new AccessTokenRefreshingGitHubClient( }) ) +export const sessionValidator = new GitHubOrganizationSessionValidator( + gitHubClient, + GITHUB_ORGANIZATION_NAME +) + export const sessionProjectRepository = new SessionProjectRepository( new SessionDataRepository( new Auth0Session(), @@ -81,9 +88,12 @@ export const sessionProjectRepository = new SessionProjectRepository( ) export const projectDataSource = new CachingProjectDataSource( - new GitHubProjectDataSource( - gitHubClient, - GITHUB_ORGANIZATION_NAME + new SessionValidatingProjectDataSource( + sessionValidator, + new GitHubProjectDataSource( + gitHubClient, + GITHUB_ORGANIZATION_NAME + ) ), sessionProjectRepository ) From 3e23c87b22874bf061ada2ef6b43a04378959278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 09:54:41 +0100 Subject: [PATCH 30/53] Removes debug logs --- src/common/github/GitHubClient.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/common/github/GitHubClient.ts b/src/common/github/GitHubClient.ts index 843c802d..d60748ec 100644 --- a/src/common/github/GitHubClient.ts +++ b/src/common/github/GitHubClient.ts @@ -102,7 +102,6 @@ export default class GitHubClient implements IGitHubClient { const response = await octokit.rest.orgs.getMembershipForAuthenticatedUser({ org: request.organizationName }) - console.log(response) if (response.data.state == "active") { return OrganizationMembershipStatus.ACTIVE } else if (response.data.state == "pending") { @@ -111,7 +110,6 @@ export default class GitHubClient implements IGitHubClient { return OrganizationMembershipStatus.UNKNOWN } } catch (error: any) { - console.log(error) if (error.status) { if (error.status == 404) { return OrganizationMembershipStatus.NOT_A_MEMBER From b635f77377569ae306cd949b03d128f43276312b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 09:56:04 +0100 Subject: [PATCH 31/53] Fixes linting error --- src/common/github/GitHubClient.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/github/GitHubClient.ts b/src/common/github/GitHubClient.ts index d60748ec..dba5c281 100644 --- a/src/common/github/GitHubClient.ts +++ b/src/common/github/GitHubClient.ts @@ -109,6 +109,7 @@ export default class GitHubClient implements IGitHubClient { } else { return OrganizationMembershipStatus.UNKNOWN } + /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ } catch (error: any) { if (error.status) { if (error.status == 404) { From aaeba6c3b51fb67531e5f500ff547c1df3b09589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 09:58:39 +0100 Subject: [PATCH 32/53] Fixes unit tests --- .../AccessTokenRefreshingGitHubClient.test.ts | 36 +++++++++++++++---- .../domain/SessionOAuthTokenRepository.ts | 2 +- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts b/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts index c8c7d21a..db6d05c3 100644 --- a/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts +++ b/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts @@ -3,7 +3,8 @@ import { GraphQLQueryRequest, GetRepositoryContentRequest, GetPullRequestCommentsRequest, - AddCommentToPullRequestRequest + AddCommentToPullRequestRequest, + OrganizationMembershipStatus } from "../../../src/common/github/IGitHubClient" test("It forwards a GraphQL request", async () => { @@ -27,7 +28,10 @@ test("It forwards a GraphQL request", async () => { async getPullRequestComments() { return [] }, - async addCommentToPullRequest() {} + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.UNKNOWN + } }) const request: GraphQLQueryRequest = { query: "foo", @@ -58,7 +62,10 @@ test("It forwards a request to get the repository content", async () => { async getPullRequestComments() { return [] }, - async addCommentToPullRequest() {} + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.UNKNOWN + } }) const request: GetRepositoryContentRequest = { repositoryOwner: "foo", @@ -91,7 +98,10 @@ test("It forwards a request to get comments to a pull request", async () => { forwardedRequest = request return [] }, - async addCommentToPullRequest() {} + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.UNKNOWN + } }) const request: GetPullRequestCommentsRequest = { appInstallationId: 1234, @@ -125,6 +135,9 @@ test("It forwards a request to add a comment to a pull request", async () => { }, async addCommentToPullRequest(request: AddCommentToPullRequestRequest) { forwardedRequest = request + }, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.UNKNOWN } }) const request: AddCommentToPullRequestRequest = { @@ -164,7 +177,10 @@ test("It retries with a refreshed access token when receiving HTTP 401", async ( async getPullRequestComments() { return [] }, - async addCommentToPullRequest() {} + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.UNKNOWN + } }) const request: GraphQLQueryRequest = { query: "foo", @@ -195,7 +211,10 @@ test("It only retries a request once when receiving HTTP 401", async () => { async getPullRequestComments() { return [] }, - async addCommentToPullRequest() {} + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.UNKNOWN + } }) const request: GraphQLQueryRequest = { query: "foo", @@ -229,7 +248,10 @@ test("It does not refresh an access token when the initial request was successfu async getPullRequestComments() { return [] }, - async addCommentToPullRequest() {} + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.UNKNOWN + } }) const request: GraphQLQueryRequest = { query: "foo", diff --git a/src/features/auth/domain/SessionOAuthTokenRepository.ts b/src/features/auth/domain/SessionOAuthTokenRepository.ts index b4add594..2f5d0905 100644 --- a/src/features/auth/domain/SessionOAuthTokenRepository.ts +++ b/src/features/auth/domain/SessionOAuthTokenRepository.ts @@ -1,4 +1,4 @@ -import { UnauthorizedError } from "@/common/errors" +import { UnauthorizedError } from "../../../common/errors" import ZodJSONCoder from "../../../common/utils/ZodJSONCoder" import ISessionDataRepository from "@/common/userData/ISessionDataRepository" import ISessionOAuthTokenRepository from "./SessionOAuthTokenRepository" From 4f8794a16dd74f7b0d487f86426f822b81358fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 10:53:44 +0100 Subject: [PATCH 33/53] Improves error message --- src/features/auth/view/InvalidSessionPage.tsx | 12 +++++- .../auth/view/client/InvalidSession.tsx | 40 ++++++++++--------- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/features/auth/view/InvalidSessionPage.tsx b/src/features/auth/view/InvalidSessionPage.tsx index ec99a970..99292a13 100644 --- a/src/features/auth/view/InvalidSessionPage.tsx +++ b/src/features/auth/view/InvalidSessionPage.tsx @@ -2,11 +2,21 @@ import { redirect } from "next/navigation" import { sessionValidator } from "@/composition" import InvalidSession from "./client/InvalidSession" +const { + NEXT_PUBLIC_SHAPE_DOCS_TITLE, + GITHUB_ORGANIZATION_NAME +} = process.env + export default async function InvalidSessionPage() { const isSessionValid = await sessionValidator.validateSession() if (isSessionValid) { // User ended up here by mistake so lets send them to the front page. redirect("/") } - return + return ( + + ) } diff --git a/src/features/auth/view/client/InvalidSession.tsx b/src/features/auth/view/client/InvalidSession.tsx index 01a5b95f..d5fabd93 100644 --- a/src/features/auth/view/client/InvalidSession.tsx +++ b/src/features/auth/view/client/InvalidSession.tsx @@ -1,30 +1,32 @@ "use client" -import { Box, Button, Typography } from "@mui/material" +import { Box, Button, Stack, Typography } from "@mui/material" -export default function InvalidSession() { +export default function InvalidSession({ + siteName, + organizationName +}: { + siteName: string + organizationName: string +}) { const navigateToFrontPage = () => { if (typeof window !== "undefined") { window.location.href = "/api/auth/logout" } } - const siteName = process.env.NEXT_PUBLIC_SHAPE_DOCS_TITLE return ( - - - {`Your account does not have access to ${siteName}.`} - - - + + + + Your account does not have access to {siteName} + + + Access to {siteName} requires that your account is an active member of the {organizationName} organization on GitHub. + + + + ) } From f64e6de9b4b140ceaa94652f77e1aaa02c49c7ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 11:00:22 +0100 Subject: [PATCH 34/53] Fixes linting warning --- src/features/auth/view/client/InvalidSession.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/auth/view/client/InvalidSession.tsx b/src/features/auth/view/client/InvalidSession.tsx index d5fabd93..76cf8416 100644 --- a/src/features/auth/view/client/InvalidSession.tsx +++ b/src/features/auth/view/client/InvalidSession.tsx @@ -1,6 +1,6 @@ "use client" -import { Box, Button, Stack, Typography } from "@mui/material" +import { Button, Stack, Typography } from "@mui/material" export default function InvalidSession({ siteName, From dd442941672f36f7f2def33cdcb00590f9f26780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 11:10:35 +0100 Subject: [PATCH 35/53] Adds tests for GitHubOrganizationSessionValidator --- ...GitHubOrganizationSessionValidator.test.ts | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 __test__/common/session/GitHubOrganizationSessionValidator.test.ts diff --git a/__test__/common/session/GitHubOrganizationSessionValidator.test.ts b/__test__/common/session/GitHubOrganizationSessionValidator.test.ts new file mode 100644 index 00000000..2503e5f2 --- /dev/null +++ b/__test__/common/session/GitHubOrganizationSessionValidator.test.ts @@ -0,0 +1,145 @@ +import { + GetOrganizationMembershipStatusRequest, + OrganizationMembershipStatus +} from "../../../src/common/github/IGitHubClient" +import GitHubOrganizationSessionValidator from "../../../src/common/session/GitHubOrganizationSessionValidator" + +test("It requests organization membership status for the specified organization", async () => { + let queriedOrganizationName: string | undefined + const sut = new GitHubOrganizationSessionValidator( + { + async graphql() { + return {} + }, + async getRepositoryContent() { + return { downloadURL: "https://example.com" } + }, + async getPullRequestComments() { + return [] + }, + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus(request: GetOrganizationMembershipStatusRequest) { + queriedOrganizationName = request.organizationName + return OrganizationMembershipStatus.UNKNOWN + } + }, + "foo" + ) + await sut.validateSession() + expect(queriedOrganizationName).toBe("foo") +}) + +test("It considers session valid when membership status is \"Active\"", async () => { + const sut = new GitHubOrganizationSessionValidator( + { + async graphql() { + return {} + }, + async getRepositoryContent() { + return { downloadURL: "https://example.com" } + }, + async getPullRequestComments() { + return [] + }, + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.ACTIVE + } + }, + "foo" + ) + const isSessionValid = await sut.validateSession() + expect(isSessionValid).toBeTruthy() +}) + +test("It considers session invalid when membership status is \"Not a member\"", async () => { + const sut = new GitHubOrganizationSessionValidator( + { + async graphql() { + return {} + }, + async getRepositoryContent() { + return { downloadURL: "https://example.com" } + }, + async getPullRequestComments() { + return [] + }, + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.NOT_A_MEMBER + } + }, + "foo" + ) + const isSessionValid = await sut.validateSession() + expect(isSessionValid).toBeFalsy() +}) + +test("It considers session invalid when membership status is \"Pending\"", async () => { + const sut = new GitHubOrganizationSessionValidator( + { + async graphql() { + return {} + }, + async getRepositoryContent() { + return { downloadURL: "https://example.com" } + }, + async getPullRequestComments() { + return [] + }, + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.PENDING + } + }, + "foo" + ) + const isSessionValid = await sut.validateSession() + expect(isSessionValid).toBeFalsy() +}) + +test("It considers session invalid when membership status is \"GitHub App Blocked\"", async () => { + const sut = new GitHubOrganizationSessionValidator( + { + async graphql() { + return {} + }, + async getRepositoryContent() { + return { downloadURL: "https://example.com" } + }, + async getPullRequestComments() { + return [] + }, + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.GITHUB_APP_BLOCKED + } + }, + "foo" + ) + const isSessionValid = await sut.validateSession() + expect(isSessionValid).toBeFalsy() +}) + +test("It considers session invalid when membership status is \"Unknown\"", async () => { + const sut = new GitHubOrganizationSessionValidator( + { + async graphql() { + return {} + }, + async getRepositoryContent() { + return { downloadURL: "https://example.com" } + }, + async getPullRequestComments() { + return [] + }, + async addCommentToPullRequest() {}, + async getOrganizationMembershipStatus() { + return OrganizationMembershipStatus.UNKNOWN + } + }, + "foo" + ) + const isSessionValid = await sut.validateSession() + expect(isSessionValid).toBeFalsy() +}) \ No newline at end of file From 0c1436d2f6d4eab3c116048cafa68169a54b31a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 11:17:23 +0100 Subject: [PATCH 36/53] Adds tests for SessionValidatingProjectDataSource --- ...SessionValidatingProjectDataSource.test.ts | 46 +++++++++++++++++++ .../SessionValidatingProjectDataSource.ts | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 __test__/projects/SessionValidatingProjectDataSource.test.ts diff --git a/__test__/projects/SessionValidatingProjectDataSource.test.ts b/__test__/projects/SessionValidatingProjectDataSource.test.ts new file mode 100644 index 00000000..f0f96dc7 --- /dev/null +++ b/__test__/projects/SessionValidatingProjectDataSource.test.ts @@ -0,0 +1,46 @@ +import SessionValidatingProjectDataSource from "../../src/features/projects/domain/SessionValidatingProjectDataSource" + +test("It validates the session", async () => { + let didValidateSession = false + const sut = new SessionValidatingProjectDataSource({ + async validateSession() { + didValidateSession = true + return true + }, + }, { + async getProjects() { + return [] + } + }) + await sut.getProjects() + expect(didValidateSession).toBeTruthy() +}) + +test("It fetches projects when session is valid", async () => { + let didFetchProjects = false + const sut = new SessionValidatingProjectDataSource({ + async validateSession() { + return true + }, + }, { + async getProjects() { + didFetchProjects = true + return [] + } + }) + await sut.getProjects() + expect(didFetchProjects).toBeTruthy() +}) + +test("It throws error when session is invalid", async () => { + const sut = new SessionValidatingProjectDataSource({ + async validateSession() { + return false + }, + }, { + async getProjects() { + return [] + } + }) + expect(sut.getProjects()).rejects.toThrowError() +}) diff --git a/src/features/projects/domain/SessionValidatingProjectDataSource.ts b/src/features/projects/domain/SessionValidatingProjectDataSource.ts index 2ccc96a1..942d0859 100644 --- a/src/features/projects/domain/SessionValidatingProjectDataSource.ts +++ b/src/features/projects/domain/SessionValidatingProjectDataSource.ts @@ -1,4 +1,4 @@ -import { InvalidSessionError } from "@/common/errors" +import { InvalidSessionError } from "../../../common/errors" import ISessionValidator from "@/common/session/ISessionValidator" import IProjectDataSource from "../domain/IProjectDataSource" import Project from "../domain/Project" From fa84596f70afbe4cdbaafe67b36bf9ca453462d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 11:36:18 +0100 Subject: [PATCH 37/53] Removes OrganizationMembershipStatus type --- .../AccessTokenRefreshingGitHubClient.test.ts | 17 +++++---- ...GitHubOrganizationSessionValidator.test.ts | 28 +++++++-------- .../AccessTokenRefreshingGitHubClient.ts | 6 ++-- src/common/github/GitHubClient.ts | 35 ++++--------------- src/common/github/IGitHubClient.ts | 10 ++---- .../GitHubOrganizationSessionValidator.ts | 25 ++++++++++--- 6 files changed, 54 insertions(+), 67 deletions(-) diff --git a/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts b/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts index db6d05c3..7913e1c3 100644 --- a/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts +++ b/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts @@ -3,8 +3,7 @@ import { GraphQLQueryRequest, GetRepositoryContentRequest, GetPullRequestCommentsRequest, - AddCommentToPullRequestRequest, - OrganizationMembershipStatus + AddCommentToPullRequestRequest } from "../../../src/common/github/IGitHubClient" test("It forwards a GraphQL request", async () => { @@ -30,7 +29,7 @@ test("It forwards a GraphQL request", async () => { }, async addCommentToPullRequest() {}, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.UNKNOWN + return { state: "active" } } }) const request: GraphQLQueryRequest = { @@ -64,7 +63,7 @@ test("It forwards a request to get the repository content", async () => { }, async addCommentToPullRequest() {}, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.UNKNOWN + return { state: "active" } } }) const request: GetRepositoryContentRequest = { @@ -100,7 +99,7 @@ test("It forwards a request to get comments to a pull request", async () => { }, async addCommentToPullRequest() {}, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.UNKNOWN + return { state: "active" } } }) const request: GetPullRequestCommentsRequest = { @@ -137,7 +136,7 @@ test("It forwards a request to add a comment to a pull request", async () => { forwardedRequest = request }, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.UNKNOWN + return { state: "active" } } }) const request: AddCommentToPullRequestRequest = { @@ -179,7 +178,7 @@ test("It retries with a refreshed access token when receiving HTTP 401", async ( }, async addCommentToPullRequest() {}, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.UNKNOWN + return { state: "active" } } }) const request: GraphQLQueryRequest = { @@ -213,7 +212,7 @@ test("It only retries a request once when receiving HTTP 401", async () => { }, async addCommentToPullRequest() {}, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.UNKNOWN + return { state: "active" } } }) const request: GraphQLQueryRequest = { @@ -250,7 +249,7 @@ test("It does not refresh an access token when the initial request was successfu }, async addCommentToPullRequest() {}, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.UNKNOWN + return { state: "active" } } }) const request: GraphQLQueryRequest = { diff --git a/__test__/common/session/GitHubOrganizationSessionValidator.test.ts b/__test__/common/session/GitHubOrganizationSessionValidator.test.ts index 2503e5f2..105039de 100644 --- a/__test__/common/session/GitHubOrganizationSessionValidator.test.ts +++ b/__test__/common/session/GitHubOrganizationSessionValidator.test.ts @@ -1,6 +1,5 @@ import { - GetOrganizationMembershipStatusRequest, - OrganizationMembershipStatus + GetOrganizationMembershipStatusRequest } from "../../../src/common/github/IGitHubClient" import GitHubOrganizationSessionValidator from "../../../src/common/session/GitHubOrganizationSessionValidator" @@ -20,7 +19,7 @@ test("It requests organization membership status for the specified organization" async addCommentToPullRequest() {}, async getOrganizationMembershipStatus(request: GetOrganizationMembershipStatusRequest) { queriedOrganizationName = request.organizationName - return OrganizationMembershipStatus.UNKNOWN + return { state: "active" } } }, "foo" @@ -29,7 +28,7 @@ test("It requests organization membership status for the specified organization" expect(queriedOrganizationName).toBe("foo") }) -test("It considers session valid when membership status is \"Active\"", async () => { +test("It considers session valid when membership state is \"active\"", async () => { const sut = new GitHubOrganizationSessionValidator( { async graphql() { @@ -43,7 +42,7 @@ test("It considers session valid when membership status is \"Active\"", async () }, async addCommentToPullRequest() {}, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.ACTIVE + return { state: "active" } } }, "foo" @@ -52,7 +51,7 @@ test("It considers session valid when membership status is \"Active\"", async () expect(isSessionValid).toBeTruthy() }) -test("It considers session invalid when membership status is \"Not a member\"", async () => { +test("It considers session invalid when membership state is \"pending\"", async () => { const sut = new GitHubOrganizationSessionValidator( { async graphql() { @@ -66,7 +65,7 @@ test("It considers session invalid when membership status is \"Not a member\"", }, async addCommentToPullRequest() {}, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.NOT_A_MEMBER + return { state: "pending" } } }, "foo" @@ -75,7 +74,7 @@ test("It considers session invalid when membership status is \"Not a member\"", expect(isSessionValid).toBeFalsy() }) -test("It considers session invalid when membership status is \"Pending\"", async () => { +test("It considers session invalid when receiving HTTP 404, indicating user is not member of the organization", async () => { const sut = new GitHubOrganizationSessionValidator( { async graphql() { @@ -89,7 +88,7 @@ test("It considers session invalid when membership status is \"Pending\"", async }, async addCommentToPullRequest() {}, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.PENDING + throw { status: 404, message: "User is not member of organization"} } }, "foo" @@ -98,7 +97,7 @@ test("It considers session invalid when membership status is \"Pending\"", async expect(isSessionValid).toBeFalsy() }) -test("It considers session invalid when membership status is \"GitHub App Blocked\"", async () => { +test("It considers session invalid when receiving HTTP 404, indicating that the organization has blocked the GitHub app", async () => { const sut = new GitHubOrganizationSessionValidator( { async graphql() { @@ -112,7 +111,7 @@ test("It considers session invalid when membership status is \"GitHub App Blocke }, async addCommentToPullRequest() {}, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.GITHUB_APP_BLOCKED + throw { status: 403, message: "Organization has blocked GitHub app"} } }, "foo" @@ -121,7 +120,7 @@ test("It considers session invalid when membership status is \"GitHub App Blocke expect(isSessionValid).toBeFalsy() }) -test("It considers session invalid when membership status is \"Unknown\"", async () => { +test("It forwards error when getting membership status throws unknown error", async () => { const sut = new GitHubOrganizationSessionValidator( { async graphql() { @@ -135,11 +134,10 @@ test("It considers session invalid when membership status is \"Unknown\"", async }, async addCommentToPullRequest() {}, async getOrganizationMembershipStatus() { - return OrganizationMembershipStatus.UNKNOWN + throw { status: 500 } } }, "foo" ) - const isSessionValid = await sut.validateSession() - expect(isSessionValid).toBeFalsy() + await expect(sut.validateSession()).rejects.toEqual({ status: 500 }) }) \ No newline at end of file diff --git a/src/common/github/AccessTokenRefreshingGitHubClient.ts b/src/common/github/AccessTokenRefreshingGitHubClient.ts index 4d5ea36d..e5e4a9e7 100644 --- a/src/common/github/AccessTokenRefreshingGitHubClient.ts +++ b/src/common/github/AccessTokenRefreshingGitHubClient.ts @@ -5,10 +5,10 @@ import IGitHubClient, { GetRepositoryContentRequest, GetPullRequestCommentsRequest, GetOrganizationMembershipStatusRequest, + GetOrganizationMembershipStatusRequestResponse, AddCommentToPullRequestRequest, RepositoryContent, - PullRequestComment, - OrganizationMembershipStatus + PullRequestComment } from "./IGitHubClient" const HttpErrorSchema = z.object({ @@ -64,7 +64,7 @@ export default class AccessTokenRefreshingGitHubClient implements IGitHubClient async getOrganizationMembershipStatus( request: GetOrganizationMembershipStatusRequest - ): Promise { + ): Promise { return await this.send(async () => { return await this.gitHubClient.getOrganizationMembershipStatus(request) }) diff --git a/src/common/github/GitHubClient.ts b/src/common/github/GitHubClient.ts index dba5c281..cec899e9 100644 --- a/src/common/github/GitHubClient.ts +++ b/src/common/github/GitHubClient.ts @@ -7,9 +7,9 @@ import IGitHubClient, { GetPullRequestCommentsRequest, AddCommentToPullRequestRequest, GetOrganizationMembershipStatusRequest, + GetOrganizationMembershipStatusRequestResponse, RepositoryContent, - PullRequestComment, - OrganizationMembershipStatus + PullRequestComment } from "./IGitHubClient" type GitHubClientConfig = { @@ -95,33 +95,12 @@ export default class GitHubClient implements IGitHubClient { async getOrganizationMembershipStatus( request: GetOrganizationMembershipStatusRequest - ): Promise { + ): Promise { const accessToken = await this.accessTokenReader.getAccessToken() const octokit = new Octokit({ auth: accessToken }) - try { - const response = await octokit.rest.orgs.getMembershipForAuthenticatedUser({ - org: request.organizationName - }) - if (response.data.state == "active") { - return OrganizationMembershipStatus.ACTIVE - } else if (response.data.state == "pending") { - return OrganizationMembershipStatus.PENDING - } else { - return OrganizationMembershipStatus.UNKNOWN - } - /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ - } catch (error: any) { - if (error.status) { - if (error.status == 404) { - return OrganizationMembershipStatus.NOT_A_MEMBER - } else if (error.status == 403) { - return OrganizationMembershipStatus.GITHUB_APP_BLOCKED - } else { - throw error - } - } else { - throw error - } - } + const response = await octokit.rest.orgs.getMembershipForAuthenticatedUser({ + org: request.organizationName + }) + return { state: response.data.state } } } diff --git a/src/common/github/IGitHubClient.ts b/src/common/github/IGitHubClient.ts index a66e689f..1b349fc6 100644 --- a/src/common/github/IGitHubClient.ts +++ b/src/common/github/IGitHubClient.ts @@ -44,12 +44,8 @@ export type GetOrganizationMembershipStatusRequest = { readonly organizationName: string } -export enum OrganizationMembershipStatus { - NOT_A_MEMBER = "not_a_member", - ACTIVE = "active", - PENDING = "pending", - GITHUB_APP_BLOCKED = "github_app_blocked", - UNKNOWN = "unknown" +export type GetOrganizationMembershipStatusRequestResponse = { + readonly state: "active" | "pending" } export default interface IGitHubClient { @@ -57,5 +53,5 @@ export default interface IGitHubClient { getRepositoryContent(request: GetRepositoryContentRequest): Promise getPullRequestComments(request: GetPullRequestCommentsRequest): Promise addCommentToPullRequest(request: AddCommentToPullRequestRequest): Promise - getOrganizationMembershipStatus(request: GetOrganizationMembershipStatusRequest): Promise + getOrganizationMembershipStatus(request: GetOrganizationMembershipStatusRequest): Promise } diff --git a/src/common/session/GitHubOrganizationSessionValidator.ts b/src/common/session/GitHubOrganizationSessionValidator.ts index 837bc030..308ff043 100644 --- a/src/common/session/GitHubOrganizationSessionValidator.ts +++ b/src/common/session/GitHubOrganizationSessionValidator.ts @@ -1,4 +1,4 @@ -import IGitHubClient, { OrganizationMembershipStatus } from "../github/IGitHubClient" +import IGitHubClient from "../github/IGitHubClient" import ISessionValidator from "./ISessionValidator" export default class GitHubOrganizationSessionValidator implements ISessionValidator { @@ -11,9 +11,24 @@ export default class GitHubOrganizationSessionValidator implements ISessionValid } async validateSession(): Promise { - const status = await this.gitHubClient.getOrganizationMembershipStatus({ - organizationName: this.acceptedOrganization - }) - return status == OrganizationMembershipStatus.ACTIVE + try { + const response = await this.gitHubClient.getOrganizationMembershipStatus({ + organizationName: this.acceptedOrganization + }) + return response.state == "active" + /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ + } catch (error: any) { + if (error.status) { + if (error.status == 404) { + return false + } else if (error.status == 403) { + return false + } else { + throw error + } + } else { + throw error + } + } } } From 758863be62e70094abdd11c12f484d5269a31f8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 10:57:50 +0000 Subject: [PATCH 38/53] Bump auth0 from 4.0.2 to 4.1.0 Bumps [auth0](https://github.com/auth0/node-auth0) from 4.0.2 to 4.1.0. - [Release notes](https://github.com/auth0/node-auth0/releases) - [Changelog](https://github.com/auth0/node-auth0/blob/master/CHANGELOG.md) - [Commits](https://github.com/auth0/node-auth0/commits) --- updated-dependencies: - dependency-name: auth0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 08324198..30c02321 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@octokit/auth-app": "^6.0.1", "@octokit/core": "^5.0.1", "@octokit/webhooks": "^12.0.3", - "auth0": "^4.0.2", + "auth0": "^4.1.0", "core-js": "^3.33.2", "encoding": "^0.1.13", "figma-squircle": "^0.3.1", @@ -3751,9 +3751,9 @@ } }, "node_modules/auth0": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/auth0/-/auth0-4.0.2.tgz", - "integrity": "sha512-VCyYspHBp5ZigLgF8w0s5UwufIIWVJ+UGX+s+YUN50RRP24znnhKGK1q4k3d3PLzTJSyrqnpdJNRdabzzEKORA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/auth0/-/auth0-4.1.0.tgz", + "integrity": "sha512-1CpjWPOuWPAhQZy46/T/jOViy1WXhytmdlZji693ZpBfugYw181+JXfKLzjea59oKmo4HFctD05cec7xGdysfQ==", "dependencies": { "jose": "^4.13.2", "uuid": "^9.0.0" diff --git a/package.json b/package.json index 8b9212c7..260edcf5 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@octokit/auth-app": "^6.0.1", "@octokit/core": "^5.0.1", "@octokit/webhooks": "^12.0.3", - "auth0": "^4.0.2", + "auth0": "^4.1.0", "core-js": "^3.33.2", "encoding": "^0.1.13", "figma-squircle": "^0.3.1", From b7f54feb7535575f880d5095da0f9f7d9dbf3e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 12:23:30 +0100 Subject: [PATCH 39/53] Renames InitialOAuthTokenService to OAuthTokenTransferer --- ...ervice.test.ts => OAuthTokenTransferer.test.ts} | 14 +++++++------- src/app/api/auth/[auth0]/route.ts | 10 +++++++--- src/composition.ts | 4 ++-- ...AuthTokenService.ts => OAuthTokenTransferer.ts} | 10 +++++----- 4 files changed, 21 insertions(+), 17 deletions(-) rename __test__/auth/{InitialOAuthTokenService.test.ts => OAuthTokenTransferer.test.ts} (85%) rename src/features/auth/domain/{InitialOAuthTokenService.ts => OAuthTokenTransferer.ts} (69%) diff --git a/__test__/auth/InitialOAuthTokenService.test.ts b/__test__/auth/OAuthTokenTransferer.test.ts similarity index 85% rename from __test__/auth/InitialOAuthTokenService.test.ts rename to __test__/auth/OAuthTokenTransferer.test.ts index e1e9263e..2c8ec21b 100644 --- a/__test__/auth/InitialOAuthTokenService.test.ts +++ b/__test__/auth/OAuthTokenTransferer.test.ts @@ -1,9 +1,9 @@ -import InitialOAuthTokenService from "../../src/features/auth/domain/InitialOAuthTokenService" +import OAuthTokenTransferer from "../../src/features/auth/domain/OAuthTokenTransferer" import OAuthToken from "../../src/features/auth/domain/OAuthToken" test("It fetches refresh token for specified user", async () => { let fetchedUserId: string | undefined - const sut = new InitialOAuthTokenService({ + const sut = new OAuthTokenTransferer({ refreshTokenReader: { async getRefreshToken(userId) { fetchedUserId = userId @@ -23,13 +23,13 @@ test("It fetches refresh token for specified user", async () => { async deleteOAuthToken() {} } }) - await sut.fetchInitialAuthTokenForUser("123") + await sut.transferAuthTokenForUser("123") expect(fetchedUserId).toBe("123") }) test("It refreshes the fetched refresh token", async () => { let refreshedRefreshToken: string | undefined - const sut = new InitialOAuthTokenService({ + const sut = new OAuthTokenTransferer({ refreshTokenReader: { async getRefreshToken() { return "helloworld" @@ -49,14 +49,14 @@ test("It refreshes the fetched refresh token", async () => { async deleteOAuthToken() {} } }) - await sut.fetchInitialAuthTokenForUser("123") + await sut.transferAuthTokenForUser("123") expect(refreshedRefreshToken).toBe("helloworld") }) test("It stores the refreshed auth token for the correct user ID", async () => { let storedAuthToken: OAuthToken | undefined let storedUserId: string | undefined - const sut = new InitialOAuthTokenService({ + const sut = new OAuthTokenTransferer({ refreshTokenReader: { async getRefreshToken() { return "helloworld" @@ -78,7 +78,7 @@ test("It stores the refreshed auth token for the correct user ID", async () => { async deleteOAuthToken() {} } }) - await sut.fetchInitialAuthTokenForUser("123") + await sut.transferAuthTokenForUser("123") expect(storedAuthToken?.accessToken).toBe("foo") expect(storedAuthToken?.refreshToken).toBe("bar") expect(storedUserId).toBe("123") diff --git a/src/app/api/auth/[auth0]/route.ts b/src/app/api/auth/[auth0]/route.ts index 42f7aca6..84d54ccb 100644 --- a/src/app/api/auth/[auth0]/route.ts +++ b/src/app/api/auth/[auth0]/route.ts @@ -9,7 +9,7 @@ import { AppRouterOnError } from "@auth0/nextjs-auth0" import { - initialOAuthTokenService, + oAuthTokenTransferer, sessionOAuthTokenRepository, sessionProjectRepository, logoutHandler @@ -18,16 +18,20 @@ import { const { SHAPE_DOCS_BASE_URL } = process.env const afterCallback: AfterCallbackAppRoute = async (_req, session) => { - await initialOAuthTokenService.fetchInitialAuthTokenForUser(session.user.sub) + console.log("After callback") + console.log(session) + await oAuthTokenTransferer.transferAuthTokenForUser(session.user.sub) return session } -const onError: AppRouterOnError = async () => { +const onError: AppRouterOnError = async (error: any) => { + console.log(error) const url = new URL(SHAPE_DOCS_BASE_URL + "/api/auth/forceLogout") return NextResponse.redirect(url) } const onLogout: NextAppRouterHandler = async (req: NextRequest, ctx: AppRouteHandlerFnContext) => { + console.log("Log out") await Promise.all([ sessionOAuthTokenRepository.deleteOAuthToken().catch(() => null), sessionProjectRepository.deleteProjects().catch(() => null) diff --git a/src/composition.ts b/src/composition.ts index dcfac50c..f8388bfd 100644 --- a/src/composition.ts +++ b/src/composition.ts @@ -6,9 +6,9 @@ import GitHubClient from "@/common/github/GitHubClient" import GitHubOAuthTokenRefresher from "@/features/auth/data/GitHubOAuthTokenRefresher" import GitHubOrganizationSessionValidator from "@/common/session/GitHubOrganizationSessionValidator" import GitHubProjectDataSource from "@/features/projects/data/GitHubProjectDataSource" -import InitialOAuthTokenService from "@/features/auth/domain/InitialOAuthTokenService" import KeyValueUserDataRepository from "@/common/userData/KeyValueUserDataRepository" import LockingAccessTokenRefresher from "@/features/auth/domain/LockingAccessTokenRefresher" +import OAuthTokenTransferer from "@/features/auth/domain/OAuthTokenTransferer" import RedisKeyedMutexFactory from "@/common/mutex/RedisKeyedMutexFactory" import RedisKeyValueStore from "@/common/keyValueStore/RedisKeyValueStore" import SessionAccessTokenReader from "@/features/auth/domain/SessionAccessTokenReader" @@ -98,7 +98,7 @@ export const projectDataSource = new CachingProjectDataSource( sessionProjectRepository ) -export const initialOAuthTokenService = new InitialOAuthTokenService({ +export const oAuthTokenTransferer = new OAuthTokenTransferer({ refreshTokenReader: new Auth0RefreshTokenReader({ domain: AUTH0_MANAGEMENT_DOMAIN, clientId: AUTH0_MANAGEMENT_CLIENT_ID, diff --git a/src/features/auth/domain/InitialOAuthTokenService.ts b/src/features/auth/domain/OAuthTokenTransferer.ts similarity index 69% rename from src/features/auth/domain/InitialOAuthTokenService.ts rename to src/features/auth/domain/OAuthTokenTransferer.ts index c9922e66..27189b39 100644 --- a/src/features/auth/domain/InitialOAuthTokenService.ts +++ b/src/features/auth/domain/OAuthTokenTransferer.ts @@ -2,20 +2,20 @@ import IRefreshTokenReader from "./IRefreshTokenReader" import IOAuthTokenRefresher from "./IOAuthTokenRefresher" import IOAuthTokenRepository from "./IOAuthTokenRepository" -type InitialOAuthTokenServiceConfig = { +type OAuthTokenTransfererConfig = { readonly refreshTokenReader: IRefreshTokenReader readonly oAuthTokenRefresher: IOAuthTokenRefresher readonly oAuthTokenRepository: IOAuthTokenRepository } -export default class InitialOAuthTokenService { - private readonly config: InitialOAuthTokenServiceConfig +export default class OAuthTokenTransferer { + private readonly config: OAuthTokenTransfererConfig - constructor(config: InitialOAuthTokenServiceConfig) { + constructor(config: OAuthTokenTransfererConfig) { this.config = config } - async fetchInitialAuthTokenForUser(userId: string): Promise { + async transferAuthTokenForUser(userId: string): Promise { const refreshToken = await this.config.refreshTokenReader.getRefreshToken(userId) const authToken = await this.config.oAuthTokenRefresher.refreshOAuthToken(refreshToken) this.config.oAuthTokenRepository.storeOAuthToken(userId, authToken) From 4c104770d54458cbe9c1d548e44e591b42e42568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 12:45:56 +0100 Subject: [PATCH 40/53] Removes debug logging --- src/app/api/auth/[auth0]/route.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/app/api/auth/[auth0]/route.ts b/src/app/api/auth/[auth0]/route.ts index 84d54ccb..7dc805fa 100644 --- a/src/app/api/auth/[auth0]/route.ts +++ b/src/app/api/auth/[auth0]/route.ts @@ -18,20 +18,16 @@ import { const { SHAPE_DOCS_BASE_URL } = process.env const afterCallback: AfterCallbackAppRoute = async (_req, session) => { - console.log("After callback") - console.log(session) await oAuthTokenTransferer.transferAuthTokenForUser(session.user.sub) return session } const onError: AppRouterOnError = async (error: any) => { - console.log(error) const url = new URL(SHAPE_DOCS_BASE_URL + "/api/auth/forceLogout") return NextResponse.redirect(url) } const onLogout: NextAppRouterHandler = async (req: NextRequest, ctx: AppRouteHandlerFnContext) => { - console.log("Log out") await Promise.all([ sessionOAuthTokenRepository.deleteOAuthToken().catch(() => null), sessionProjectRepository.deleteProjects().catch(() => null) From 1abd29defcefb2932cd6e7b3e9e0a13824714e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 6 Nov 2023 13:06:30 +0100 Subject: [PATCH 41/53] Removes unused parameter --- src/app/api/auth/[auth0]/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/auth/[auth0]/route.ts b/src/app/api/auth/[auth0]/route.ts index 7dc805fa..1beb7e25 100644 --- a/src/app/api/auth/[auth0]/route.ts +++ b/src/app/api/auth/[auth0]/route.ts @@ -22,7 +22,7 @@ const afterCallback: AfterCallbackAppRoute = async (_req, session) => { return session } -const onError: AppRouterOnError = async (error: any) => { +const onError: AppRouterOnError = async () => { const url = new URL(SHAPE_DOCS_BASE_URL + "/api/auth/forceLogout") return NextResponse.redirect(url) } From 5b1693669a69db8f940b0538df5c618f88fb30ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Tue, 7 Nov 2023 09:02:38 +0100 Subject: [PATCH 42/53] Simplifies project interface --- .../projects/CachingProjectDataSource.test.ts | 6 +-- src/app/[...slug]/page.tsx | 4 +- src/app/page.tsx | 6 +-- src/composition.ts | 2 +- .../domain/CachingProjectDataSource.ts | 10 ++--- .../projects/domain/IProjectRepository.ts | 5 ++- .../domain/ISessionProjectRepository.ts | 7 ---- .../projects/domain/ProjectRepository.ts | 37 +++++++++++++++++++ .../domain/SessionProjectRepository.ts | 29 --------------- src/features/projects/view/ProjectsPage.tsx | 8 ++-- 10 files changed, 57 insertions(+), 57 deletions(-) delete mode 100644 src/features/projects/domain/ISessionProjectRepository.ts create mode 100644 src/features/projects/domain/ProjectRepository.ts delete mode 100644 src/features/projects/domain/SessionProjectRepository.ts diff --git a/__test__/projects/CachingProjectDataSource.test.ts b/__test__/projects/CachingProjectDataSource.test.ts index f92efe23..1a0f2f76 100644 --- a/__test__/projects/CachingProjectDataSource.test.ts +++ b/__test__/projects/CachingProjectDataSource.test.ts @@ -32,13 +32,13 @@ test("It caches projects read from the data source", async () => { return projects } }, { - async getProjects() { + async get() { return [] }, - async storeProjects(projects) { + async set(projects) { cachedProjects = projects }, - async deleteProjects() {} + async delete() {} }) await sut.getProjects() expect(cachedProjects).toEqual(projects) diff --git a/src/app/[...slug]/page.tsx b/src/app/[...slug]/page.tsx index ba172ad2..2193779a 100644 --- a/src/app/[...slug]/page.tsx +++ b/src/app/[...slug]/page.tsx @@ -1,7 +1,7 @@ import { getProjectId, getSpecificationId, getVersionId } from "@/common/utils/url" import SessionOAuthTokenBarrier from "@/features/auth/view/SessionOAuthTokenBarrier" import ProjectsPage from "@/features/projects/view/ProjectsPage" -import { sessionProjectRepository } from "@/composition" +import { projectRepository } from "@/composition" type PageParams = { slug: string | string[] } @@ -10,7 +10,7 @@ export default async function Page({ params }: { params: PageParams }) { return ( - + ) } diff --git a/src/composition.ts b/src/composition.ts index f8388bfd..fc248457 100644 --- a/src/composition.ts +++ b/src/composition.ts @@ -9,13 +9,13 @@ import GitHubProjectDataSource from "@/features/projects/data/GitHubProjectDataS import KeyValueUserDataRepository from "@/common/userData/KeyValueUserDataRepository" import LockingAccessTokenRefresher from "@/features/auth/domain/LockingAccessTokenRefresher" import OAuthTokenTransferer from "@/features/auth/domain/OAuthTokenTransferer" +import ProjectRepository from "@/features/projects/domain/ProjectRepository" import RedisKeyedMutexFactory from "@/common/mutex/RedisKeyedMutexFactory" import RedisKeyValueStore from "@/common/keyValueStore/RedisKeyValueStore" import SessionAccessTokenReader from "@/features/auth/domain/SessionAccessTokenReader" import SessionDataRepository from "@/common/userData/SessionDataRepository" import SessionMutexFactory from "@/common/mutex/SessionMutexFactory" import SessionOAuthTokenRepository from "@/features/auth/domain/SessionOAuthTokenRepository" -import SessionProjectRepository from "@/features/projects/domain/SessionProjectRepository" import SessionValidatingProjectDataSource from "@/features/projects/domain/SessionValidatingProjectDataSource" import OAuthTokenRepository from "@/features/auth/domain/OAuthTokenRepository" import authLogoutHandler from "@/common/authHandler/logout" diff --git a/src/features/projects/domain/CachingProjectDataSource.ts b/src/features/projects/domain/CachingProjectDataSource.ts index f076ae7d..a95dae13 100644 --- a/src/features/projects/domain/CachingProjectDataSource.ts +++ b/src/features/projects/domain/CachingProjectDataSource.ts @@ -1,22 +1,22 @@ import Project from "./Project" import IProjectDataSource from "./IProjectDataSource" -import ISessionProjectRepository from "./ISessionProjectRepository" +import IProjectRepository from "./IProjectRepository" export default class CachingProjectDataSource implements IProjectDataSource { private dataSource: IProjectDataSource - private sessionProjectRepository: ISessionProjectRepository + private repository: IProjectRepository constructor( dataSource: IProjectDataSource, - sessionProjectRepository: ISessionProjectRepository + repository: IProjectRepository ) { this.dataSource = dataSource - this.sessionProjectRepository = sessionProjectRepository + this.repository = repository } async getProjects(): Promise { const projects = await this.dataSource.getProjects() - await this.sessionProjectRepository.storeProjects(projects) + await this.repository.set(projects) return projects } } \ No newline at end of file diff --git a/src/features/projects/domain/IProjectRepository.ts b/src/features/projects/domain/IProjectRepository.ts index a123d92e..52a4af69 100644 --- a/src/features/projects/domain/IProjectRepository.ts +++ b/src/features/projects/domain/IProjectRepository.ts @@ -1,6 +1,7 @@ import Project from "./Project" export default interface IProjectRepository { - getProjects(): Promise - storeProjects(projects: Project[]): Promise + get(): Promise + set(projects: Project[]): Promise + delete(): Promise } diff --git a/src/features/projects/domain/ISessionProjectRepository.ts b/src/features/projects/domain/ISessionProjectRepository.ts deleted file mode 100644 index 055b78e7..00000000 --- a/src/features/projects/domain/ISessionProjectRepository.ts +++ /dev/null @@ -1,7 +0,0 @@ -import Project from "./Project" - -export default interface ISessionProjectRepository { - getProjects(): Promise - storeProjects(projects: Project[]): Promise - deleteProjects(): Promise -} diff --git a/src/features/projects/domain/ProjectRepository.ts b/src/features/projects/domain/ProjectRepository.ts new file mode 100644 index 00000000..356c4a53 --- /dev/null +++ b/src/features/projects/domain/ProjectRepository.ts @@ -0,0 +1,37 @@ +import ZodJSONCoder from "@/common/utils/ZodJSONCoder" +import ISession from "@/common/session/ISession" +import IUserDataRepository from "@/common/userData/IUserDataRepository" +import IProjectRepository from "./IProjectRepository" +import Project, { ProjectSchema } from "./Project" + +type Repository = IUserDataRepository + +export default class ProjectRepository implements IProjectRepository { + private readonly session: ISession + private readonly repository: Repository + + constructor(session: ISession, repository: Repository) { + this.session = session + this.repository = repository + } + + async get(): Promise { + const userId = await this.session.getUserId() + const string = await this.repository.get(userId) + if (!string) { + return undefined + } + return ZodJSONCoder.decode(ProjectSchema.array(), string) + } + + async set(projects: Project[]): Promise { + const userId = await this.session.getUserId() + const string = ZodJSONCoder.encode(ProjectSchema.array(), projects) + await this.repository.set(userId, string) + } + + async delete(): Promise { + const userId = await this.session.getUserId() + await this.repository.delete(userId) + } +} diff --git a/src/features/projects/domain/SessionProjectRepository.ts b/src/features/projects/domain/SessionProjectRepository.ts deleted file mode 100644 index 5387a3c5..00000000 --- a/src/features/projects/domain/SessionProjectRepository.ts +++ /dev/null @@ -1,29 +0,0 @@ -import ZodJSONCoder from "@/common/utils/ZodJSONCoder" -import ISessionDataRepository from "@/common/userData/ISessionDataRepository" -import ISessionProjectRepository from "./ISessionProjectRepository" -import Project, { ProjectSchema } from "./Project" - -export default class SessionProjectRepository implements ISessionProjectRepository { - private readonly repository: ISessionDataRepository - - constructor(repository: ISessionDataRepository) { - this.repository = repository - } - - async getProjects(): Promise { - const string = await this.repository.get() - if (!string) { - return undefined - } - return ZodJSONCoder.decode(ProjectSchema.array(), string) - } - - async storeProjects(projects: Project[]): Promise { - const string = ZodJSONCoder.encode(ProjectSchema.array(), projects) - await this.repository.set(string) - } - - async deleteProjects(): Promise { - await this.repository.delete() - } -} diff --git a/src/features/projects/view/ProjectsPage.tsx b/src/features/projects/view/ProjectsPage.tsx index 37c41cfe..d4369eac 100644 --- a/src/features/projects/view/ProjectsPage.tsx +++ b/src/features/projects/view/ProjectsPage.tsx @@ -1,18 +1,18 @@ -import SessionProjectRepository from "../domain/SessionProjectRepository" +import ProjectRepository from "../domain/ProjectRepository" import ClientProjectsPage from "./client/ProjectsPage" export default async function ProjectsPage({ - sessionProjectRepository, + projectRepository, projectId, versionId, specificationId }: { - sessionProjectRepository: SessionProjectRepository + projectRepository: ProjectRepository projectId?: string versionId?: string specificationId?: string }) { - const projects = await sessionProjectRepository.getProjects() + const projects = await projectRepository.get() return ( Date: Tue, 7 Nov 2023 09:08:18 +0100 Subject: [PATCH 43/53] Introduces new ILogOutHandler concept --- __test__/auth/CompositeLogOutHandler.test.ts | 24 +++++++++++ .../auth/ErrorIgnoringLogOutHandler.test.ts | 11 +++++ .../auth/UserDataCleanUpLogOutHandler.test.ts | 16 ++++++++ .../common/authHandler/logoutHandler.test.ts | 41 ------------------- src/app/api/auth/[auth0]/route.ts | 18 ++------ src/common/authHandler/logout.ts | 12 ------ src/composition.ts | 30 ++++++++------ .../domain/logOut/CompositeLogOutHandler.ts | 14 +++++++ .../logOut/ErrorIgnoringLogOutHandler.ts | 15 +++++++ .../auth/domain/logOut/ILogOutHandler.ts | 3 ++ .../logOut/UserDataCleanUpLogOutHandler.ts | 24 +++++++++++ 11 files changed, 129 insertions(+), 79 deletions(-) create mode 100644 __test__/auth/CompositeLogOutHandler.test.ts create mode 100644 __test__/auth/ErrorIgnoringLogOutHandler.test.ts create mode 100644 __test__/auth/UserDataCleanUpLogOutHandler.test.ts delete mode 100644 __test__/common/authHandler/logoutHandler.test.ts delete mode 100644 src/common/authHandler/logout.ts create mode 100644 src/features/auth/domain/logOut/CompositeLogOutHandler.ts create mode 100644 src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler.ts create mode 100644 src/features/auth/domain/logOut/ILogOutHandler.ts create mode 100644 src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler.ts diff --git a/__test__/auth/CompositeLogOutHandler.test.ts b/__test__/auth/CompositeLogOutHandler.test.ts new file mode 100644 index 00000000..9618723c --- /dev/null +++ b/__test__/auth/CompositeLogOutHandler.test.ts @@ -0,0 +1,24 @@ +import CompositeLogOutHandler from "../../src/features/auth/domain/logOut/CompositeLogOutHandler" + +test("It invokes all log out handlers", async () => { + let didCallLogOutHandler1 = false + let didCallLogOutHandler2 = false + let didCallLogOutHandler3 = false + const sut = new CompositeLogOutHandler([{ + async handleLogOut() { + didCallLogOutHandler1 = true + } + }, { + async handleLogOut() { + didCallLogOutHandler2 = true + } + }, { + async handleLogOut() { + didCallLogOutHandler3 = true + } + }]) + await sut.handleLogOut() + expect(didCallLogOutHandler1).toBeTruthy() + expect(didCallLogOutHandler2).toBeTruthy() + expect(didCallLogOutHandler3).toBeTruthy() +}) diff --git a/__test__/auth/ErrorIgnoringLogOutHandler.test.ts b/__test__/auth/ErrorIgnoringLogOutHandler.test.ts new file mode 100644 index 00000000..5feae77c --- /dev/null +++ b/__test__/auth/ErrorIgnoringLogOutHandler.test.ts @@ -0,0 +1,11 @@ +import ErrorIgnoringLogOutHandler from "../../src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler" + +test("It ignores errors", async () => { + const sut = new ErrorIgnoringLogOutHandler({ + async handleLogOut() { + throw new Error("Mock") + } + }) + // Test will fail if the following throws. + await sut.handleLogOut() +}) diff --git a/__test__/auth/UserDataCleanUpLogOutHandler.test.ts b/__test__/auth/UserDataCleanUpLogOutHandler.test.ts new file mode 100644 index 00000000..c8db0461 --- /dev/null +++ b/__test__/auth/UserDataCleanUpLogOutHandler.test.ts @@ -0,0 +1,16 @@ +import UserDataCleanUpLogOutHandler from "../../src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler" + +test("It deletes data for the read user ID", async () => { + let deletedUserId: string | undefined + const sut = new UserDataCleanUpLogOutHandler({ + async getUserId() { + return "foo" + }, + }, { + async delete(userId) { + deletedUserId = userId + } + }) + await sut.handleLogOut() + expect(deletedUserId).toBe("foo") +}) diff --git a/__test__/common/authHandler/logoutHandler.test.ts b/__test__/common/authHandler/logoutHandler.test.ts deleted file mode 100644 index 49bd48e4..00000000 --- a/__test__/common/authHandler/logoutHandler.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import logoutHandler from "../../../src/common/authHandler/logout" - -test("It deletes the user's auth token", async () => { - let didDeleteAuthToken = false - logoutHandler({ - async getOAuthToken() { - throw new Error("Not implemented") - }, - async storeOAuthToken() {}, - async deleteOAuthToken() { - didDeleteAuthToken = true - } - }, { - async getProjects() { - return [] - }, - async storeProjects() {}, - async deleteProjects() {} - }) - expect(didDeleteAuthToken).toBeTruthy() -}) - -test("It deletes the cached projects", async () => { - let didDeleteProjects = false - logoutHandler({ - async getOAuthToken() { - throw new Error("Not implemented") - }, - async storeOAuthToken() {}, - async deleteOAuthToken() {} - }, { - async getProjects() { - return [] - }, - async storeProjects() {}, - async deleteProjects() { - didDeleteProjects = true - } - }) - expect(didDeleteProjects).toBeTruthy() -}) diff --git a/src/app/api/auth/[auth0]/route.ts b/src/app/api/auth/[auth0]/route.ts index 1beb7e25..4a914a2f 100644 --- a/src/app/api/auth/[auth0]/route.ts +++ b/src/app/api/auth/[auth0]/route.ts @@ -1,19 +1,13 @@ -import { NextRequest, NextResponse } from "next/server" +import { NextResponse } from "next/server" import { handleAuth, handleCallback, handleLogout, AfterCallbackAppRoute, NextAppRouterHandler, - AppRouteHandlerFnContext, AppRouterOnError } from "@auth0/nextjs-auth0" -import { - oAuthTokenTransferer, - sessionOAuthTokenRepository, - sessionProjectRepository, - logoutHandler -} from "@/composition" +import { logOutHandler } from "@/composition" const { SHAPE_DOCS_BASE_URL } = process.env @@ -27,12 +21,8 @@ const onError: AppRouterOnError = async () => { return NextResponse.redirect(url) } -const onLogout: NextAppRouterHandler = async (req: NextRequest, ctx: AppRouteHandlerFnContext) => { - await Promise.all([ - sessionOAuthTokenRepository.deleteOAuthToken().catch(() => null), - sessionProjectRepository.deleteProjects().catch(() => null) - ]) - await logoutHandler() +const onLogout: NextAppRouterHandler = async (req, ctx) => { + await logOutHandler.handleLogOut() return await handleLogout(req, ctx) } diff --git a/src/common/authHandler/logout.ts b/src/common/authHandler/logout.ts deleted file mode 100644 index 9bc80634..00000000 --- a/src/common/authHandler/logout.ts +++ /dev/null @@ -1,12 +0,0 @@ -import ISessionOAuthTokenRepository from "@/features/auth/domain/ISessionOAuthTokenRepository" -import ISessionProjectRepository from "@/features/projects/domain/ISessionProjectRepository" - -export default async function logoutHandler( - sessionOAuthTokenRepository: ISessionOAuthTokenRepository, - sessionProjectRepository: ISessionProjectRepository -) { - await Promise.all([ - sessionOAuthTokenRepository.deleteOAuthToken().catch(() => null), - sessionProjectRepository.deleteProjects().catch(() => null) - ]) -} diff --git a/src/composition.ts b/src/composition.ts index fc248457..656d0326 100644 --- a/src/composition.ts +++ b/src/composition.ts @@ -2,6 +2,8 @@ import AccessTokenRefreshingGitHubClient from "@/common/github/AccessTokenRefres import Auth0RefreshTokenReader from "@/features/auth/data/Auth0RefreshTokenReader" import Auth0Session from "@/common/session/Auth0Session" import CachingProjectDataSource from "@/features/projects/domain/CachingProjectDataSource" +import CompositeLogOutHandler from "@/features/auth/domain/logOut/CompositeLogOutHandler" +import ErrorIgnoringLogOutHandler from "@/features/auth/domain/logOut/ErrorIgnoringLogOutHandler" import GitHubClient from "@/common/github/GitHubClient" import GitHubOAuthTokenRefresher from "@/features/auth/data/GitHubOAuthTokenRefresher" import GitHubOrganizationSessionValidator from "@/common/session/GitHubOrganizationSessionValidator" @@ -19,6 +21,7 @@ import SessionOAuthTokenRepository from "@/features/auth/domain/SessionOAuthToke import SessionValidatingProjectDataSource from "@/features/projects/domain/SessionValidatingProjectDataSource" import OAuthTokenRepository from "@/features/auth/domain/OAuthTokenRepository" import authLogoutHandler from "@/common/authHandler/logout" +import UserDataCleanUpLogOutHandler from "@/features/auth/domain/logOut/UserDataCleanUpLogOutHandler" const { AUTH0_MANAGEMENT_DOMAIN, @@ -77,14 +80,14 @@ export const sessionValidator = new GitHubOrganizationSessionValidator( GITHUB_ORGANIZATION_NAME ) -export const sessionProjectRepository = new SessionProjectRepository( - new SessionDataRepository( - new Auth0Session(), - new KeyValueUserDataRepository( - new RedisKeyValueStore(REDIS_URL), - "projects" - ) - ) +const projectUserDataRepository = new KeyValueUserDataRepository( + new RedisKeyValueStore(REDIS_URL), + "projects" +) + +export const projectRepository = new ProjectRepository( + session, + projectUserDataRepository ) export const projectDataSource = new CachingProjectDataSource( @@ -95,7 +98,7 @@ export const projectDataSource = new CachingProjectDataSource( GITHUB_ORGANIZATION_NAME ) ), - sessionProjectRepository + projectRepository ) export const oAuthTokenTransferer = new OAuthTokenTransferer({ @@ -109,6 +112,9 @@ export const oAuthTokenTransferer = new OAuthTokenTransferer({ oAuthTokenRepository: new OAuthTokenRepository(oAuthTokenRepository) }) -export const logoutHandler = async () => { - await authLogoutHandler(sessionOAuthTokenRepository, sessionProjectRepository) -} +export const logOutHandler = new ErrorIgnoringLogOutHandler( + new CompositeLogOutHandler([ + new UserDataCleanUpLogOutHandler(session, projectUserDataRepository), + new UserDataCleanUpLogOutHandler(session, oAuthTokenRepository), + ]) +) diff --git a/src/features/auth/domain/logOut/CompositeLogOutHandler.ts b/src/features/auth/domain/logOut/CompositeLogOutHandler.ts new file mode 100644 index 00000000..ab69b11a --- /dev/null +++ b/src/features/auth/domain/logOut/CompositeLogOutHandler.ts @@ -0,0 +1,14 @@ +import ILogOutHandler from "./ILogOutHandler" + +export default class CompositeLogOutHandler implements ILogOutHandler { + private readonly handlers: ILogOutHandler[] + + constructor(handlers: ILogOutHandler[]) { + this.handlers = handlers + } + + async handleLogOut(): Promise { + const promises = this.handlers.map(e => e.handleLogOut()) + await Promise.all(promises) + } +} diff --git a/src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler.ts b/src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler.ts new file mode 100644 index 00000000..7db66f58 --- /dev/null +++ b/src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler.ts @@ -0,0 +1,15 @@ +import ILogOutHandler from "./ILogOutHandler" + +export default class ErrorIgnoringLogOutHandler implements ILogOutHandler { + private readonly handler: ILogOutHandler + + constructor(handler: ILogOutHandler) { + this.handler = handler + } + + async handleLogOut(): Promise { + try { + await this.handler.handleLogOut() + } catch {} + } +} diff --git a/src/features/auth/domain/logOut/ILogOutHandler.ts b/src/features/auth/domain/logOut/ILogOutHandler.ts new file mode 100644 index 00000000..88cab6ac --- /dev/null +++ b/src/features/auth/domain/logOut/ILogOutHandler.ts @@ -0,0 +1,3 @@ +export default interface ILogOutHandler { + handleLogOut(): Promise +} diff --git a/src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler.ts b/src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler.ts new file mode 100644 index 00000000..08f724e2 --- /dev/null +++ b/src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler.ts @@ -0,0 +1,24 @@ +import ILogOutHandler from "./ILogOutHandler" + +interface IUserIDReader { + getUserId(): Promise +} + +interface Repository { + delete(userId: string): Promise +} + +export default class UserDataCleanUpLogOutHandler implements ILogOutHandler { + private readonly userIdReader: IUserIDReader + private readonly repository: Repository + + constructor(userIdReader: IUserIDReader, repository: Repository) { + this.userIdReader = userIdReader + this.repository = repository + } + + async handleLogOut(): Promise { + const userId = await this.userIdReader.getUserId() + return await this.repository.delete(userId) + } +} From f678ab6077dda1d93f5d24f8af3ab230221bcc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Tue, 7 Nov 2023 09:02:38 +0100 Subject: [PATCH 44/53] Simplifies project interface # Conflicts: # src/composition.ts --- .../common/authHandler/logoutHandler.test.ts | 12 +++--- .../projects/CachingProjectDataSource.test.ts | 6 +-- src/app/[...slug]/page.tsx | 4 +- src/app/api/auth/[auth0]/route.ts | 4 +- src/app/page.tsx | 6 +-- src/common/authHandler/logout.ts | 6 +-- src/composition.ts | 18 ++++----- .../domain/CachingProjectDataSource.ts | 10 ++--- .../projects/domain/IProjectRepository.ts | 5 ++- .../domain/ISessionProjectRepository.ts | 7 ---- .../projects/domain/ProjectRepository.ts | 37 +++++++++++++++++++ .../domain/SessionProjectRepository.ts | 29 --------------- src/features/projects/view/ProjectsPage.tsx | 8 ++-- 13 files changed, 75 insertions(+), 77 deletions(-) delete mode 100644 src/features/projects/domain/ISessionProjectRepository.ts create mode 100644 src/features/projects/domain/ProjectRepository.ts delete mode 100644 src/features/projects/domain/SessionProjectRepository.ts diff --git a/__test__/common/authHandler/logoutHandler.test.ts b/__test__/common/authHandler/logoutHandler.test.ts index 49bd48e4..8060eb45 100644 --- a/__test__/common/authHandler/logoutHandler.test.ts +++ b/__test__/common/authHandler/logoutHandler.test.ts @@ -11,11 +11,11 @@ test("It deletes the user's auth token", async () => { didDeleteAuthToken = true } }, { - async getProjects() { + async get() { return [] }, - async storeProjects() {}, - async deleteProjects() {} + async set() {}, + async delete() {} }) expect(didDeleteAuthToken).toBeTruthy() }) @@ -29,11 +29,11 @@ test("It deletes the cached projects", async () => { async storeOAuthToken() {}, async deleteOAuthToken() {} }, { - async getProjects() { + async get() { return [] }, - async storeProjects() {}, - async deleteProjects() { + async set() {}, + async delete() { didDeleteProjects = true } }) diff --git a/__test__/projects/CachingProjectDataSource.test.ts b/__test__/projects/CachingProjectDataSource.test.ts index f92efe23..1a0f2f76 100644 --- a/__test__/projects/CachingProjectDataSource.test.ts +++ b/__test__/projects/CachingProjectDataSource.test.ts @@ -32,13 +32,13 @@ test("It caches projects read from the data source", async () => { return projects } }, { - async getProjects() { + async get() { return [] }, - async storeProjects(projects) { + async set(projects) { cachedProjects = projects }, - async deleteProjects() {} + async delete() {} }) await sut.getProjects() expect(cachedProjects).toEqual(projects) diff --git a/src/app/[...slug]/page.tsx b/src/app/[...slug]/page.tsx index ba172ad2..2193779a 100644 --- a/src/app/[...slug]/page.tsx +++ b/src/app/[...slug]/page.tsx @@ -1,7 +1,7 @@ import { getProjectId, getSpecificationId, getVersionId } from "@/common/utils/url" import SessionOAuthTokenBarrier from "@/features/auth/view/SessionOAuthTokenBarrier" import ProjectsPage from "@/features/projects/view/ProjectsPage" -import { sessionProjectRepository } from "@/composition" +import { projectRepository } from "@/composition" type PageParams = { slug: string | string[] } @@ -10,7 +10,7 @@ export default async function Page({ params }: { params: PageParams }) { return ( { const onLogout: NextAppRouterHandler = async (req: NextRequest, ctx: AppRouteHandlerFnContext) => { await Promise.all([ sessionOAuthTokenRepository.deleteOAuthToken().catch(() => null), - sessionProjectRepository.deleteProjects().catch(() => null) + projectRepository.delete().catch(() => null) ]) await logoutHandler() return await handleLogout(req, ctx) diff --git a/src/app/page.tsx b/src/app/page.tsx index a72a8f99..9fcd36ad 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,13 +1,11 @@ import SessionOAuthTokenBarrier from "@/features/auth/view/SessionOAuthTokenBarrier" import ProjectsPage from "@/features/projects/view/ProjectsPage" -import { sessionProjectRepository } from "@/composition" +import { projectRepository } from "@/composition" export default async function Page() { return ( - + ) } diff --git a/src/common/authHandler/logout.ts b/src/common/authHandler/logout.ts index 9bc80634..34d9a611 100644 --- a/src/common/authHandler/logout.ts +++ b/src/common/authHandler/logout.ts @@ -1,12 +1,12 @@ import ISessionOAuthTokenRepository from "@/features/auth/domain/ISessionOAuthTokenRepository" -import ISessionProjectRepository from "@/features/projects/domain/ISessionProjectRepository" +import IProjectRepository from "@/features/projects/domain/IProjectRepository" export default async function logoutHandler( sessionOAuthTokenRepository: ISessionOAuthTokenRepository, - sessionProjectRepository: ISessionProjectRepository + projectRepository: IProjectRepository ) { await Promise.all([ sessionOAuthTokenRepository.deleteOAuthToken().catch(() => null), - sessionProjectRepository.deleteProjects().catch(() => null) + projectRepository.delete().catch(() => null) ]) } diff --git a/src/composition.ts b/src/composition.ts index dcfac50c..b464ff06 100644 --- a/src/composition.ts +++ b/src/composition.ts @@ -9,13 +9,13 @@ import GitHubProjectDataSource from "@/features/projects/data/GitHubProjectDataS import InitialOAuthTokenService from "@/features/auth/domain/InitialOAuthTokenService" import KeyValueUserDataRepository from "@/common/userData/KeyValueUserDataRepository" import LockingAccessTokenRefresher from "@/features/auth/domain/LockingAccessTokenRefresher" +import ProjectRepository from "@/features/projects/domain/ProjectRepository" import RedisKeyedMutexFactory from "@/common/mutex/RedisKeyedMutexFactory" import RedisKeyValueStore from "@/common/keyValueStore/RedisKeyValueStore" import SessionAccessTokenReader from "@/features/auth/domain/SessionAccessTokenReader" import SessionDataRepository from "@/common/userData/SessionDataRepository" import SessionMutexFactory from "@/common/mutex/SessionMutexFactory" import SessionOAuthTokenRepository from "@/features/auth/domain/SessionOAuthTokenRepository" -import SessionProjectRepository from "@/features/projects/domain/SessionProjectRepository" import SessionValidatingProjectDataSource from "@/features/projects/domain/SessionValidatingProjectDataSource" import OAuthTokenRepository from "@/features/auth/domain/OAuthTokenRepository" import authLogoutHandler from "@/common/authHandler/logout" @@ -77,13 +77,11 @@ export const sessionValidator = new GitHubOrganizationSessionValidator( GITHUB_ORGANIZATION_NAME ) -export const sessionProjectRepository = new SessionProjectRepository( - new SessionDataRepository( - new Auth0Session(), - new KeyValueUserDataRepository( - new RedisKeyValueStore(REDIS_URL), - "projects" - ) +export const projectRepository = new ProjectRepository( + new Auth0Session(), + new KeyValueUserDataRepository( + new RedisKeyValueStore(REDIS_URL), + "projects" ) ) @@ -95,7 +93,7 @@ export const projectDataSource = new CachingProjectDataSource( GITHUB_ORGANIZATION_NAME ) ), - sessionProjectRepository + projectRepository ) export const initialOAuthTokenService = new InitialOAuthTokenService({ @@ -110,5 +108,5 @@ export const initialOAuthTokenService = new InitialOAuthTokenService({ }) export const logoutHandler = async () => { - await authLogoutHandler(sessionOAuthTokenRepository, sessionProjectRepository) + await authLogoutHandler(sessionOAuthTokenRepository, projectRepository) } diff --git a/src/features/projects/domain/CachingProjectDataSource.ts b/src/features/projects/domain/CachingProjectDataSource.ts index f076ae7d..a95dae13 100644 --- a/src/features/projects/domain/CachingProjectDataSource.ts +++ b/src/features/projects/domain/CachingProjectDataSource.ts @@ -1,22 +1,22 @@ import Project from "./Project" import IProjectDataSource from "./IProjectDataSource" -import ISessionProjectRepository from "./ISessionProjectRepository" +import IProjectRepository from "./IProjectRepository" export default class CachingProjectDataSource implements IProjectDataSource { private dataSource: IProjectDataSource - private sessionProjectRepository: ISessionProjectRepository + private repository: IProjectRepository constructor( dataSource: IProjectDataSource, - sessionProjectRepository: ISessionProjectRepository + repository: IProjectRepository ) { this.dataSource = dataSource - this.sessionProjectRepository = sessionProjectRepository + this.repository = repository } async getProjects(): Promise { const projects = await this.dataSource.getProjects() - await this.sessionProjectRepository.storeProjects(projects) + await this.repository.set(projects) return projects } } \ No newline at end of file diff --git a/src/features/projects/domain/IProjectRepository.ts b/src/features/projects/domain/IProjectRepository.ts index a123d92e..52a4af69 100644 --- a/src/features/projects/domain/IProjectRepository.ts +++ b/src/features/projects/domain/IProjectRepository.ts @@ -1,6 +1,7 @@ import Project from "./Project" export default interface IProjectRepository { - getProjects(): Promise - storeProjects(projects: Project[]): Promise + get(): Promise + set(projects: Project[]): Promise + delete(): Promise } diff --git a/src/features/projects/domain/ISessionProjectRepository.ts b/src/features/projects/domain/ISessionProjectRepository.ts deleted file mode 100644 index 055b78e7..00000000 --- a/src/features/projects/domain/ISessionProjectRepository.ts +++ /dev/null @@ -1,7 +0,0 @@ -import Project from "./Project" - -export default interface ISessionProjectRepository { - getProjects(): Promise - storeProjects(projects: Project[]): Promise - deleteProjects(): Promise -} diff --git a/src/features/projects/domain/ProjectRepository.ts b/src/features/projects/domain/ProjectRepository.ts new file mode 100644 index 00000000..356c4a53 --- /dev/null +++ b/src/features/projects/domain/ProjectRepository.ts @@ -0,0 +1,37 @@ +import ZodJSONCoder from "@/common/utils/ZodJSONCoder" +import ISession from "@/common/session/ISession" +import IUserDataRepository from "@/common/userData/IUserDataRepository" +import IProjectRepository from "./IProjectRepository" +import Project, { ProjectSchema } from "./Project" + +type Repository = IUserDataRepository + +export default class ProjectRepository implements IProjectRepository { + private readonly session: ISession + private readonly repository: Repository + + constructor(session: ISession, repository: Repository) { + this.session = session + this.repository = repository + } + + async get(): Promise { + const userId = await this.session.getUserId() + const string = await this.repository.get(userId) + if (!string) { + return undefined + } + return ZodJSONCoder.decode(ProjectSchema.array(), string) + } + + async set(projects: Project[]): Promise { + const userId = await this.session.getUserId() + const string = ZodJSONCoder.encode(ProjectSchema.array(), projects) + await this.repository.set(userId, string) + } + + async delete(): Promise { + const userId = await this.session.getUserId() + await this.repository.delete(userId) + } +} diff --git a/src/features/projects/domain/SessionProjectRepository.ts b/src/features/projects/domain/SessionProjectRepository.ts deleted file mode 100644 index 5387a3c5..00000000 --- a/src/features/projects/domain/SessionProjectRepository.ts +++ /dev/null @@ -1,29 +0,0 @@ -import ZodJSONCoder from "@/common/utils/ZodJSONCoder" -import ISessionDataRepository from "@/common/userData/ISessionDataRepository" -import ISessionProjectRepository from "./ISessionProjectRepository" -import Project, { ProjectSchema } from "./Project" - -export default class SessionProjectRepository implements ISessionProjectRepository { - private readonly repository: ISessionDataRepository - - constructor(repository: ISessionDataRepository) { - this.repository = repository - } - - async getProjects(): Promise { - const string = await this.repository.get() - if (!string) { - return undefined - } - return ZodJSONCoder.decode(ProjectSchema.array(), string) - } - - async storeProjects(projects: Project[]): Promise { - const string = ZodJSONCoder.encode(ProjectSchema.array(), projects) - await this.repository.set(string) - } - - async deleteProjects(): Promise { - await this.repository.delete() - } -} diff --git a/src/features/projects/view/ProjectsPage.tsx b/src/features/projects/view/ProjectsPage.tsx index 37c41cfe..d4369eac 100644 --- a/src/features/projects/view/ProjectsPage.tsx +++ b/src/features/projects/view/ProjectsPage.tsx @@ -1,18 +1,18 @@ -import SessionProjectRepository from "../domain/SessionProjectRepository" +import ProjectRepository from "../domain/ProjectRepository" import ClientProjectsPage from "./client/ProjectsPage" export default async function ProjectsPage({ - sessionProjectRepository, + projectRepository, projectId, versionId, specificationId }: { - sessionProjectRepository: SessionProjectRepository + projectRepository: ProjectRepository projectId?: string versionId?: string specificationId?: string }) { - const projects = await sessionProjectRepository.getProjects() + const projects = await projectRepository.get() return ( Date: Tue, 7 Nov 2023 09:08:18 +0100 Subject: [PATCH 45/53] Introduces new ILogOutHandler concept # Conflicts: # __test__/common/authHandler/logoutHandler.test.ts # src/app/api/auth/[auth0]/route.ts # src/common/authHandler/logout.ts # src/composition.ts --- __test__/auth/CompositeLogOutHandler.test.ts | 24 +++++++++++ .../auth/ErrorIgnoringLogOutHandler.test.ts | 11 +++++ .../auth/UserDataCleanUpLogOutHandler.test.ts | 16 ++++++++ .../common/authHandler/logoutHandler.test.ts | 41 ------------------- src/app/api/auth/[auth0]/route.ts | 18 ++------ src/common/authHandler/logout.ts | 12 ------ src/composition.ts | 25 +++++++---- .../domain/logOut/CompositeLogOutHandler.ts | 14 +++++++ .../logOut/ErrorIgnoringLogOutHandler.ts | 17 ++++++++ .../auth/domain/logOut/ILogOutHandler.ts | 3 ++ .../logOut/UserDataCleanUpLogOutHandler.ts | 24 +++++++++++ 11 files changed, 129 insertions(+), 76 deletions(-) create mode 100644 __test__/auth/CompositeLogOutHandler.test.ts create mode 100644 __test__/auth/ErrorIgnoringLogOutHandler.test.ts create mode 100644 __test__/auth/UserDataCleanUpLogOutHandler.test.ts delete mode 100644 __test__/common/authHandler/logoutHandler.test.ts delete mode 100644 src/common/authHandler/logout.ts create mode 100644 src/features/auth/domain/logOut/CompositeLogOutHandler.ts create mode 100644 src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler.ts create mode 100644 src/features/auth/domain/logOut/ILogOutHandler.ts create mode 100644 src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler.ts diff --git a/__test__/auth/CompositeLogOutHandler.test.ts b/__test__/auth/CompositeLogOutHandler.test.ts new file mode 100644 index 00000000..9618723c --- /dev/null +++ b/__test__/auth/CompositeLogOutHandler.test.ts @@ -0,0 +1,24 @@ +import CompositeLogOutHandler from "../../src/features/auth/domain/logOut/CompositeLogOutHandler" + +test("It invokes all log out handlers", async () => { + let didCallLogOutHandler1 = false + let didCallLogOutHandler2 = false + let didCallLogOutHandler3 = false + const sut = new CompositeLogOutHandler([{ + async handleLogOut() { + didCallLogOutHandler1 = true + } + }, { + async handleLogOut() { + didCallLogOutHandler2 = true + } + }, { + async handleLogOut() { + didCallLogOutHandler3 = true + } + }]) + await sut.handleLogOut() + expect(didCallLogOutHandler1).toBeTruthy() + expect(didCallLogOutHandler2).toBeTruthy() + expect(didCallLogOutHandler3).toBeTruthy() +}) diff --git a/__test__/auth/ErrorIgnoringLogOutHandler.test.ts b/__test__/auth/ErrorIgnoringLogOutHandler.test.ts new file mode 100644 index 00000000..5feae77c --- /dev/null +++ b/__test__/auth/ErrorIgnoringLogOutHandler.test.ts @@ -0,0 +1,11 @@ +import ErrorIgnoringLogOutHandler from "../../src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler" + +test("It ignores errors", async () => { + const sut = new ErrorIgnoringLogOutHandler({ + async handleLogOut() { + throw new Error("Mock") + } + }) + // Test will fail if the following throws. + await sut.handleLogOut() +}) diff --git a/__test__/auth/UserDataCleanUpLogOutHandler.test.ts b/__test__/auth/UserDataCleanUpLogOutHandler.test.ts new file mode 100644 index 00000000..c8db0461 --- /dev/null +++ b/__test__/auth/UserDataCleanUpLogOutHandler.test.ts @@ -0,0 +1,16 @@ +import UserDataCleanUpLogOutHandler from "../../src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler" + +test("It deletes data for the read user ID", async () => { + let deletedUserId: string | undefined + const sut = new UserDataCleanUpLogOutHandler({ + async getUserId() { + return "foo" + }, + }, { + async delete(userId) { + deletedUserId = userId + } + }) + await sut.handleLogOut() + expect(deletedUserId).toBe("foo") +}) diff --git a/__test__/common/authHandler/logoutHandler.test.ts b/__test__/common/authHandler/logoutHandler.test.ts deleted file mode 100644 index 8060eb45..00000000 --- a/__test__/common/authHandler/logoutHandler.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import logoutHandler from "../../../src/common/authHandler/logout" - -test("It deletes the user's auth token", async () => { - let didDeleteAuthToken = false - logoutHandler({ - async getOAuthToken() { - throw new Error("Not implemented") - }, - async storeOAuthToken() {}, - async deleteOAuthToken() { - didDeleteAuthToken = true - } - }, { - async get() { - return [] - }, - async set() {}, - async delete() {} - }) - expect(didDeleteAuthToken).toBeTruthy() -}) - -test("It deletes the cached projects", async () => { - let didDeleteProjects = false - logoutHandler({ - async getOAuthToken() { - throw new Error("Not implemented") - }, - async storeOAuthToken() {}, - async deleteOAuthToken() {} - }, { - async get() { - return [] - }, - async set() {}, - async delete() { - didDeleteProjects = true - } - }) - expect(didDeleteProjects).toBeTruthy() -}) diff --git a/src/app/api/auth/[auth0]/route.ts b/src/app/api/auth/[auth0]/route.ts index 072c3a9b..7819d3e1 100644 --- a/src/app/api/auth/[auth0]/route.ts +++ b/src/app/api/auth/[auth0]/route.ts @@ -1,19 +1,13 @@ -import { NextRequest, NextResponse } from "next/server" +import { NextResponse } from "next/server" import { handleAuth, handleCallback, handleLogout, AfterCallbackAppRoute, NextAppRouterHandler, - AppRouteHandlerFnContext, AppRouterOnError } from "@auth0/nextjs-auth0" -import { - initialOAuthTokenService, - sessionOAuthTokenRepository, - projectRepository, - logoutHandler -} from "@/composition" +import { logOutHandler } from "@/composition" const { SHAPE_DOCS_BASE_URL } = process.env @@ -27,12 +21,8 @@ const onError: AppRouterOnError = async () => { return NextResponse.redirect(url) } -const onLogout: NextAppRouterHandler = async (req: NextRequest, ctx: AppRouteHandlerFnContext) => { - await Promise.all([ - sessionOAuthTokenRepository.deleteOAuthToken().catch(() => null), - projectRepository.delete().catch(() => null) - ]) - await logoutHandler() +const onLogout: NextAppRouterHandler = async (req, ctx) => { + await logOutHandler.handleLogOut() return await handleLogout(req, ctx) } diff --git a/src/common/authHandler/logout.ts b/src/common/authHandler/logout.ts deleted file mode 100644 index 34d9a611..00000000 --- a/src/common/authHandler/logout.ts +++ /dev/null @@ -1,12 +0,0 @@ -import ISessionOAuthTokenRepository from "@/features/auth/domain/ISessionOAuthTokenRepository" -import IProjectRepository from "@/features/projects/domain/IProjectRepository" - -export default async function logoutHandler( - sessionOAuthTokenRepository: ISessionOAuthTokenRepository, - projectRepository: IProjectRepository -) { - await Promise.all([ - sessionOAuthTokenRepository.deleteOAuthToken().catch(() => null), - projectRepository.delete().catch(() => null) - ]) -} diff --git a/src/composition.ts b/src/composition.ts index b464ff06..da37527b 100644 --- a/src/composition.ts +++ b/src/composition.ts @@ -2,6 +2,8 @@ import AccessTokenRefreshingGitHubClient from "@/common/github/AccessTokenRefres import Auth0RefreshTokenReader from "@/features/auth/data/Auth0RefreshTokenReader" import Auth0Session from "@/common/session/Auth0Session" import CachingProjectDataSource from "@/features/projects/domain/CachingProjectDataSource" +import CompositeLogOutHandler from "@/features/auth/domain/logOut/CompositeLogOutHandler" +import ErrorIgnoringLogOutHandler from "@/features/auth/domain/logOut/ErrorIgnoringLogOutHandler" import GitHubClient from "@/common/github/GitHubClient" import GitHubOAuthTokenRefresher from "@/features/auth/data/GitHubOAuthTokenRefresher" import GitHubOrganizationSessionValidator from "@/common/session/GitHubOrganizationSessionValidator" @@ -18,7 +20,7 @@ import SessionMutexFactory from "@/common/mutex/SessionMutexFactory" import SessionOAuthTokenRepository from "@/features/auth/domain/SessionOAuthTokenRepository" import SessionValidatingProjectDataSource from "@/features/projects/domain/SessionValidatingProjectDataSource" import OAuthTokenRepository from "@/features/auth/domain/OAuthTokenRepository" -import authLogoutHandler from "@/common/authHandler/logout" +import UserDataCleanUpLogOutHandler from "@/features/auth/domain/logOut/UserDataCleanUpLogOutHandler" const { AUTH0_MANAGEMENT_DOMAIN, @@ -77,12 +79,14 @@ export const sessionValidator = new GitHubOrganizationSessionValidator( GITHUB_ORGANIZATION_NAME ) +const projectUserDataRepository = new KeyValueUserDataRepository( + new RedisKeyValueStore(REDIS_URL), + "projects" +) + export const projectRepository = new ProjectRepository( - new Auth0Session(), - new KeyValueUserDataRepository( - new RedisKeyValueStore(REDIS_URL), - "projects" - ) + session, + projectUserDataRepository ) export const projectDataSource = new CachingProjectDataSource( @@ -107,6 +111,9 @@ export const initialOAuthTokenService = new InitialOAuthTokenService({ oAuthTokenRepository: new OAuthTokenRepository(oAuthTokenRepository) }) -export const logoutHandler = async () => { - await authLogoutHandler(sessionOAuthTokenRepository, projectRepository) -} +export const logOutHandler = new ErrorIgnoringLogOutHandler( + new CompositeLogOutHandler([ + new UserDataCleanUpLogOutHandler(session, projectUserDataRepository), + new UserDataCleanUpLogOutHandler(session, oAuthTokenRepository) + ]) +) diff --git a/src/features/auth/domain/logOut/CompositeLogOutHandler.ts b/src/features/auth/domain/logOut/CompositeLogOutHandler.ts new file mode 100644 index 00000000..ab69b11a --- /dev/null +++ b/src/features/auth/domain/logOut/CompositeLogOutHandler.ts @@ -0,0 +1,14 @@ +import ILogOutHandler from "./ILogOutHandler" + +export default class CompositeLogOutHandler implements ILogOutHandler { + private readonly handlers: ILogOutHandler[] + + constructor(handlers: ILogOutHandler[]) { + this.handlers = handlers + } + + async handleLogOut(): Promise { + const promises = this.handlers.map(e => e.handleLogOut()) + await Promise.all(promises) + } +} diff --git a/src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler.ts b/src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler.ts new file mode 100644 index 00000000..bf33710e --- /dev/null +++ b/src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler.ts @@ -0,0 +1,17 @@ +import ILogOutHandler from "./ILogOutHandler" + +export default class ErrorIgnoringLogOutHandler implements ILogOutHandler { + private readonly handler: ILogOutHandler + + constructor(handler: ILogOutHandler) { + this.handler = handler + } + + async handleLogOut(): Promise { + try { + await this.handler.handleLogOut() + } catch { + // We intentionally do not handle errors. + } + } +} diff --git a/src/features/auth/domain/logOut/ILogOutHandler.ts b/src/features/auth/domain/logOut/ILogOutHandler.ts new file mode 100644 index 00000000..88cab6ac --- /dev/null +++ b/src/features/auth/domain/logOut/ILogOutHandler.ts @@ -0,0 +1,3 @@ +export default interface ILogOutHandler { + handleLogOut(): Promise +} diff --git a/src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler.ts b/src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler.ts new file mode 100644 index 00000000..08f724e2 --- /dev/null +++ b/src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler.ts @@ -0,0 +1,24 @@ +import ILogOutHandler from "./ILogOutHandler" + +interface IUserIDReader { + getUserId(): Promise +} + +interface Repository { + delete(userId: string): Promise +} + +export default class UserDataCleanUpLogOutHandler implements ILogOutHandler { + private readonly userIdReader: IUserIDReader + private readonly repository: Repository + + constructor(userIdReader: IUserIDReader, repository: Repository) { + this.userIdReader = userIdReader + this.repository = repository + } + + async handleLogOut(): Promise { + const userId = await this.userIdReader.getUserId() + return await this.repository.delete(userId) + } +} From bc3a5f100e28532d9c6b841d3fe81a99ac539e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Tue, 7 Nov 2023 09:24:49 +0100 Subject: [PATCH 46/53] Fixes compile errors after merge --- src/app/api/auth/[auth0]/route.ts | 2 +- src/composition.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/api/auth/[auth0]/route.ts b/src/app/api/auth/[auth0]/route.ts index 7819d3e1..b8e11a5e 100644 --- a/src/app/api/auth/[auth0]/route.ts +++ b/src/app/api/auth/[auth0]/route.ts @@ -7,7 +7,7 @@ import { NextAppRouterHandler, AppRouterOnError } from "@auth0/nextjs-auth0" -import { logOutHandler } from "@/composition" +import { initialOAuthTokenService, logOutHandler } from "@/composition" const { SHAPE_DOCS_BASE_URL } = process.env diff --git a/src/composition.ts b/src/composition.ts index da37527b..af57ee2f 100644 --- a/src/composition.ts +++ b/src/composition.ts @@ -36,13 +36,15 @@ const { const gitHubPrivateKey = Buffer.from(GITHUB_PRIVATE_KEY_BASE_64, "base64").toString("utf-8") +const session = new Auth0Session() + const oAuthTokenRepository = new KeyValueUserDataRepository( new RedisKeyValueStore(REDIS_URL), "authToken" ) export const sessionOAuthTokenRepository = new SessionOAuthTokenRepository( - new SessionDataRepository(new Auth0Session(), oAuthTokenRepository) + new SessionDataRepository(session, oAuthTokenRepository) ) const gitHubOAuthTokenRefresher = new GitHubOAuthTokenRefresher({ @@ -57,7 +59,7 @@ export const gitHubClient = new AccessTokenRefreshingGitHubClient( new LockingAccessTokenRefresher( new SessionMutexFactory( new RedisKeyedMutexFactory(REDIS_URL), - new Auth0Session(), + session, "mutexAccessToken" ), sessionOAuthTokenRepository, From ba49088d8cf49a62e11e6476e42e4e92419f5d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Tue, 7 Nov 2023 11:00:48 +0100 Subject: [PATCH 47/53] Adds IAccessTokenService --- .../auth/LockingAccessTokenService.test.ts | 91 ++++++++++++ .../auth/LockingOAuthTokenRefresher.test.ts | 131 ------------------ __test__/auth/OAuthTokenRepository.test.ts | 57 ++++++++ ...yStaleRefreshingAccessTokenService.test.ts | 46 ++++++ .../auth/SessionOAuthTokenRepository.test.ts | 54 -------- .../AccessTokenRefreshingGitHubClient.test.ts | 21 +-- .../AccessTokenRefreshingGitHubClient.ts | 18 +-- .../auth/data/Auth0RefreshTokenReader.ts | 11 +- .../auth/data/GitHubOAuthTokenRefresher.ts | 4 +- .../auth/domain/IAccessTokenRefresher.ts | 3 - .../auth/domain/IOAuthTokenRepository.ts | 7 - .../auth/domain/IRefreshTokenReader.ts | 3 - .../domain/ISessionOAuthTokenRepository.ts | 7 - .../domain/LockingAccessTokenRefresher.ts | 35 ----- .../auth/domain/OAuthTokenTransferer.ts | 23 --- .../auth/domain/SessionAccessTokenReader.ts | 14 -- .../domain/SessionOAuthTokenRepository.ts | 30 ---- .../domain/accessToken/IAccessTokenService.ts | 4 + .../accessToken/LockingAccessTokenService.ts | 27 ++++ .../OnlyStaleRefreshingAccessTokenService.ts | 23 +++ .../{ => oAuthToken}/IOAuthTokenRefresher.ts | 0 .../oAuthToken/IOAuthTokenRepository.ts | 7 + .../domain/{ => oAuthToken}/OAuthToken.ts | 0 .../{ => oAuthToken}/OAuthTokenRepository.ts | 10 +- 24 files changed, 280 insertions(+), 346 deletions(-) create mode 100644 __test__/auth/LockingAccessTokenService.test.ts delete mode 100644 __test__/auth/LockingOAuthTokenRefresher.test.ts create mode 100644 __test__/auth/OAuthTokenRepository.test.ts create mode 100644 __test__/auth/OnlyStaleRefreshingAccessTokenService.test.ts delete mode 100644 __test__/auth/SessionOAuthTokenRepository.test.ts delete mode 100644 src/features/auth/domain/IAccessTokenRefresher.ts delete mode 100644 src/features/auth/domain/IOAuthTokenRepository.ts delete mode 100644 src/features/auth/domain/IRefreshTokenReader.ts delete mode 100644 src/features/auth/domain/ISessionOAuthTokenRepository.ts delete mode 100644 src/features/auth/domain/LockingAccessTokenRefresher.ts delete mode 100644 src/features/auth/domain/OAuthTokenTransferer.ts delete mode 100644 src/features/auth/domain/SessionAccessTokenReader.ts delete mode 100644 src/features/auth/domain/SessionOAuthTokenRepository.ts create mode 100644 src/features/auth/domain/accessToken/IAccessTokenService.ts create mode 100644 src/features/auth/domain/accessToken/LockingAccessTokenService.ts create mode 100644 src/features/auth/domain/accessToken/OnlyStaleRefreshingAccessTokenService.ts rename src/features/auth/domain/{ => oAuthToken}/IOAuthTokenRefresher.ts (100%) create mode 100644 src/features/auth/domain/oAuthToken/IOAuthTokenRepository.ts rename src/features/auth/domain/{ => oAuthToken}/OAuthToken.ts (100%) rename src/features/auth/domain/{ => oAuthToken}/OAuthTokenRepository.ts (73%) diff --git a/__test__/auth/LockingAccessTokenService.test.ts b/__test__/auth/LockingAccessTokenService.test.ts new file mode 100644 index 00000000..28dad317 --- /dev/null +++ b/__test__/auth/LockingAccessTokenService.test.ts @@ -0,0 +1,91 @@ +import LockingAccessTokenService from "../../src/features/auth/domain/accessToken/LockingAccessTokenService" + +test("It reads access token", async () => { + let didReadAccessToken = false + const sut = new LockingAccessTokenService({ + async makeMutex() { + return { + async acquire() {}, + async release() {} + } + } + }, { + async getAccessToken() { + didReadAccessToken = true + return "foo" + }, + async refreshAccessToken() { + return "foo" + } + }) + await sut.getAccessToken() + expect(didReadAccessToken).toBeTruthy() +}) + +test("It acquires a lock", async () => { + let didAcquireLock = false + const sut = new LockingAccessTokenService({ + async makeMutex() { + return { + async acquire() { + didAcquireLock = true + }, + async release() {} + } + } + }, { + async getAccessToken() { + return "foo" + }, + async refreshAccessToken() { + return "foo" + } + }) + await sut.refreshAccessToken("bar") + expect(didAcquireLock).toBeTruthy() +}) + +test("It releases the acquired lock", async () => { + let didReleaseLock = false + const sut = new LockingAccessTokenService({ + async makeMutex() { + return { + async acquire() {}, + async release() { + didReleaseLock = true + } + } + } + }, { + async getAccessToken() { + return "foo" + }, + async refreshAccessToken() { + return "foo" + } + }) + await sut.refreshAccessToken("bar") + expect(didReleaseLock).toBeTruthy() +}) + +test("It refreshes access token", async () => { + let didRefreshAccessToken = false + const sut = new LockingAccessTokenService({ + async makeMutex() { + return { + async acquire() {}, + async release() {} + } + } + }, { + async getAccessToken() { + return "foo" + }, + async refreshAccessToken() { + didRefreshAccessToken = true + return "foo" + } + }) + await sut.refreshAccessToken("foo") + expect(didRefreshAccessToken).toBeTruthy() +}) diff --git a/__test__/auth/LockingOAuthTokenRefresher.test.ts b/__test__/auth/LockingOAuthTokenRefresher.test.ts deleted file mode 100644 index 6ba65f2b..00000000 --- a/__test__/auth/LockingOAuthTokenRefresher.test.ts +++ /dev/null @@ -1,131 +0,0 @@ -import LockingAccessTokenRefresher from "../../src/features/auth/domain/LockingAccessTokenRefresher" -import OAuthToken from "../../src/features/auth/domain/OAuthToken" - -test("It acquires a lock", async () => { - let didAcquireLock = false - const sut = new LockingAccessTokenRefresher({ - async makeMutex() { - return { - async acquire() { - didAcquireLock = true - }, - async release() {} - } - } - }, { - async getOAuthToken() { - return { accessToken: "foo", refreshToken: "bar" } - }, - async storeOAuthToken() {}, - async deleteOAuthToken() {} - }, { - async refreshOAuthToken() { - return { accessToken: "foo", refreshToken: "bar" } - } - }) - await sut.refreshAccessToken("bar") - expect(didAcquireLock).toBeTruthy() -}) - -test("It releases the acquired lock", async () => { - let didReleaseLock = false - const sut = new LockingAccessTokenRefresher({ - async makeMutex() { - return { - async acquire() {}, - async release() { - didReleaseLock = true - } - } - } - }, { - async getOAuthToken() { - return { accessToken: "foo", refreshToken: "bar" } - }, - async storeOAuthToken() {}, - async deleteOAuthToken() {} - }, { - async refreshOAuthToken() { - return { accessToken: "foo", refreshToken: "bar" } - } - }) - await sut.refreshAccessToken("bar") - expect(didReleaseLock).toBeTruthy() -}) - -test("It refreshes the access token when the input access token matches the stored access token", async () => { - let didRefreshAccessToken = false - const sut = new LockingAccessTokenRefresher({ - async makeMutex() { - return { - async acquire() {}, - async release() {} - } - } - }, { - async getOAuthToken() { - return { accessToken: "foo", refreshToken: "bar" } - }, - async storeOAuthToken() {}, - async deleteOAuthToken() {} - }, { - async refreshOAuthToken() { - didRefreshAccessToken = true - return { accessToken: "foo", refreshToken: "bar" } - } - }) - await sut.refreshAccessToken("foo") - expect(didRefreshAccessToken).toBeTruthy() -}) - -test("It skips refreshing the access token when the input access token is not equal to the stored access token", async () => { - let didRefreshAccessToken = false - const sut = new LockingAccessTokenRefresher({ - async makeMutex() { - return { - async acquire() {}, - async release() {} - } - } - }, { - async getOAuthToken() { - return { accessToken: "new", refreshToken: "bar" } - }, - async storeOAuthToken() {}, - async deleteOAuthToken() {} - }, { - async refreshOAuthToken() { - didRefreshAccessToken = true - return { accessToken: "foo", refreshToken: "bar" } - } - }) - await sut.refreshAccessToken("outdated") - expect(didRefreshAccessToken).toBeFalsy() -}) - -test("It stores the refreshed tokens", async () => { - let storedToken: OAuthToken | undefined - const sut = new LockingAccessTokenRefresher({ - async makeMutex() { - return { - async acquire() {}, - async release() {} - } - } - }, { - async getOAuthToken() { - return { accessToken: "foo", refreshToken: "bar" } - }, - async storeOAuthToken(token) { - storedToken = token - }, - async deleteOAuthToken() {} - }, { - async refreshOAuthToken() { - return { accessToken: "newAccessToken", refreshToken: "newRefreshToken" } - } - }) - await sut.refreshAccessToken("foo") - expect(storedToken?.accessToken).toEqual("newAccessToken") - expect(storedToken?.refreshToken).toEqual("newRefreshToken") -}) diff --git a/__test__/auth/OAuthTokenRepository.test.ts b/__test__/auth/OAuthTokenRepository.test.ts new file mode 100644 index 00000000..3894338e --- /dev/null +++ b/__test__/auth/OAuthTokenRepository.test.ts @@ -0,0 +1,57 @@ +import OAuthTokenRepository from "../../src/features/auth/domain/oAuthToken/OAuthTokenRepository" + +test("It reads the auth token for the specified user", async () => { + let readUserId: string | undefined + const sut = new OAuthTokenRepository({ + async get(userId) { + readUserId = userId + return JSON.stringify({ + accessToken: "foo", + refreshToken: "bar" + }) + }, + async set() {}, + async delete() {} + }) + await sut.get("1234") + expect(readUserId).toBe("1234") +}) + +test("It stores the auth token for the specified user", async () => { + let storedUserId: string | undefined + let storedJSON: any | undefined + const sut = new OAuthTokenRepository({ + async get() { + return "" + }, + async set(userId, data) { + storedUserId = userId + storedJSON = data + }, + async delete() {} + }) + const authToken = { + accessToken: "foo", + refreshToken: "bar" + } + await sut.set("1234", authToken) + const storedObj = JSON.parse(storedJSON) + expect(storedUserId).toBe("1234") + expect(storedObj.accessToken).toBe(authToken.accessToken) + expect(storedObj.refreshToken).toBe(authToken.refreshToken) +}) + +test("It deletes the auth token for the specified user", async () => { + let deletedUserId: string | undefined + const sut = new OAuthTokenRepository({ + async get() { + return "" + }, + async set() {}, + async delete(userId) { + deletedUserId = userId + } + }) + await sut.delete("1234") + expect(deletedUserId).toBe("1234") +}) diff --git a/__test__/auth/OnlyStaleRefreshingAccessTokenService.test.ts b/__test__/auth/OnlyStaleRefreshingAccessTokenService.test.ts new file mode 100644 index 00000000..016d224d --- /dev/null +++ b/__test__/auth/OnlyStaleRefreshingAccessTokenService.test.ts @@ -0,0 +1,46 @@ +import OnlyStaleRefreshingAccessTokenService from "../../src/features/auth/domain/accessToken/OnlyStaleRefreshingAccessTokenService" + +test("It refreshes the access token when the input access token is equal to the stored access token", async () => { + let didRefreshAccessToken = false + const sut = new OnlyStaleRefreshingAccessTokenService({ + async getAccessToken() { + return "foo" + }, + async refreshAccessToken() { + didRefreshAccessToken = true + return "foo" + } + }) + await sut.refreshAccessToken("foo") + expect(didRefreshAccessToken).toBeTruthy() +}) + +test("It skips refreshing the access token when the input access token is not equal to the stored access token", async () => { + let didRefreshAccessToken = false + const sut = new OnlyStaleRefreshingAccessTokenService({ + async getAccessToken() { + return "foo" + }, + async refreshAccessToken() { + didRefreshAccessToken = true + return "foo" + } + }) + await sut.refreshAccessToken("outdated") + expect(didRefreshAccessToken).toBeFalsy() +}) + +test("It reads access token", async () => { + let didReadAccessToken = false + const sut = new OnlyStaleRefreshingAccessTokenService({ + async getAccessToken() { + didReadAccessToken = true + return "foo" + }, + async refreshAccessToken() { + return "foo" + } + }) + await sut.getAccessToken() + expect(didReadAccessToken).toBeTruthy() +}) \ No newline at end of file diff --git a/__test__/auth/SessionOAuthTokenRepository.test.ts b/__test__/auth/SessionOAuthTokenRepository.test.ts deleted file mode 100644 index 573ac459..00000000 --- a/__test__/auth/SessionOAuthTokenRepository.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -import SessionOAuthTokenRepository from "../../src/features/auth/domain/SessionOAuthTokenRepository" - -test("It reads the auth token", async () => { - let didRead = false - const sut = new SessionOAuthTokenRepository({ - async get() { - didRead = true - return JSON.stringify({ - accessToken: "foo", - refreshToken: "bar" - }) - }, - async set() {}, - async delete() {} - }) - await sut.getOAuthToken() - expect(didRead).toBeTruthy() -}) - -test("It stores the auth token", async () => { - let storedJSON: any | undefined - const sut = new SessionOAuthTokenRepository({ - async get() { - return "" - }, - async set(data) { - storedJSON = data - }, - async delete() {} - }) - const authToken = { - accessToken: "foo", - refreshToken: "bar" - } - await sut.storeOAuthToken(authToken) - const storedObj = JSON.parse(storedJSON) - expect(storedObj.accessToken).toBe(authToken.accessToken) - expect(storedObj.refreshToken).toBe(authToken.refreshToken) -}) - -test("It deletes the auth token", async () => { - let didDelete = false - const sut = new SessionOAuthTokenRepository({ - async get() { - return "" - }, - async set() {}, - async delete() { - didDelete = true - } - }) - await sut.deleteOAuthToken() - expect(didDelete).toBeTruthy() -}) diff --git a/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts b/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts index 7913e1c3..59b667b4 100644 --- a/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts +++ b/__test__/common/github/AccessTokenRefreshingGitHubClient.test.ts @@ -11,8 +11,7 @@ test("It forwards a GraphQL request", async () => { const sut = new AccessTokenRefreshingGitHubClient({ async getAccessToken() { return "foo" - } - }, { + }, async refreshAccessToken() { return "foo" } @@ -45,8 +44,7 @@ test("It forwards a request to get the repository content", async () => { const sut = new AccessTokenRefreshingGitHubClient({ async getAccessToken() { return "foo" - } - }, { + }, async refreshAccessToken() { return "foo" } @@ -81,8 +79,7 @@ test("It forwards a request to get comments to a pull request", async () => { const sut = new AccessTokenRefreshingGitHubClient({ async getAccessToken() { return "foo" - } - }, { + }, async refreshAccessToken() { return "foo" } @@ -117,8 +114,7 @@ test("It forwards a request to add a comment to a pull request", async () => { const sut = new AccessTokenRefreshingGitHubClient({ async getAccessToken() { return "foo" - } - }, { + }, async refreshAccessToken() { return "foo" } @@ -156,8 +152,7 @@ test("It retries with a refreshed access token when receiving HTTP 401", async ( const sut = new AccessTokenRefreshingGitHubClient({ async getAccessToken() { return "foo" - } - }, { + }, async refreshAccessToken() { didRefreshAccessToken = true return "foo" @@ -194,8 +189,7 @@ test("It only retries a request once when receiving HTTP 401", async () => { const sut = new AccessTokenRefreshingGitHubClient({ async getAccessToken() { return "foo" - } - }, { + }, async refreshAccessToken() { return "foo" } @@ -232,8 +226,7 @@ test("It does not refresh an access token when the initial request was successfu const sut = new AccessTokenRefreshingGitHubClient({ async getAccessToken() { return "foo" - } - }, { + }, async refreshAccessToken() { return "foo" } diff --git a/src/common/github/AccessTokenRefreshingGitHubClient.ts b/src/common/github/AccessTokenRefreshingGitHubClient.ts index e5e4a9e7..4a250d5c 100644 --- a/src/common/github/AccessTokenRefreshingGitHubClient.ts +++ b/src/common/github/AccessTokenRefreshingGitHubClient.ts @@ -15,26 +15,20 @@ const HttpErrorSchema = z.object({ status: z.number() }) -interface IGitHubAccessTokenReader { +interface IGitHubAccessTokenService { getAccessToken(): Promise -} - -interface IGitHubAccessTokenRefresher { refreshAccessToken(accessToken: string): Promise } export default class AccessTokenRefreshingGitHubClient implements IGitHubClient { - private readonly accessTokenReader: IGitHubAccessTokenReader - private readonly accessTokenRefresher: IGitHubAccessTokenRefresher + private readonly accessTokenService: IGitHubAccessTokenService private readonly gitHubClient: IGitHubClient constructor( - accessTokenReader: IGitHubAccessTokenReader, - accessTokenRefresher: IGitHubAccessTokenRefresher, + accessTokenService: IGitHubAccessTokenService, gitHubClient: IGitHubClient ) { - this.accessTokenReader = accessTokenReader - this.accessTokenRefresher = accessTokenRefresher + this.accessTokenService = accessTokenService this.gitHubClient = gitHubClient } @@ -71,7 +65,7 @@ export default class AccessTokenRefreshingGitHubClient implements IGitHubClient } private async send(fn: () => Promise): Promise { - const accessToken = await this.accessTokenReader.getAccessToken() + const accessToken = await this.accessTokenService.getAccessToken() try { return await fn() } catch (e) { @@ -79,7 +73,7 @@ export default class AccessTokenRefreshingGitHubClient implements IGitHubClient const error = HttpErrorSchema.parse(e) if (error.status == 401) { // Refresh access token and try the request one last time. - await this.accessTokenRefresher.refreshAccessToken(accessToken) + await this.accessTokenService.refreshAccessToken(accessToken) return await fn() } else { // Not an error we can handle so forward it. diff --git a/src/features/auth/data/Auth0RefreshTokenReader.ts b/src/features/auth/data/Auth0RefreshTokenReader.ts index 79fd6bfb..642aebc2 100644 --- a/src/features/auth/data/Auth0RefreshTokenReader.ts +++ b/src/features/auth/data/Auth0RefreshTokenReader.ts @@ -1,15 +1,14 @@ import { ManagementClient } from "auth0" import { UnauthorizedError } from "@/common/errors" -import IRefreshTokenReader from "../domain/IRefreshTokenReader" interface Auth0RefreshTokenReaderConfig { - domain: string - clientId: string - clientSecret: string - connection: string + readonly domain: string + readonly clientId: string + readonly clientSecret: string + readonly connection: string } -export default class Auth0RefreshTokenReader implements IRefreshTokenReader { +export default class Auth0RefreshTokenReader { private readonly managementClient: ManagementClient private readonly connection: string diff --git a/src/features/auth/data/GitHubOAuthTokenRefresher.ts b/src/features/auth/data/GitHubOAuthTokenRefresher.ts index d5e88607..255e8d13 100644 --- a/src/features/auth/data/GitHubOAuthTokenRefresher.ts +++ b/src/features/auth/data/GitHubOAuthTokenRefresher.ts @@ -1,6 +1,6 @@ import { UnauthorizedError } from "@/common/errors" -import OAuthToken from "../domain/OAuthToken" -import IOAuthTokenRefresher from "../domain/IOAuthTokenRefresher" +import OAuthToken from "../domain/oAuthToken/OAuthToken" +import IOAuthTokenRefresher from "../domain/oAuthToken/IOAuthTokenRefresher" export interface GitHubOAuthTokenRefresherConfig { readonly clientId: string diff --git a/src/features/auth/domain/IAccessTokenRefresher.ts b/src/features/auth/domain/IAccessTokenRefresher.ts deleted file mode 100644 index 3e1da196..00000000 --- a/src/features/auth/domain/IAccessTokenRefresher.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default interface IAccessTokenRefresher { - refreshAccessToken(accessToken: string): Promise -} diff --git a/src/features/auth/domain/IOAuthTokenRepository.ts b/src/features/auth/domain/IOAuthTokenRepository.ts deleted file mode 100644 index ddee24f3..00000000 --- a/src/features/auth/domain/IOAuthTokenRepository.ts +++ /dev/null @@ -1,7 +0,0 @@ -import OAuthToken from "./OAuthToken" - -export default interface IOAuthTokenRepository { - getOAuthToken(userId: string): Promise - storeOAuthToken(userId: string, token: OAuthToken): Promise - deleteOAuthToken(userId: string): Promise -} diff --git a/src/features/auth/domain/IRefreshTokenReader.ts b/src/features/auth/domain/IRefreshTokenReader.ts deleted file mode 100644 index 4c10f9d6..00000000 --- a/src/features/auth/domain/IRefreshTokenReader.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default interface IRefreshTokenReader { - getRefreshToken(userId: string): Promise -} diff --git a/src/features/auth/domain/ISessionOAuthTokenRepository.ts b/src/features/auth/domain/ISessionOAuthTokenRepository.ts deleted file mode 100644 index 8b195c60..00000000 --- a/src/features/auth/domain/ISessionOAuthTokenRepository.ts +++ /dev/null @@ -1,7 +0,0 @@ -import OAuthToken from "./OAuthToken" - -export default interface ISessionOAuthTokenRepository { - getOAuthToken(): Promise - storeOAuthToken(token: OAuthToken): Promise - deleteOAuthToken(): Promise -} diff --git a/src/features/auth/domain/LockingAccessTokenRefresher.ts b/src/features/auth/domain/LockingAccessTokenRefresher.ts deleted file mode 100644 index 309918f2..00000000 --- a/src/features/auth/domain/LockingAccessTokenRefresher.ts +++ /dev/null @@ -1,35 +0,0 @@ -import IMutexFactory from "@/common/mutex/IMutexFactory" -import IAccessTokenRefresher from "./IAccessTokenRefresher" -import IOAuthTokenRefresher from "./IOAuthTokenRefresher" -import ISessionOAuthTokenRepository from "./ISessionOAuthTokenRepository" -import withMutex from "../../../common/mutex/withMutex" - -export default class LockingAccessTokenRefresher implements IAccessTokenRefresher { - private readonly mutexFactory: IMutexFactory - private readonly tokenRepository: ISessionOAuthTokenRepository - private readonly tokenRefresher: IOAuthTokenRefresher - - constructor( - mutexFactory: IMutexFactory, - tokenRepository: ISessionOAuthTokenRepository, - tokenRefresher: IOAuthTokenRefresher - ) { - this.mutexFactory = mutexFactory - this.tokenRepository = tokenRepository - this.tokenRefresher = tokenRefresher - } - - async refreshAccessToken(accessToken: string): Promise { - const mutex = await this.mutexFactory.makeMutex() - return await withMutex(mutex, async () => { - const authToken = await this.tokenRepository.getOAuthToken() - if (accessToken != authToken.accessToken) { - // Given access token is outdated so we use our current access token. - return authToken.accessToken - } - const refreshResult = await this.tokenRefresher.refreshOAuthToken(authToken.refreshToken) - await this.tokenRepository.storeOAuthToken(refreshResult) - return refreshResult.accessToken - }) - } -} diff --git a/src/features/auth/domain/OAuthTokenTransferer.ts b/src/features/auth/domain/OAuthTokenTransferer.ts deleted file mode 100644 index 27189b39..00000000 --- a/src/features/auth/domain/OAuthTokenTransferer.ts +++ /dev/null @@ -1,23 +0,0 @@ -import IRefreshTokenReader from "./IRefreshTokenReader" -import IOAuthTokenRefresher from "./IOAuthTokenRefresher" -import IOAuthTokenRepository from "./IOAuthTokenRepository" - -type OAuthTokenTransfererConfig = { - readonly refreshTokenReader: IRefreshTokenReader - readonly oAuthTokenRefresher: IOAuthTokenRefresher - readonly oAuthTokenRepository: IOAuthTokenRepository -} - -export default class OAuthTokenTransferer { - private readonly config: OAuthTokenTransfererConfig - - constructor(config: OAuthTokenTransfererConfig) { - this.config = config - } - - async transferAuthTokenForUser(userId: string): Promise { - const refreshToken = await this.config.refreshTokenReader.getRefreshToken(userId) - const authToken = await this.config.oAuthTokenRefresher.refreshOAuthToken(refreshToken) - this.config.oAuthTokenRepository.storeOAuthToken(userId, authToken) - } -} diff --git a/src/features/auth/domain/SessionAccessTokenReader.ts b/src/features/auth/domain/SessionAccessTokenReader.ts deleted file mode 100644 index e7d05dcc..00000000 --- a/src/features/auth/domain/SessionAccessTokenReader.ts +++ /dev/null @@ -1,14 +0,0 @@ -import ISessionOAuthTokenRepository from "./ISessionOAuthTokenRepository" - -export default class AccessTokenReader { - private readonly oAuthTokenRepository: ISessionOAuthTokenRepository - - constructor(oAuthTokenRepository: ISessionOAuthTokenRepository) { - this.oAuthTokenRepository = oAuthTokenRepository - } - - async getAccessToken(): Promise { - const authToken = await this.oAuthTokenRepository.getOAuthToken() - return authToken.accessToken - } -} diff --git a/src/features/auth/domain/SessionOAuthTokenRepository.ts b/src/features/auth/domain/SessionOAuthTokenRepository.ts deleted file mode 100644 index 2f5d0905..00000000 --- a/src/features/auth/domain/SessionOAuthTokenRepository.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { UnauthorizedError } from "../../../common/errors" -import ZodJSONCoder from "../../../common/utils/ZodJSONCoder" -import ISessionDataRepository from "@/common/userData/ISessionDataRepository" -import ISessionOAuthTokenRepository from "./SessionOAuthTokenRepository" -import OAuthToken, { OAuthTokenSchema } from "./OAuthToken" - -export default class SessionOAuthTokenRepository implements ISessionOAuthTokenRepository { - private readonly repository: ISessionDataRepository - - constructor(repository: ISessionDataRepository) { - this.repository = repository - } - - async getOAuthToken(): Promise { - const string = await this.repository.get() - if (!string) { - throw new UnauthorizedError(`No OAuthToken stored for user.`) - } - return ZodJSONCoder.decode(OAuthTokenSchema, string) - } - - async storeOAuthToken(token: OAuthToken): Promise { - const string = ZodJSONCoder.encode(OAuthTokenSchema, token) - await this.repository.set(string) - } - - async deleteOAuthToken(): Promise { - await this.repository.delete() - } -} diff --git a/src/features/auth/domain/accessToken/IAccessTokenService.ts b/src/features/auth/domain/accessToken/IAccessTokenService.ts new file mode 100644 index 00000000..579211c1 --- /dev/null +++ b/src/features/auth/domain/accessToken/IAccessTokenService.ts @@ -0,0 +1,4 @@ +export default interface IAccessTokenService { + getAccessToken(): Promise + refreshAccessToken(accessToken: string): Promise +} diff --git a/src/features/auth/domain/accessToken/LockingAccessTokenService.ts b/src/features/auth/domain/accessToken/LockingAccessTokenService.ts new file mode 100644 index 00000000..cda75ecf --- /dev/null +++ b/src/features/auth/domain/accessToken/LockingAccessTokenService.ts @@ -0,0 +1,27 @@ +import IMutexFactory from "@/common/mutex/IMutexFactory" +import IAccessTokenService from "./IAccessTokenService" +import withMutex from "../../../../common/mutex/withMutex" + +export default class LockingAccessTokenService implements IAccessTokenService { + private readonly mutexFactory: IMutexFactory + private readonly accessTokenService: IAccessTokenService + + constructor( + mutexFactory: IMutexFactory, + accessTokenService: IAccessTokenService + ) { + this.mutexFactory = mutexFactory + this.accessTokenService = accessTokenService + } + + async getAccessToken(): Promise { + return await this.accessTokenService.getAccessToken() + } + + async refreshAccessToken(accessToken: string): Promise { + const mutex = await this.mutexFactory.makeMutex() + return await withMutex(mutex, async () => { + return await this.accessTokenService.refreshAccessToken(accessToken) + }) + } +} diff --git a/src/features/auth/domain/accessToken/OnlyStaleRefreshingAccessTokenService.ts b/src/features/auth/domain/accessToken/OnlyStaleRefreshingAccessTokenService.ts new file mode 100644 index 00000000..9b3aabce --- /dev/null +++ b/src/features/auth/domain/accessToken/OnlyStaleRefreshingAccessTokenService.ts @@ -0,0 +1,23 @@ +import IAccessTokenService from "./IAccessTokenService" + +export default class OnlyStaleRefreshingAccessTokenService implements IAccessTokenService { + private readonly service: IAccessTokenService + + constructor(service: IAccessTokenService) { + this.service = service + } + + async getAccessToken(): Promise { + return await this.service.getAccessToken() + } + + async refreshAccessToken(accessToken: string): Promise { + const storedAccessToken = await this.getAccessToken() + if (accessToken != storedAccessToken) { + // Given access token is outdated so we use our stored access token. + return storedAccessToken + } + // Given access token is stale so we refresh it. + return await this.service.refreshAccessToken(accessToken) + } +} \ No newline at end of file diff --git a/src/features/auth/domain/IOAuthTokenRefresher.ts b/src/features/auth/domain/oAuthToken/IOAuthTokenRefresher.ts similarity index 100% rename from src/features/auth/domain/IOAuthTokenRefresher.ts rename to src/features/auth/domain/oAuthToken/IOAuthTokenRefresher.ts diff --git a/src/features/auth/domain/oAuthToken/IOAuthTokenRepository.ts b/src/features/auth/domain/oAuthToken/IOAuthTokenRepository.ts new file mode 100644 index 00000000..745a68c4 --- /dev/null +++ b/src/features/auth/domain/oAuthToken/IOAuthTokenRepository.ts @@ -0,0 +1,7 @@ +import OAuthToken from "./OAuthToken" + +export default interface IOAuthTokenRepository { + get(userId: string): Promise + set(userId: string, token: OAuthToken): Promise + delete(userId: string): Promise +} diff --git a/src/features/auth/domain/OAuthToken.ts b/src/features/auth/domain/oAuthToken/OAuthToken.ts similarity index 100% rename from src/features/auth/domain/OAuthToken.ts rename to src/features/auth/domain/oAuthToken/OAuthToken.ts diff --git a/src/features/auth/domain/OAuthTokenRepository.ts b/src/features/auth/domain/oAuthToken/OAuthTokenRepository.ts similarity index 73% rename from src/features/auth/domain/OAuthTokenRepository.ts rename to src/features/auth/domain/oAuthToken/OAuthTokenRepository.ts index fd416386..a28bc29a 100644 --- a/src/features/auth/domain/OAuthTokenRepository.ts +++ b/src/features/auth/domain/oAuthToken/OAuthTokenRepository.ts @@ -1,6 +1,6 @@ -import ZodJSONCoder from "@/common/utils/ZodJSONCoder" +import ZodJSONCoder from "../../../../common/utils/ZodJSONCoder" import IUserDataRepository from "@/common/userData/IUserDataRepository" -import { UnauthorizedError } from "@/common/errors" +import { UnauthorizedError } from "../../../../common/errors" import IOAuthTokenRepository from "./IOAuthTokenRepository" import OAuthToken, { OAuthTokenSchema } from "./OAuthToken" @@ -11,7 +11,7 @@ export default class OAuthTokenRepository implements IOAuthTokenRepository { this.repository = repository } - async getOAuthToken(userId: string): Promise { + async get(userId: string): Promise { const string = await this.repository.get(userId) if (!string) { throw new UnauthorizedError(`No OAuthToken stored for user with ID ${userId}.`) @@ -19,12 +19,12 @@ export default class OAuthTokenRepository implements IOAuthTokenRepository { return ZodJSONCoder.decode(OAuthTokenSchema, string) } - async storeOAuthToken(userId: string, token: OAuthToken): Promise { + async set(userId: string, token: OAuthToken): Promise { const string = ZodJSONCoder.encode(OAuthTokenSchema, token) await this.repository.set(userId, string) } - async deleteOAuthToken(userId: string): Promise { + async delete(userId: string): Promise { await this.repository.delete(userId) } } From 91d97f480531c7a2183b22992d12b86e131268e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Tue, 7 Nov 2023 11:27:58 +0100 Subject: [PATCH 48/53] Ignores unused variables starting with underscore --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index b20a733c..3b0ce798 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,7 +16,8 @@ "no-unmodified-loop-condition": ["error"], "no-unreachable-loop": ["error"], "no-unused-private-class-members": ["error"], - "require-atomic-updates": ["error"] + "require-atomic-updates": ["error"], + "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }] }, "parser": "@typescript-eslint/parser", "plugins": [ From b7dc59caa60af38e725e3a6e697921ea64a798b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Tue, 7 Nov 2023 11:35:00 +0100 Subject: [PATCH 49/53] Adds AccessTokenService --- __test__/auth/AccessTokenService.test.ts | 86 +++++++++++++++++++ ...st.ts => InitialOAuthTokenService.test.ts} | 36 ++++---- src/app/api/auth/[auth0]/route.ts | 3 +- src/composition.ts | 69 +++++++-------- .../domain/accessToken/AccessTokenService.ts | 39 +++++++++ .../oAuthToken/InitialOAuthTokenService.ts | 26 ++++++ .../auth/view/SessionOAuthTokenBarrier.tsx | 5 +- 7 files changed, 209 insertions(+), 55 deletions(-) create mode 100644 __test__/auth/AccessTokenService.test.ts rename __test__/auth/{OAuthTokenTransferer.test.ts => InitialOAuthTokenService.test.ts} (71%) create mode 100644 src/features/auth/domain/accessToken/AccessTokenService.ts create mode 100644 src/features/auth/domain/oAuthToken/InitialOAuthTokenService.ts diff --git a/__test__/auth/AccessTokenService.test.ts b/__test__/auth/AccessTokenService.test.ts new file mode 100644 index 00000000..62a986c7 --- /dev/null +++ b/__test__/auth/AccessTokenService.test.ts @@ -0,0 +1,86 @@ +import AccessTokenService from "../../src/features/auth/domain/accessToken/AccessTokenService" +import OAuthToken from "../../src/features/auth/domain/oAuthToken/OAuthToken" + +test("It gets the access token for the user", async () => { + let readUserID: string | undefined + const sut = new AccessTokenService({ + userIdReader: { + async getUserId() { + return "1234" + } + }, + repository: { + async get(userId) { + readUserID = userId + return { accessToken: "foo", refreshToken: "bar" } + }, + async set() {}, + async delete() {}, + }, + refresher: { + async refreshOAuthToken() { + return { accessToken: "foo", refreshToken: "bar" } + } + } + }) + const accessToken = await sut.getAccessToken() + expect(readUserID).toBe("1234") + expect(accessToken).toBe("foo") +}) + +test("It refreshes OAuth using stored refresh token", async () => { + let usedRefreshToken: string | undefined + const sut = new AccessTokenService({ + userIdReader: { + async getUserId() { + return "1234" + } + }, + repository: { + async get() { + return { accessToken: "oldAccessToken", refreshToken: "oldRefreshToken" } + }, + async set() {}, + async delete() {}, + }, + refresher: { + async refreshOAuthToken(refreshToken) { + usedRefreshToken = refreshToken + return { accessToken: "newAccessToken", refreshToken: "newRefreshToken" } + } + } + }) + await sut.refreshAccessToken("oldAccessToken") + expect(usedRefreshToken).toBe("oldRefreshToken") +}) + +test("It stores the new OAuth token for the user", async () => { + let storedUserId: string | undefined + let storedOAuthToken: OAuthToken | undefined + const sut = new AccessTokenService({ + userIdReader: { + async getUserId() { + return "1234" + } + }, + repository: { + async get() { + return { accessToken: "oldAccessToken", refreshToken: "oldRefreshToken" } + }, + async set(userId, oAuthToken) { + storedUserId = userId + storedOAuthToken = oAuthToken + }, + async delete() {}, + }, + refresher: { + async refreshOAuthToken() { + return { accessToken: "newAccessToken", refreshToken: "newRefreshToken" } + } + } + }) + await sut.refreshAccessToken("foo") + expect(storedUserId).toBe("1234") + expect(storedOAuthToken?.accessToken).toBe("newAccessToken") + expect(storedOAuthToken?.refreshToken).toBe("newRefreshToken") +}) diff --git a/__test__/auth/OAuthTokenTransferer.test.ts b/__test__/auth/InitialOAuthTokenService.test.ts similarity index 71% rename from __test__/auth/OAuthTokenTransferer.test.ts rename to __test__/auth/InitialOAuthTokenService.test.ts index 2c8ec21b..307b61f6 100644 --- a/__test__/auth/OAuthTokenTransferer.test.ts +++ b/__test__/auth/InitialOAuthTokenService.test.ts @@ -1,9 +1,9 @@ -import OAuthTokenTransferer from "../../src/features/auth/domain/OAuthTokenTransferer" -import OAuthToken from "../../src/features/auth/domain/OAuthToken" +import InitialOAuthTokenService from "../../src/features/auth/domain/oAuthToken/InitialOAuthTokenService" +import OAuthToken from "../../src/features/auth/domain/oAuthToken/OAuthToken" test("It fetches refresh token for specified user", async () => { let fetchedUserId: string | undefined - const sut = new OAuthTokenTransferer({ + const sut = new InitialOAuthTokenService({ refreshTokenReader: { async getRefreshToken(userId) { fetchedUserId = userId @@ -16,20 +16,20 @@ test("It fetches refresh token for specified user", async () => { } }, oAuthTokenRepository: { - async getOAuthToken() { + async get() { return { accessToken: "foo", refreshToken: "bar" } }, - async storeOAuthToken() {}, - async deleteOAuthToken() {} + async set() {}, + async delete() {} } }) - await sut.transferAuthTokenForUser("123") + await sut.fetchInitialAuthTokenForUser("123") expect(fetchedUserId).toBe("123") }) test("It refreshes the fetched refresh token", async () => { let refreshedRefreshToken: string | undefined - const sut = new OAuthTokenTransferer({ + const sut = new InitialOAuthTokenService({ refreshTokenReader: { async getRefreshToken() { return "helloworld" @@ -42,21 +42,21 @@ test("It refreshes the fetched refresh token", async () => { } }, oAuthTokenRepository: { - async getOAuthToken() { + async get() { return { accessToken: "foo", refreshToken: "bar" } }, - async storeOAuthToken() {}, - async deleteOAuthToken() {} + async set() {}, + async delete() {} } }) - await sut.transferAuthTokenForUser("123") + await sut.fetchInitialAuthTokenForUser("123") expect(refreshedRefreshToken).toBe("helloworld") }) test("It stores the refreshed auth token for the correct user ID", async () => { let storedAuthToken: OAuthToken | undefined let storedUserId: string | undefined - const sut = new OAuthTokenTransferer({ + const sut = new InitialOAuthTokenService({ refreshTokenReader: { async getRefreshToken() { return "helloworld" @@ -68,18 +68,18 @@ test("It stores the refreshed auth token for the correct user ID", async () => { } }, oAuthTokenRepository: { - async getOAuthToken() { + async get() { return { accessToken: "foo", refreshToken: "bar" } }, - async storeOAuthToken(userId, token) { + async set(userId, token) { storedAuthToken = token storedUserId = userId }, - async deleteOAuthToken() {} + async delete() {} } }) - await sut.transferAuthTokenForUser("123") + await sut.fetchInitialAuthTokenForUser("123") expect(storedAuthToken?.accessToken).toBe("foo") expect(storedAuthToken?.refreshToken).toBe("bar") expect(storedUserId).toBe("123") -}) +}) \ No newline at end of file diff --git a/src/app/api/auth/[auth0]/route.ts b/src/app/api/auth/[auth0]/route.ts index b8e11a5e..98fccfcf 100644 --- a/src/app/api/auth/[auth0]/route.ts +++ b/src/app/api/auth/[auth0]/route.ts @@ -16,7 +16,8 @@ const afterCallback: AfterCallbackAppRoute = async (_req, session) => { return session } -const onError: AppRouterOnError = async () => { +const onError: AppRouterOnError = async (req, error) => { + console.log(error) const url = new URL(SHAPE_DOCS_BASE_URL + "/api/auth/forceLogout") return NextResponse.redirect(url) } diff --git a/src/composition.ts b/src/composition.ts index cb3576dd..077cb29f 100644 --- a/src/composition.ts +++ b/src/composition.ts @@ -1,4 +1,5 @@ import AccessTokenRefreshingGitHubClient from "@/common/github/AccessTokenRefreshingGitHubClient" +import AccessTokenService from "@/features/auth/domain/accessToken/AccessTokenService" import Auth0RefreshTokenReader from "@/features/auth/data/Auth0RefreshTokenReader" import Auth0Session from "@/common/session/Auth0Session" import CachingProjectDataSource from "@/features/projects/domain/CachingProjectDataSource" @@ -8,17 +9,16 @@ import GitHubClient from "@/common/github/GitHubClient" import GitHubOAuthTokenRefresher from "@/features/auth/data/GitHubOAuthTokenRefresher" import GitHubOrganizationSessionValidator from "@/common/session/GitHubOrganizationSessionValidator" import GitHubProjectDataSource from "@/features/projects/data/GitHubProjectDataSource" +import InitialOAuthTokenService from "@/features/auth/domain/oAuthToken/InitialOAuthTokenService" import KeyValueUserDataRepository from "@/common/userData/KeyValueUserDataRepository" -import LockingAccessTokenRefresher from "@/features/auth/domain/LockingAccessTokenRefresher" +import LockingAccessTokenService from "@/features/auth/domain/accessToken/LockingAccessTokenService" +import OnlyStaleRefreshingAccessTokenService from "@/features/auth/domain/accessToken/OnlyStaleRefreshingAccessTokenService" import ProjectRepository from "@/features/projects/domain/ProjectRepository" import RedisKeyedMutexFactory from "@/common/mutex/RedisKeyedMutexFactory" import RedisKeyValueStore from "@/common/keyValueStore/RedisKeyValueStore" -import SessionAccessTokenReader from "@/features/auth/domain/SessionAccessTokenReader" -import SessionDataRepository from "@/common/userData/SessionDataRepository" import SessionMutexFactory from "@/common/mutex/SessionMutexFactory" -import SessionOAuthTokenRepository from "@/features/auth/domain/SessionOAuthTokenRepository" import SessionValidatingProjectDataSource from "@/features/projects/domain/SessionValidatingProjectDataSource" -import OAuthTokenRepository from "@/features/auth/domain/OAuthTokenRepository" +import OAuthTokenRepository from "@/features/auth/domain/oAuthToken/OAuthTokenRepository" import UserDataCleanUpLogOutHandler from "@/features/auth/domain/logOut/UserDataCleanUpLogOutHandler" const { @@ -35,43 +35,41 @@ const { const gitHubPrivateKey = Buffer.from(GITHUB_PRIVATE_KEY_BASE_64, "base64").toString("utf-8") -const session = new Auth0Session() +export const session = new Auth0Session() -const oAuthTokenRepository = new KeyValueUserDataRepository( - new RedisKeyValueStore(REDIS_URL), - "authToken" +export const oAuthTokenRepository = new OAuthTokenRepository( + new KeyValueUserDataRepository( + new RedisKeyValueStore(REDIS_URL), + "authToken" + ) ) -export const sessionOAuthTokenRepository = new SessionOAuthTokenRepository( - new SessionDataRepository(session, oAuthTokenRepository) +const accessTokenService = new LockingAccessTokenService( + new SessionMutexFactory( + new RedisKeyedMutexFactory(REDIS_URL), + session, + "mutexAccessToken" + ), + new OnlyStaleRefreshingAccessTokenService( + new AccessTokenService({ + userIdReader: session, + repository: oAuthTokenRepository, + refresher: new GitHubOAuthTokenRefresher({ + clientId: GITHUB_CLIENT_ID, + clientSecret: GITHUB_CLIENT_SECRET + }) + }) + ) ) -const gitHubOAuthTokenRefresher = new GitHubOAuthTokenRefresher({ - clientId: GITHUB_CLIENT_ID, - clientSecret: GITHUB_CLIENT_SECRET -}) - export const gitHubClient = new AccessTokenRefreshingGitHubClient( - new SessionAccessTokenReader( - sessionOAuthTokenRepository - ), - new LockingAccessTokenRefresher( - new SessionMutexFactory( - new RedisKeyedMutexFactory(REDIS_URL), - session, - "mutexAccessToken" - ), - sessionOAuthTokenRepository, - gitHubOAuthTokenRefresher - ), + accessTokenService, new GitHubClient({ appId: GITHUB_APP_ID, clientId: GITHUB_CLIENT_ID, clientSecret: GITHUB_CLIENT_SECRET, privateKey: gitHubPrivateKey, - accessTokenReader: new SessionAccessTokenReader( - sessionOAuthTokenRepository - ) + accessTokenReader: accessTokenService }) ) @@ -101,15 +99,18 @@ export const projectDataSource = new CachingProjectDataSource( projectRepository ) -export const oAuthTokenTransferer = new OAuthTokenTransferer({ +export const initialOAuthTokenService = new InitialOAuthTokenService({ refreshTokenReader: new Auth0RefreshTokenReader({ domain: AUTH0_MANAGEMENT_DOMAIN, clientId: AUTH0_MANAGEMENT_CLIENT_ID, clientSecret: AUTH0_MANAGEMENT_CLIENT_SECRET, connection: "github" }), - oAuthTokenRefresher: gitHubOAuthTokenRefresher, - oAuthTokenRepository: new OAuthTokenRepository(oAuthTokenRepository) + oAuthTokenRefresher: new GitHubOAuthTokenRefresher({ + clientId: GITHUB_CLIENT_ID, + clientSecret: GITHUB_CLIENT_SECRET + }), + oAuthTokenRepository: oAuthTokenRepository }) export const logOutHandler = new ErrorIgnoringLogOutHandler( diff --git a/src/features/auth/domain/accessToken/AccessTokenService.ts b/src/features/auth/domain/accessToken/AccessTokenService.ts new file mode 100644 index 00000000..729f40c3 --- /dev/null +++ b/src/features/auth/domain/accessToken/AccessTokenService.ts @@ -0,0 +1,39 @@ +import IAccessTokenService from "./IAccessTokenService" +import IOAuthTokenRepository from "../oAuthToken/IOAuthTokenRepository" +import IOAuthTokenRefresher from "../oAuthToken/IOAuthTokenRefresher" + +export interface IUserIDReader { + getUserId(): Promise +} + +type AccessTokenServiceConfig = { + readonly userIdReader: IUserIDReader + readonly repository: IOAuthTokenRepository + readonly refresher: IOAuthTokenRefresher +} + +export default class AccessTokenService implements IAccessTokenService { + private readonly userIdReader: IUserIDReader + private readonly repository: IOAuthTokenRepository + private readonly refresher: IOAuthTokenRefresher + + constructor(config: AccessTokenServiceConfig) { + this.userIdReader = config.userIdReader + this.repository = config.repository + this.refresher = config.refresher + } + + async getAccessToken(): Promise { + const userId = await this.userIdReader.getUserId() + const oAuthToken = await this.repository.get(userId) + return oAuthToken.accessToken + } + + async refreshAccessToken(_accessToken: string): Promise { + const userId = await this.userIdReader.getUserId() + const oAuthToken = await this.repository.get(userId) + const newOAuthToken = await this.refresher.refreshOAuthToken(oAuthToken.refreshToken) + await this.repository.set(userId, newOAuthToken) + return newOAuthToken.accessToken + } +} diff --git a/src/features/auth/domain/oAuthToken/InitialOAuthTokenService.ts b/src/features/auth/domain/oAuthToken/InitialOAuthTokenService.ts new file mode 100644 index 00000000..c75bd8e2 --- /dev/null +++ b/src/features/auth/domain/oAuthToken/InitialOAuthTokenService.ts @@ -0,0 +1,26 @@ +import IOAuthTokenRefresher from "./IOAuthTokenRefresher" +import IOAuthTokenRepository from "./IOAuthTokenRepository" + +interface IRefreshTokenReader { + getRefreshToken(userId: string): Promise +} + +type InitialOAuthTokenServiceConfig = { + readonly refreshTokenReader: IRefreshTokenReader + readonly oAuthTokenRefresher: IOAuthTokenRefresher + readonly oAuthTokenRepository: IOAuthTokenRepository +} + +export default class InitialOAuthTokenService { + private readonly config: InitialOAuthTokenServiceConfig + + constructor(config: InitialOAuthTokenServiceConfig) { + this.config = config + } + + async fetchInitialAuthTokenForUser(userId: string): Promise { + const refreshToken = await this.config.refreshTokenReader.getRefreshToken(userId) + const authToken = await this.config.oAuthTokenRefresher.refreshOAuthToken(refreshToken) + this.config.oAuthTokenRepository.set(userId, authToken) + } +} \ No newline at end of file diff --git a/src/features/auth/view/SessionOAuthTokenBarrier.tsx b/src/features/auth/view/SessionOAuthTokenBarrier.tsx index 619bb50f..158ec381 100644 --- a/src/features/auth/view/SessionOAuthTokenBarrier.tsx +++ b/src/features/auth/view/SessionOAuthTokenBarrier.tsx @@ -1,6 +1,6 @@ import { ReactNode } from "react" import { redirect } from "next/navigation" -import { sessionOAuthTokenRepository } from "@/composition" +import { session, oAuthTokenRepository } from "@/composition" export default async function SessionOAuthTokenBarrier({ children @@ -8,7 +8,8 @@ export default async function SessionOAuthTokenBarrier({ children: ReactNode }) { try { - await sessionOAuthTokenRepository.getOAuthToken() + const userId = await session.getUserId() + await oAuthTokenRepository.get(userId) return <>{children} } catch { redirect("/api/auth/logout") From 1008896fb3b356c65e790e7df1fca1b667a4cb0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Tue, 7 Nov 2023 11:36:15 +0100 Subject: [PATCH 50/53] Removes unused code --- src/common/userData/ISessionDataRepository.ts | 5 ---- src/common/userData/SessionDataRepository.ts | 28 ------------------- 2 files changed, 33 deletions(-) delete mode 100644 src/common/userData/ISessionDataRepository.ts delete mode 100644 src/common/userData/SessionDataRepository.ts diff --git a/src/common/userData/ISessionDataRepository.ts b/src/common/userData/ISessionDataRepository.ts deleted file mode 100644 index 68c4426a..00000000 --- a/src/common/userData/ISessionDataRepository.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default interface ISessionDataRepository { - get(): Promise - set(value: T): Promise - delete(): Promise -} diff --git a/src/common/userData/SessionDataRepository.ts b/src/common/userData/SessionDataRepository.ts deleted file mode 100644 index 490862d6..00000000 --- a/src/common/userData/SessionDataRepository.ts +++ /dev/null @@ -1,28 +0,0 @@ -import ISession from "../session/ISession" -import ISessionDataRepository from "@/common/userData/ISessionDataRepository" -import IUserDataRepository from "@/common/userData/IUserDataRepository" - -export default class SessionDataRepository implements ISessionDataRepository { - private readonly session: ISession - private readonly repository: IUserDataRepository - - constructor(session: ISession, repository: IUserDataRepository) { - this.session = session - this.repository = repository - } - - async get(): Promise { - const userId = await this.session.getUserId() - return await this.repository.get(userId) - } - - async set(value: T): Promise { - const userId = await this.session.getUserId() - return await this.repository.set(userId, value) - } - - async delete(): Promise { - const userId = await this.session.getUserId() - return await this.repository.delete(userId) - } -} From f6fe1c7e2d3e1b93dae535ae1569e7f0fa4389bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Tue, 7 Nov 2023 11:41:57 +0100 Subject: [PATCH 51/53] Removes debug logging --- src/app/api/auth/[auth0]/route.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/api/auth/[auth0]/route.ts b/src/app/api/auth/[auth0]/route.ts index 98fccfcf..b8e11a5e 100644 --- a/src/app/api/auth/[auth0]/route.ts +++ b/src/app/api/auth/[auth0]/route.ts @@ -16,8 +16,7 @@ const afterCallback: AfterCallbackAppRoute = async (_req, session) => { return session } -const onError: AppRouterOnError = async (req, error) => { - console.log(error) +const onError: AppRouterOnError = async () => { const url = new URL(SHAPE_DOCS_BASE_URL + "/api/auth/forceLogout") return NextResponse.redirect(url) } From 6e4e3a61b25af676dd7039c64ae33f524072c528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Tue, 7 Nov 2023 12:18:44 +0100 Subject: [PATCH 52/53] Transfers credentials through ILogInHandler --- ...test.ts => CredentialsTransferrer.test.ts} | 16 +++++----- ...redentialsTransferringLogInHandler.test.ts | 12 +++++++ src/app/api/auth/[auth0]/route.ts | 4 +-- src/composition.ts | 31 ++++++++++--------- .../CredentialsTransferrer.ts | 31 +++++++++++++++++++ .../ICredentialsTransferrer.ts | 3 ++ .../CredentialsTransferringLogInHandler.ts | 18 +++++++++++ .../auth/domain/logIn/ILogInHandler.ts | 3 ++ .../oAuthToken/InitialOAuthTokenService.ts | 26 ---------------- 9 files changed, 94 insertions(+), 50 deletions(-) rename __test__/auth/{InitialOAuthTokenService.test.ts => CredentialsTransferrer.test.ts} (81%) create mode 100644 __test__/auth/CredentialsTransferringLogInHandler.test.ts create mode 100644 src/features/auth/domain/credentialsTransfer/CredentialsTransferrer.ts create mode 100644 src/features/auth/domain/credentialsTransfer/ICredentialsTransferrer.ts create mode 100644 src/features/auth/domain/logIn/CredentialsTransferringLogInHandler.ts create mode 100644 src/features/auth/domain/logIn/ILogInHandler.ts delete mode 100644 src/features/auth/domain/oAuthToken/InitialOAuthTokenService.ts diff --git a/__test__/auth/InitialOAuthTokenService.test.ts b/__test__/auth/CredentialsTransferrer.test.ts similarity index 81% rename from __test__/auth/InitialOAuthTokenService.test.ts rename to __test__/auth/CredentialsTransferrer.test.ts index 307b61f6..7723e8c1 100644 --- a/__test__/auth/InitialOAuthTokenService.test.ts +++ b/__test__/auth/CredentialsTransferrer.test.ts @@ -1,9 +1,9 @@ -import InitialOAuthTokenService from "../../src/features/auth/domain/oAuthToken/InitialOAuthTokenService" +import CredentialsTransferrer from "../../src/features/auth/domain/credentialsTransfer/CredentialsTransferrer" import OAuthToken from "../../src/features/auth/domain/oAuthToken/OAuthToken" test("It fetches refresh token for specified user", async () => { let fetchedUserId: string | undefined - const sut = new InitialOAuthTokenService({ + const sut = new CredentialsTransferrer({ refreshTokenReader: { async getRefreshToken(userId) { fetchedUserId = userId @@ -23,13 +23,13 @@ test("It fetches refresh token for specified user", async () => { async delete() {} } }) - await sut.fetchInitialAuthTokenForUser("123") + await sut.transferCredentials("123") expect(fetchedUserId).toBe("123") }) test("It refreshes the fetched refresh token", async () => { let refreshedRefreshToken: string | undefined - const sut = new InitialOAuthTokenService({ + const sut = new CredentialsTransferrer({ refreshTokenReader: { async getRefreshToken() { return "helloworld" @@ -49,14 +49,14 @@ test("It refreshes the fetched refresh token", async () => { async delete() {} } }) - await sut.fetchInitialAuthTokenForUser("123") + await sut.transferCredentials("123") expect(refreshedRefreshToken).toBe("helloworld") }) -test("It stores the refreshed auth token for the correct user ID", async () => { +test("It stores the refreshed auth token for the user", async () => { let storedAuthToken: OAuthToken | undefined let storedUserId: string | undefined - const sut = new InitialOAuthTokenService({ + const sut = new CredentialsTransferrer({ refreshTokenReader: { async getRefreshToken() { return "helloworld" @@ -78,7 +78,7 @@ test("It stores the refreshed auth token for the correct user ID", async () => { async delete() {} } }) - await sut.fetchInitialAuthTokenForUser("123") + await sut.transferCredentials("123") expect(storedAuthToken?.accessToken).toBe("foo") expect(storedAuthToken?.refreshToken).toBe("bar") expect(storedUserId).toBe("123") diff --git a/__test__/auth/CredentialsTransferringLogInHandler.test.ts b/__test__/auth/CredentialsTransferringLogInHandler.test.ts new file mode 100644 index 00000000..90b106fe --- /dev/null +++ b/__test__/auth/CredentialsTransferringLogInHandler.test.ts @@ -0,0 +1,12 @@ +import CredentialsTransferringLogInHandler from "../../src/features/auth/domain/logIn/CredentialsTransferringLogInHandler" + +test("It transfers credentials", async () => { + let didTransferCredentials = false + const sut = new CredentialsTransferringLogInHandler({ + async transferCredentials() { + didTransferCredentials = true + } + }) + await sut.handleLogIn("1234") + expect(didTransferCredentials).toBeTruthy() +}) diff --git a/src/app/api/auth/[auth0]/route.ts b/src/app/api/auth/[auth0]/route.ts index b8e11a5e..aeaf8b83 100644 --- a/src/app/api/auth/[auth0]/route.ts +++ b/src/app/api/auth/[auth0]/route.ts @@ -7,12 +7,12 @@ import { NextAppRouterHandler, AppRouterOnError } from "@auth0/nextjs-auth0" -import { initialOAuthTokenService, logOutHandler } from "@/composition" +import { logInHandler, logOutHandler } from "@/composition" const { SHAPE_DOCS_BASE_URL } = process.env const afterCallback: AfterCallbackAppRoute = async (_req, session) => { - await initialOAuthTokenService.fetchInitialAuthTokenForUser(session.user.sub) + await logInHandler.handleLogIn(session.user.sub) return session } diff --git a/src/composition.ts b/src/composition.ts index 077cb29f..916d5814 100644 --- a/src/composition.ts +++ b/src/composition.ts @@ -4,12 +4,13 @@ import Auth0RefreshTokenReader from "@/features/auth/data/Auth0RefreshTokenReade import Auth0Session from "@/common/session/Auth0Session" import CachingProjectDataSource from "@/features/projects/domain/CachingProjectDataSource" import CompositeLogOutHandler from "@/features/auth/domain/logOut/CompositeLogOutHandler" +import CredentialsTransferrer from "@/features/auth/domain/credentialsTransfer/CredentialsTransferrer" +import CredentialsTransferringLogInHandler from "@/features/auth/domain/logIn/CredentialsTransferringLogInHandler" import ErrorIgnoringLogOutHandler from "@/features/auth/domain/logOut/ErrorIgnoringLogOutHandler" import GitHubClient from "@/common/github/GitHubClient" import GitHubOAuthTokenRefresher from "@/features/auth/data/GitHubOAuthTokenRefresher" import GitHubOrganizationSessionValidator from "@/common/session/GitHubOrganizationSessionValidator" import GitHubProjectDataSource from "@/features/projects/data/GitHubProjectDataSource" -import InitialOAuthTokenService from "@/features/auth/domain/oAuthToken/InitialOAuthTokenService" import KeyValueUserDataRepository from "@/common/userData/KeyValueUserDataRepository" import LockingAccessTokenService from "@/features/auth/domain/accessToken/LockingAccessTokenService" import OnlyStaleRefreshingAccessTokenService from "@/features/auth/domain/accessToken/OnlyStaleRefreshingAccessTokenService" @@ -99,19 +100,21 @@ export const projectDataSource = new CachingProjectDataSource( projectRepository ) -export const initialOAuthTokenService = new InitialOAuthTokenService({ - refreshTokenReader: new Auth0RefreshTokenReader({ - domain: AUTH0_MANAGEMENT_DOMAIN, - clientId: AUTH0_MANAGEMENT_CLIENT_ID, - clientSecret: AUTH0_MANAGEMENT_CLIENT_SECRET, - connection: "github" - }), - oAuthTokenRefresher: new GitHubOAuthTokenRefresher({ - clientId: GITHUB_CLIENT_ID, - clientSecret: GITHUB_CLIENT_SECRET - }), - oAuthTokenRepository: oAuthTokenRepository -}) +export const logInHandler = new CredentialsTransferringLogInHandler( + new CredentialsTransferrer({ + refreshTokenReader: new Auth0RefreshTokenReader({ + domain: AUTH0_MANAGEMENT_DOMAIN, + clientId: AUTH0_MANAGEMENT_CLIENT_ID, + clientSecret: AUTH0_MANAGEMENT_CLIENT_SECRET, + connection: "github" + }), + oAuthTokenRefresher: new GitHubOAuthTokenRefresher({ + clientId: GITHUB_CLIENT_ID, + clientSecret: GITHUB_CLIENT_SECRET + }), + oAuthTokenRepository: oAuthTokenRepository + }) +) export const logOutHandler = new ErrorIgnoringLogOutHandler( new CompositeLogOutHandler([ diff --git a/src/features/auth/domain/credentialsTransfer/CredentialsTransferrer.ts b/src/features/auth/domain/credentialsTransfer/CredentialsTransferrer.ts new file mode 100644 index 00000000..c061a2cb --- /dev/null +++ b/src/features/auth/domain/credentialsTransfer/CredentialsTransferrer.ts @@ -0,0 +1,31 @@ +import IOAuthTokenRefresher from "../oAuthToken/IOAuthTokenRefresher" +import IOAuthTokenRepository from "../oAuthToken/IOAuthTokenRepository" +import ICredentialsTransferrer from "./ICredentialsTransferrer" + +export interface IRefreshTokenReader { + getRefreshToken(userId: string): Promise +} + +type CredentialsTransferrerConfig = { + readonly refreshTokenReader: IRefreshTokenReader + readonly oAuthTokenRefresher: IOAuthTokenRefresher + readonly oAuthTokenRepository: IOAuthTokenRepository +} + +export default class CredentialsTransferrer implements ICredentialsTransferrer { + private readonly refreshTokenReader: IRefreshTokenReader + private readonly oAuthTokenRefresher: IOAuthTokenRefresher + private readonly oAuthTokenRepository: IOAuthTokenRepository + + constructor(config: CredentialsTransferrerConfig) { + this.refreshTokenReader = config.refreshTokenReader + this.oAuthTokenRefresher = config.oAuthTokenRefresher + this.oAuthTokenRepository = config.oAuthTokenRepository + } + + async transferCredentials(userId: string): Promise { + const refreshToken = await this.refreshTokenReader.getRefreshToken(userId) + const authToken = await this.oAuthTokenRefresher.refreshOAuthToken(refreshToken) + await this.oAuthTokenRepository.set(userId, authToken) + } +} diff --git a/src/features/auth/domain/credentialsTransfer/ICredentialsTransferrer.ts b/src/features/auth/domain/credentialsTransfer/ICredentialsTransferrer.ts new file mode 100644 index 00000000..7bea8973 --- /dev/null +++ b/src/features/auth/domain/credentialsTransfer/ICredentialsTransferrer.ts @@ -0,0 +1,3 @@ +export default interface ICredentialsTransferrer { + transferCredentials(userId: string): Promise +} diff --git a/src/features/auth/domain/logIn/CredentialsTransferringLogInHandler.ts b/src/features/auth/domain/logIn/CredentialsTransferringLogInHandler.ts new file mode 100644 index 00000000..618b2713 --- /dev/null +++ b/src/features/auth/domain/logIn/CredentialsTransferringLogInHandler.ts @@ -0,0 +1,18 @@ +import ICredentialsTransferrer from "../credentialsTransfer/ICredentialsTransferrer" +import ILogInHandler from "./ILogInHandler" + +export interface IRefreshTokenReader { + getRefreshToken(userId: string): Promise +} + +export default class CredentialsTransferringLogInHandler implements ILogInHandler { + private readonly credentialsTransferrer: ICredentialsTransferrer + + constructor(credentialsTransferrer: ICredentialsTransferrer) { + this.credentialsTransferrer = credentialsTransferrer + } + + async handleLogIn(userId: string): Promise { + await this.credentialsTransferrer.transferCredentials(userId) + } +} diff --git a/src/features/auth/domain/logIn/ILogInHandler.ts b/src/features/auth/domain/logIn/ILogInHandler.ts new file mode 100644 index 00000000..b0e0e0f4 --- /dev/null +++ b/src/features/auth/domain/logIn/ILogInHandler.ts @@ -0,0 +1,3 @@ +export default interface ILogInHandler { + handleLogIn(userId: string): Promise +} diff --git a/src/features/auth/domain/oAuthToken/InitialOAuthTokenService.ts b/src/features/auth/domain/oAuthToken/InitialOAuthTokenService.ts deleted file mode 100644 index c75bd8e2..00000000 --- a/src/features/auth/domain/oAuthToken/InitialOAuthTokenService.ts +++ /dev/null @@ -1,26 +0,0 @@ -import IOAuthTokenRefresher from "./IOAuthTokenRefresher" -import IOAuthTokenRepository from "./IOAuthTokenRepository" - -interface IRefreshTokenReader { - getRefreshToken(userId: string): Promise -} - -type InitialOAuthTokenServiceConfig = { - readonly refreshTokenReader: IRefreshTokenReader - readonly oAuthTokenRefresher: IOAuthTokenRefresher - readonly oAuthTokenRepository: IOAuthTokenRepository -} - -export default class InitialOAuthTokenService { - private readonly config: InitialOAuthTokenServiceConfig - - constructor(config: InitialOAuthTokenServiceConfig) { - this.config = config - } - - async fetchInitialAuthTokenForUser(userId: string): Promise { - const refreshToken = await this.config.refreshTokenReader.getRefreshToken(userId) - const authToken = await this.config.oAuthTokenRefresher.refreshOAuthToken(refreshToken) - this.config.oAuthTokenRepository.set(userId, authToken) - } -} \ No newline at end of file From 5f23c8b9eb2d8379fb9cd9c00ebd5177ef99579a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Tue, 7 Nov 2023 13:25:05 +0100 Subject: [PATCH 53/53] Fixes webhooks attempting to authenticate --- src/composition.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/composition.ts b/src/composition.ts index 916d5814..b54b36b9 100644 --- a/src/composition.ts +++ b/src/composition.ts @@ -63,19 +63,21 @@ const accessTokenService = new LockingAccessTokenService( ) ) -export const gitHubClient = new AccessTokenRefreshingGitHubClient( +export const gitHubClient = new GitHubClient({ + appId: GITHUB_APP_ID, + clientId: GITHUB_CLIENT_ID, + clientSecret: GITHUB_CLIENT_SECRET, + privateKey: gitHubPrivateKey, + accessTokenReader: accessTokenService +}) + +const userGitHubClient = new AccessTokenRefreshingGitHubClient( accessTokenService, - new GitHubClient({ - appId: GITHUB_APP_ID, - clientId: GITHUB_CLIENT_ID, - clientSecret: GITHUB_CLIENT_SECRET, - privateKey: gitHubPrivateKey, - accessTokenReader: accessTokenService - }) + gitHubClient ) export const sessionValidator = new GitHubOrganizationSessionValidator( - gitHubClient, + userGitHubClient, GITHUB_ORGANIZATION_NAME ) @@ -93,7 +95,7 @@ export const projectDataSource = new CachingProjectDataSource( new SessionValidatingProjectDataSource( sessionValidator, new GitHubProjectDataSource( - gitHubClient, + userGitHubClient, GITHUB_ORGANIZATION_NAME ) ),