diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 20aaa1d..0000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -src/libs \ No newline at end of file diff --git a/.eslintrc.json b/.github/linters/.eslintrc.json similarity index 100% rename from .eslintrc.json rename to .github/linters/.eslintrc.json diff --git a/.github/linters/.markdownlint.yml b/.github/linters/.markdownlint.yml new file mode 100644 index 0000000..75b752b --- /dev/null +++ b/.github/linters/.markdownlint.yml @@ -0,0 +1,3 @@ +--- +default: true +line-length: false diff --git a/.yamllint.yml b/.github/linters/.yamllint.yml similarity index 100% rename from .yamllint.yml rename to .github/linters/.yamllint.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..faa42bc --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,32 @@ +--- +name: Lint + +on: + push: + branches: + - main + - 'bugfix/**' + - 'feature/**' + pull_request: + branches: + - 'bump/patch-**' + +jobs: + build: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: Run Lint + uses: github/super-linter@v3.14.3 + env: + ACTIONS_RUNNER_DEBUG: true + VALIDATE_ALL_CODEBASE: true + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.json + MARKDOWN_CONFIG_FILE: .markdownlint.yml + TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.json + YAML_CONFIG_FILE: .yamllint.yml diff --git a/.github/workflows/yaml-lint.yml b/.github/workflows/yaml-lint.yml deleted file mode 100644 index 10addc6..0000000 --- a/.github/workflows/yaml-lint.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: YAML Lint - -on: - push: - paths: - - '**.yml' - -jobs: - lint: - name: Lint - timeout-minutes: 3 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.3.4 - - uses: ibiqlik/action-yamllint@v3.0.0 - with: - config_file: .yamllint.yml - strict: false diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..0c43cc5 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,6 @@ +#!/bin/sh +. "$(dirname $0)/_/husky.sh" + +yarn git-branch-is --not main +yarn run build +git add dist/index.js diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 0000000..b4c149e --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,5 @@ +#!/bin/sh +. "$(dirname $0)/_/husky.sh" + +yarn run lint +yarn test diff --git a/.snyk b/.snyk index 98c7539..c11d5aa 100644 --- a/.snyk +++ b/.snyk @@ -1,46 +1,8 @@ # Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. version: v1.14.1 -ignore: {} -# patches apply the minimum changes required to fix a vulnerability -patch: - SNYK-JS-LODASH-567746: - - twilio > lodash: - patched: '2020-04-30T14:52:27.955Z' - - snyk > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > graphlib > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > @snyk/ruby-semver > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > inquirer > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > snyk-config > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > snyk-mvn-plugin > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > snyk-nodejs-lockfile-parser > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > snyk-nuget-plugin > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > @snyk/dep-graph > graphlib > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > snyk-go-plugin > graphlib > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > snyk-nodejs-lockfile-parser > graphlib > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > @snyk/snyk-cocoapods-plugin > @snyk/dep-graph > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > snyk-mvn-plugin > @snyk/java-call-graph-builder > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > snyk-nuget-plugin > dotnet-deps-parser > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > snyk-php-plugin > @snyk/composer-lockfile-parser > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > @snyk/snyk-cocoapods-plugin > @snyk/dep-graph > graphlib > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > snyk-mvn-plugin > @snyk/java-call-graph-builder > graphlib > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > @snyk/snyk-cocoapods-plugin > @snyk/cocoapods-lockfile-parser > @snyk/ruby-semver > lodash: - patched: '2020-04-30T14:54:48.744Z' - - snyk > @snyk/snyk-cocoapods-plugin > @snyk/cocoapods-lockfile-parser > @snyk/dep-graph > graphlib > lodash: - patched: '2020-04-30T14:54:48.744Z' +# ignores vulnerabilities until expiry date; change duration by modifying expiry date +ignore: + SNYK-JS-AXIOS-1038255: + - axios: + reason: Axios doesn't provide a fix for this yet + expires: '2021-01-27T07:09:16.628Z' diff --git a/.vscode/settings.json b/.vscode/settings.json index 3793935..98b0ee8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,11 +7,13 @@ }, "cSpell.words": [ "Autobuild", + "Axios", "UNSECURE", "codeql", "ibiqlik", "issuehunt", "liberapay", + "markdownlint", "paambaati", "semver", "simbo", diff --git a/README.md b/README.md index 0d4fc54..1f606c9 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,25 @@ # Twilio Fax Action -![](https://img.shields.io/github/v/release/fabasoad/twilio-fax-action?include_prereleases) ![CI (latest)](https://github.com/fabasoad/twilio-fax-action/workflows/CI%20(latest)/badge.svg) ![CI (main)](https://github.com/fabasoad/twilio-fax-action/workflows/CI%20(main)/badge.svg) ![YAML Lint](https://github.com/fabasoad/twilio-fax-action/workflows/YAML%20Lint/badge.svg) [![Maintainability](https://api.codeclimate.com/v1/badges/92c0b2f32ff15a3522bc/maintainability)](https://codeclimate.com/github/fabasoad/twilio-fax-action/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/92c0b2f32ff15a3522bc/test_coverage)](https://codeclimate.com/github/fabasoad/twilio-fax-action/test_coverage) [![Known Vulnerabilities](https://snyk.io/test/github/fabasoad/twilio-fax-action/badge.svg)](https://snyk.io/test/github/fabasoad/twilio-fax-action) + +![Release](https://img.shields.io/github/v/release/fabasoad/twilio-fax-action?include_prereleases) ![CI (latest)](https://github.com/fabasoad/twilio-fax-action/workflows/CI%20(latest)/badge.svg) ![CI (main)](https://github.com/fabasoad/twilio-fax-action/workflows/CI%20(main)/badge.svg) ![Lint](https://github.com/fabasoad/twilio-fax-action/workflows/Lint/badge.svg) ![CodeQL](https://github.com/fabasoad/twilio-fax-action/workflows/CodeQL/badge.svg) [![Total alerts](https://img.shields.io/lgtm/alerts/g/fabasoad/twilio-fax-action.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fabasoad/twilio-fax-action/alerts/) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/fabasoad/twilio-fax-action.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fabasoad/twilio-fax-action/context:javascript) [![Maintainability](https://api.codeclimate.com/v1/badges/92c0b2f32ff15a3522bc/maintainability)](https://codeclimate.com/github/fabasoad/twilio-fax-action/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/92c0b2f32ff15a3522bc/test_coverage)](https://codeclimate.com/github/fabasoad/twilio-fax-action/test_coverage) [![Known Vulnerabilities](https://snyk.io/test/github/fabasoad/twilio-fax-action/badge.svg)](https://snyk.io/test/github/fabasoad/twilio-fax-action) This action sends fax using Twilio. ## Prerequisites + Sign up to [Twilio](https://twilio.com) official web page. Then [register a new number](https://www.twilio.com/console/voice/numbers) to use it as `from` parameter. If you use free trial account you have to [add verified phone number](https://support.twilio.com/hc/en-us/articles/223180048-Adding-a-Verified-Phone-Number-or-Caller-ID-with-Twilio) to use it as `to` parameter. Account SID and Auth token you can find on a [Dashboard page](https://www.twilio.com/console). ## Inputs + | Name | Required | Description | Type | |--------------------|----------|------------------------------------------|-----------------| | twilio_account_sid | Yes | Twilio account SID | <String> | | twilio_auth_token | Yes | Twilio auth token | <String> | | url | Yes | Url to the file that will be send by fax | <String> | | from | Yes | Fax sender number (Twilio) | <String> | -| to | Yes | Fax recepient number | <String> | +| to | Yes | Fax recipient number | <String> | ## Outputs + | Name | Description | Type | |------|------------------------------------------------------------------------------------------------------------------------|-----------------| | sid | SID of fax operation. You can use it then by calling [Fax REST API](https://www.twilio.com/docs/fax/api/fax-resource). | <String> | @@ -34,7 +38,7 @@ jobs: name: Twilio Fax runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@main - uses: fabasoad/twilio-fax-action@main with: url: 'http://africau.edu/images/default/sample.pdf' @@ -47,39 +51,42 @@ jobs: ``` ### Result + Here is the example where the same Twilio account is used for both - recepient and sender. [Random public PDF file](http://africau.edu/images/default/sample.pdf) is used for this demonstration as an example. This is the result of finished job: ![CI result](https://raw.githubusercontent.com/fabasoad/twilio-fax-action/main/screenshots/screenshot1.png) Then the result can be checked by calling [REST API endpoint](https://www.twilio.com/docs/fax/api/fax-resource#fetch-a-fax-resource) to get information. Here is the result: -_Calling https://fax.twilio.com/v1/Faxes/FX03d290ea94e78658133d96f7f23bdf1b_ +_Calling _ + ```json { - "media_sid": "ME1af5e3921f00ba485bda402b5e869af9", - "status": "no-answer", - "direction": "outbound", - "from": "+11234567890", - "date_updated": "2020-05-06T09:05:53Z", - "price": null, - "account_sid": "XXX", - "to": "+11234567890", - "date_created": "2020-05-06T09:05:36Z", - "url": "https://fax.twilio.com/v1/Faxes/FX03d290ea94e78658133d96f7f23bdf1b", - "sid": "FX03d290ea94e78658133d96f7f23bdf1b", - "duration": 15, - "num_pages": 2, - "quality": "fine", - "price_unit": null, - "api_version": "v1", - "media_url": "https://media.twiliocdn.com/fax/ACa412d07259a959d4ffa16cbc495906b2/eaf7542ade2c338d8d2cc76fcbf883e62c31336e60cb236f86ed66c8154ea9fb836fd88367880911529bdafed0e76cd34272123a4d656db61b120b95eaa3e069?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEGkaCXVzLWVhc3QtMSJHMEUCIQCXafBpleoQtRbv%2B9TRo97n1cleLFrTcPycSDj4LxPM7wIgENPtHRBJUArPW5GLKFYyH5e2WWZo%2F0y5C8OVZHHptKUqvQMIov%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAAGgwyMDExNjQ5MjE0MDgiDKIcHVNx4I1skJ%2FReCqRA6H1iWhAp6fPWZHtklDFKAD7ATVyXn6xIdUQVV05i3VNQ3pNnjByL1rfc1Nz8d1u9n%2FMTKHIQSXr4I9tXzHGCgks84CYlAj7xSaTeXPLVe1gl7q9okTnS%2BXWXt7GFmu7fMANuCnwVno%2Bdt1YAlNj6Dtnpf9LanaGS9RjFyJSlnmRiXaSq6vV06mgqa4t3x9lHr%2FLAWq8KvT1DWHBqgGAzL3gnPa6z7P%2BvrjJ8v0eoiPb6%2FRq1Qk1wo34VE91Imog3Rsh15n2lueUaj6AatF3azclJxoFU2RnbC2M3sZrHkCZZ0AwiMZPgCoNbmtmEKgigKJN82%2FjCAvMVm2G%2BazDNn6%2FQ90K9eCvdSiXQdLEe6d9qWR5Ehfx5GGuVMm%2BRq4ZIn1JPj9ttL3J6Qq8klzJwSsGkYv5qZcC4UUx%2B9dQIrddIRzVd6Ql4EqmZqAnb7mPqCR%2FhS%2BhGvbF3b7HY6ggMeAnh6M4FdLA%2BZOqTwKG98%2B%2B8NVqSIqtnKyHFYCAlz2ftoOXTepycbIH1p05mV%2FKXzGDMN%2F5yfUFOusBa9vCnqvhDSX6kzlAf3CvhmfGYwIlA7nhOr9jdpN7zonvX8zkzxnt6xDYXDmEotPem%2F%2B%2BZ1Pq9zAC7ec1ra3USY3iU6Ot5Gz9JLB4Hcw23szF4USUd76c2oPjY1YSNcFiZqJE2RUjavh%2FitN6GL9gMAX7qSWrF7uKKqKOxRR9g96weC1ohMwGX%2BNRSpfjFnPeoRYyTcjyFSm4hIDNnHgDX8ONFP%2BAGPIH0u1Bt8dWGcP1B4Z%2FlYHM2e1asQNwsuSVErmWJdlz9hP8EZmdbMQ2z%2BV53uvDuW2tuV0D97SIUNKlJBYzOKe8P8%2FyVw%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20200506T090728Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7200&X-Amz-Credential=ASIAS5VS5DJAEBF4QLQ5%2F20200506%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=b37e66d2c53dff87a009080f8ec94b3a852f03b99f01f75a65732dc08bff66de", - "links": { - "media": "https://fax.twilio.com/v1/Faxes/FX03d290ea94e78658133d96f7f23bdf1b/Media" - } + "media_sid": "ME1af5e3921f00ba485bda402b5e869af9", + "status": "no-answer", + "direction": "outbound", + "from": "+11234567890", + "date_updated": "2020-05-06T09:05:53Z", + "price": null, + "account_sid": "XXX", + "to": "+11234567890", + "date_created": "2020-05-06T09:05:36Z", + "url": "https://fax.twilio.com/v1/Faxes/FX03d290ea94e78658133d96f7f23bdf1b", + "sid": "FX03d290ea94e78658133d96f7f23bdf1b", + "duration": 15, + "num_pages": 2, + "quality": "fine", + "price_unit": null, + "api_version": "v1", + "media_url": "https://media.twiliocdn.com/fax/ACa412d07259a959d4ffa16cbc495906b2/eaf7542ade2c338d8d2cc76fcbf883e62c31336e60cb236f86ed66c8154ea9fb836fd88367880911529bdafed0e76cd34272123a4d656db61b120b95eaa3e069?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEGkaCXVzLWVhc3QtMSJHMEUCIQCXafBpleoQtRbv%2B9TRo97n1cleLFrTcPycSDj4LxPM7wIgENPtHRBJUArPW5GLKFYyH5e2WWZo%2F0y5C8OVZHHptKUqvQMIov%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAAGgwyMDExNjQ5MjE0MDgiDKIcHVNx4I1skJ%2FReCqRA6H1iWhAp6fPWZHtklDFKAD7ATVyXn6xIdUQVV05i3VNQ3pNnjByL1rfc1Nz8d1u9n%2FMTKHIQSXr4I9tXzHGCgks84CYlAj7xSaTeXPLVe1gl7q9okTnS%2BXWXt7GFmu7fMANuCnwVno%2Bdt1YAlNj6Dtnpf9LanaGS9RjFyJSlnmRiXaSq6vV06mgqa4t3x9lHr%2FLAWq8KvT1DWHBqgGAzL3gnPa6z7P%2BvrjJ8v0eoiPb6%2FRq1Qk1wo34VE91Imog3Rsh15n2lueUaj6AatF3azclJxoFU2RnbC2M3sZrHkCZZ0AwiMZPgCoNbmtmEKgigKJN82%2FjCAvMVm2G%2BazDNn6%2FQ90K9eCvdSiXQdLEe6d9qWR5Ehfx5GGuVMm%2BRq4ZIn1JPj9ttL3J6Qq8klzJwSsGkYv5qZcC4UUx%2B9dQIrddIRzVd6Ql4EqmZqAnb7mPqCR%2FhS%2BhGvbF3b7HY6ggMeAnh6M4FdLA%2BZOqTwKG98%2B%2B8NVqSIqtnKyHFYCAlz2ftoOXTepycbIH1p05mV%2FKXzGDMN%2F5yfUFOusBa9vCnqvhDSX6kzlAf3CvhmfGYwIlA7nhOr9jdpN7zonvX8zkzxnt6xDYXDmEotPem%2F%2B%2BZ1Pq9zAC7ec1ra3USY3iU6Ot5Gz9JLB4Hcw23szF4USUd76c2oPjY1YSNcFiZqJE2RUjavh%2FitN6GL9gMAX7qSWrF7uKKqKOxRR9g96weC1ohMwGX%2BNRSpfjFnPeoRYyTcjyFSm4hIDNnHgDX8ONFP%2BAGPIH0u1Bt8dWGcP1B4Z%2FlYHM2e1asQNwsuSVErmWJdlz9hP8EZmdbMQ2z%2BV53uvDuW2tuV0D97SIUNKlJBYzOKe8P8%2FyVw%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20200506T090728Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7200&X-Amz-Credential=ASIAS5VS5DJAEBF4QLQ5%2F20200506%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=b37e66d2c53dff87a009080f8ec94b3a852f03b99f01f75a65732dc08bff66de", + "links": { + "media": "https://fax.twilio.com/v1/Faxes/FX03d290ea94e78658133d96f7f23bdf1b/Media" + } } ``` + Here is the result of calling `media_url` property: ![Fax result](https://raw.githubusercontent.com/fabasoad/twilio-fax-action/main/screenshots/screenshot2.png) -As you can see result document is the same as was defined in action argument, means that document has been sent by fax successfully. \ No newline at end of file +As you can see result document is the same as was defined in action argument, means that document has been sent by fax successfully. diff --git a/action.yml b/action.yml index f436fe3..e21d97d 100644 --- a/action.yml +++ b/action.yml @@ -19,7 +19,7 @@ inputs: description: 'Fax sender number (Twilio).' required: true to: - description: 'Fax recepient number.' + description: 'Fax recipient number.' required: true outputs: sid: diff --git a/dist/index.js b/dist/index.js index 58a1bee..bad4858 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -module.exports=(()=>{var t={87351:function(t,e,i){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)if(Object.hasOwnProperty.call(t,i))e[i]=t[i];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const o=n(i(12087));const s=i(5278);function issueCommand(t,e,i){const n=new Command(t,e,i);process.stdout.write(n.toString()+o.EOL)}e.issueCommand=issueCommand;function issue(t,e=""){issueCommand(t,{},e)}e.issue=issue;const r="::";class Command{constructor(t,e,i){if(!t){t="missing.command"}this.command=t;this.properties=e;this.message=i}toString(){let t=r+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let e=true;for(const i in this.properties){if(this.properties.hasOwnProperty(i)){const n=this.properties[i];if(n){if(e){e=false}else{t+=","}t+=`${i}=${escapeProperty(n)}`}}}}t+=`${r}${escapeData(this.message)}`;return t}}function escapeData(t){return s.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(t){return s.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},42186:function(t,e,i){"use strict";var n=this&&this.__awaiter||function(t,e,i,n){function adopt(t){return t instanceof i?t:new i(function(e){e(t)})}return new(i||(i=Promise))(function(i,o){function fulfilled(t){try{step(n.next(t))}catch(t){o(t)}}function rejected(t){try{step(n["throw"](t))}catch(t){o(t)}}function step(t){t.done?i(t.value):adopt(t.value).then(fulfilled,rejected)}step((n=n.apply(t,e||[])).next())})};var o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)if(Object.hasOwnProperty.call(t,i))e[i]=t[i];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const s=i(87351);const r=i(717);const c=i(5278);const a=o(i(12087));const u=o(i(85622));var h;(function(t){t[t["Success"]=0]="Success";t[t["Failure"]=1]="Failure"})(h=e.ExitCode||(e.ExitCode={}));function exportVariable(t,e){const i=c.toCommandValue(e);process.env[t]=i;const n=process.env["GITHUB_ENV"]||"";if(n){const e="_GitHubActionsFileCommandDelimeter_";const n=`${t}<<${e}${a.EOL}${i}${a.EOL}${e}`;r.issueCommand("ENV",n)}else{s.issueCommand("set-env",{name:t},i)}}e.exportVariable=exportVariable;function setSecret(t){s.issueCommand("add-mask",{},t)}e.setSecret=setSecret;function addPath(t){const e=process.env["GITHUB_PATH"]||"";if(e){r.issueCommand("PATH",t)}else{s.issueCommand("add-path",{},t)}process.env["PATH"]=`${t}${u.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(t,e){const i=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!i){throw new Error(`Input required and not supplied: ${t}`)}return i.trim()}e.getInput=getInput;function setOutput(t,e){s.issueCommand("set-output",{name:t},e)}e.setOutput=setOutput;function setCommandEcho(t){s.issue("echo",t?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(t){process.exitCode=h.Failure;error(t)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(t){s.issueCommand("debug",{},t)}e.debug=debug;function error(t){s.issue("error",t instanceof Error?t.toString():t)}e.error=error;function warning(t){s.issue("warning",t instanceof Error?t.toString():t)}e.warning=warning;function info(t){process.stdout.write(t+a.EOL)}e.info=info;function startGroup(t){s.issue("group",t)}e.startGroup=startGroup;function endGroup(){s.issue("endgroup")}e.endGroup=endGroup;function group(t,e){return n(this,void 0,void 0,function*(){startGroup(t);let i;try{i=yield e()}finally{endGroup()}return i})}e.group=group;function saveState(t,e){s.issueCommand("save-state",{name:t},e)}e.saveState=saveState;function getState(t){return process.env[`STATE_${t}`]||""}e.getState=getState},717:function(t,e,i){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)if(Object.hasOwnProperty.call(t,i))e[i]=t[i];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const o=n(i(35747));const s=n(i(12087));const r=i(5278);function issueCommand(t,e){const i=process.env[`GITHUB_${t}`];if(!i){throw new Error(`Unable to find environment variable for file command ${t}`)}if(!o.existsSync(i)){throw new Error(`Missing file at path: ${i}`)}o.appendFileSync(i,`${r.toCommandValue(e)}${s.EOL}`,{encoding:"utf8"})}e.issueCommand=issueCommand},5278:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});function toCommandValue(t){if(t===null||t===undefined){return""}else if(typeof t==="string"||t instanceof String){return t}return JSON.stringify(t)}e.toCommandValue=toCommandValue},87943:(t,e,i)=>{"use strict";var n=i(83691);var o=[];t.exports=asap;function asap(t){var e;if(o.length){e=o.pop()}else{e=new RawTask}e.task=t;e.domain=process.domain;n(e)}function RawTask(){this.task=null;this.domain=null}RawTask.prototype.call=function(){if(this.domain){this.domain.enter()}var t=true;try{this.task.call();t=false;if(this.domain){this.domain.exit()}}finally{if(t){n.requestFlush()}this.task=null;this.domain=null;o.push(this)}}},83691:(t,e,i)=>{"use strict";var n;var o=typeof setImmediate==="function";t.exports=rawAsap;function rawAsap(t){if(!s.length){requestFlush();r=true}s[s.length]=t}var s=[];var r=false;var c=0;var a=1024;function flush(){while(ca){for(var e=0,i=s.length-c;e{t.exports=i(52618)},68104:(t,e,i)=>{"use strict";var n=i(20328);var o=i(13211);var s=i(41934);var r=i(30646);var c=i(98605);var a=i(57211);var u=i(67707).http;var h=i(67707).https;var f=i(78835);var p=i(78761);var d=i(20696);var l=i(15226);var v=i(21516);var m=/https:?/;t.exports=function httpAdapter(t){return new Promise(function dispatchHttpRequest(e,i){var _=function resolve(t){e(t)};var g=function reject(t){i(t)};var y=t.data;var S=t.headers;if(!S["User-Agent"]&&!S["user-agent"]){S["User-Agent"]="axios/"+d.version}if(y&&!n.isStream(y)){if(Buffer.isBuffer(y)){}else if(n.isArrayBuffer(y)){y=Buffer.from(new Uint8Array(y))}else if(n.isString(y)){y=Buffer.from(y,"utf-8")}else{return g(l("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",t))}S["Content-Length"]=y.length}var b=undefined;if(t.auth){var w=t.auth.username||"";var L=t.auth.password||"";b=w+":"+L}var I=s(t.baseURL,t.url);var O=f.parse(I);var N=O.protocol||"http:";if(!b&&O.auth){var x=O.auth.split(":");var C=x[0]||"";var P=x[1]||"";b=C+":"+P}if(b){delete S.Authorization}var k=m.test(N);var F=k?t.httpsAgent:t.httpAgent;var T={path:r(O.path,t.params,t.paramsSerializer).replace(/^\?/,""),method:t.method.toUpperCase(),headers:S,agent:F,agents:{http:t.httpAgent,https:t.httpsAgent},auth:b};if(t.socketPath){T.socketPath=t.socketPath}else{T.hostname=O.hostname;T.port=O.port}var J=t.proxy;if(!J&&J!==false){var E=N.slice(0,-1)+"_proxy";var j=process.env[E]||process.env[E.toUpperCase()];if(j){var U=f.parse(j);var A=process.env.no_proxy||process.env.NO_PROXY;var D=true;if(A){var R=A.split(",").map(function trim(t){return t.trim()});D=!R.some(function proxyMatch(t){if(!t){return false}if(t==="*"){return true}if(t[0]==="."&&O.hostname.substr(O.hostname.length-t.length)===t){return true}return O.hostname===t})}if(D){J={host:U.hostname,port:U.port};if(U.auth){var M=U.auth.split(":");J.auth={username:M[0],password:M[1]}}}}}if(J){T.hostname=J.host;T.host=J.host;T.headers.host=O.hostname+(O.port?":"+O.port:"");T.port=J.port;T.path=N+"//"+O.hostname+(O.port?":"+O.port:"")+T.path;if(J.auth){var W=Buffer.from(J.auth.username+":"+J.auth.password,"utf8").toString("base64");T.headers["Proxy-Authorization"]="Basic "+W}}var q;var z=k&&(J?m.test(J.protocol):true);if(t.transport){q=t.transport}else if(t.maxRedirects===0){q=z?a:c}else{if(t.maxRedirects){T.maxRedirects=t.maxRedirects}q=z?h:u}if(t.maxContentLength&&t.maxContentLength>-1){T.maxBodyLength=t.maxContentLength}var $=q.request(T,function handleResponse(e){if($.aborted)return;var i=e;switch(e.headers["content-encoding"]){case"gzip":case"compress":case"deflate":i=e.statusCode===204?i:i.pipe(p.createUnzip());delete e.headers["content-encoding"];break}var n=e.req||$;var s={status:e.statusCode,statusText:e.statusMessage,headers:e.headers,config:t,request:n};if(t.responseType==="stream"){s.data=i;o(_,g,s)}else{var r=[];i.on("data",function handleStreamData(e){r.push(e);if(t.maxContentLength>-1&&Buffer.concat(r).length>t.maxContentLength){i.destroy();g(l("maxContentLength size of "+t.maxContentLength+" exceeded",t,null,n))}});i.on("error",function handleStreamError(e){if($.aborted)return;g(v(e,t,null,n))});i.on("end",function handleStreamEnd(){var e=Buffer.concat(r);if(t.responseType!=="arraybuffer"){e=e.toString(t.responseEncoding)}s.data=e;o(_,g,s)})}});$.on("error",function handleRequestError(e){if($.aborted)return;g(v(e,t,null,$))});if(t.timeout){$.setTimeout(t.timeout,function handleRequestTimeout(){$.abort();g(l("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",$))})}if(t.cancelToken){t.cancelToken.promise.then(function onCanceled(t){if($.aborted)return;$.abort();g(t)})}if(n.isStream(y)){y.on("error",function handleStreamError(e){g(v(e,t,null,$))}).pipe($)}else{$.end(y)}})}},3454:(t,e,i)=>{"use strict";var n=i(20328);var o=i(13211);var s=i(30646);var r=i(41934);var c=i(86455);var a=i(33608);var u=i(15226);t.exports=function xhrAdapter(t){return new Promise(function dispatchXhrRequest(e,h){var f=t.data;var p=t.headers;if(n.isFormData(f)){delete p["Content-Type"]}var d=new XMLHttpRequest;if(t.auth){var l=t.auth.username||"";var v=t.auth.password||"";p.Authorization="Basic "+btoa(l+":"+v)}var m=r(t.baseURL,t.url);d.open(t.method.toUpperCase(),s(m,t.params,t.paramsSerializer),true);d.timeout=t.timeout;d.onreadystatechange=function handleLoad(){if(!d||d.readyState!==4){return}if(d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)){return}var i="getAllResponseHeaders"in d?c(d.getAllResponseHeaders()):null;var n=!t.responseType||t.responseType==="text"?d.responseText:d.response;var s={data:n,status:d.status,statusText:d.statusText,headers:i,config:t,request:d};o(e,h,s);d=null};d.onabort=function handleAbort(){if(!d){return}h(u("Request aborted",t,"ECONNABORTED",d));d=null};d.onerror=function handleError(){h(u("Network Error",t,null,d));d=null};d.ontimeout=function handleTimeout(){var e="timeout of "+t.timeout+"ms exceeded";if(t.timeoutErrorMessage){e=t.timeoutErrorMessage}h(u(e,t,"ECONNABORTED",d));d=null};if(n.isStandardBrowserEnv()){var _=i(21545);var g=(t.withCredentials||a(m))&&t.xsrfCookieName?_.read(t.xsrfCookieName):undefined;if(g){p[t.xsrfHeaderName]=g}}if("setRequestHeader"in d){n.forEach(p,function setRequestHeader(t,e){if(typeof f==="undefined"&&e.toLowerCase()==="content-type"){delete p[e]}else{d.setRequestHeader(e,t)}})}if(!n.isUndefined(t.withCredentials)){d.withCredentials=!!t.withCredentials}if(t.responseType){try{d.responseType=t.responseType}catch(e){if(t.responseType!=="json"){throw e}}}if(typeof t.onDownloadProgress==="function"){d.addEventListener("progress",t.onDownloadProgress)}if(typeof t.onUploadProgress==="function"&&d.upload){d.upload.addEventListener("progress",t.onUploadProgress)}if(t.cancelToken){t.cancelToken.promise.then(function onCanceled(t){if(!d){return}d.abort();h(t);d=null})}if(f===undefined){f=null}d.send(f)})}},52618:(t,e,i)=>{"use strict";var n=i(20328);var o=i(77065);var s=i(98178);var r=i(74831);var c=i(98190);function createInstance(t){var e=new s(t);var i=o(s.prototype.request,e);n.extend(i,s.prototype,e);n.extend(i,e);return i}var a=createInstance(c);a.Axios=s;a.create=function create(t){return createInstance(r(a.defaults,t))};a.Cancel=i(98875);a.CancelToken=i(71587);a.isCancel=i(64057);a.all=function all(t){return Promise.all(t)};a.spread=i(74850);t.exports=a;t.exports.default=a},98875:t=>{"use strict";function Cancel(t){this.message=t}Cancel.prototype.toString=function toString(){return"Cancel"+(this.message?": "+this.message:"")};Cancel.prototype.__CANCEL__=true;t.exports=Cancel},71587:(t,e,i)=>{"use strict";var n=i(98875);function CancelToken(t){if(typeof t!=="function"){throw new TypeError("executor must be a function.")}var e;this.promise=new Promise(function promiseExecutor(t){e=t});var i=this;t(function cancel(t){if(i.reason){return}i.reason=new n(t);e(i.reason)})}CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason){throw this.reason}};CancelToken.source=function source(){var t;var e=new CancelToken(function executor(e){t=e});return{token:e,cancel:t}};t.exports=CancelToken},64057:t=>{"use strict";t.exports=function isCancel(t){return!!(t&&t.__CANCEL__)}},98178:(t,e,i)=>{"use strict";var n=i(20328);var o=i(30646);var s=i(3214);var r=i(85062);var c=i(74831);function Axios(t){this.defaults=t;this.interceptors={request:new s,response:new s}}Axios.prototype.request=function request(t){if(typeof t==="string"){t=arguments[1]||{};t.url=arguments[0]}else{t=t||{}}t=c(this.defaults,t);if(t.method){t.method=t.method.toLowerCase()}else if(this.defaults.method){t.method=this.defaults.method.toLowerCase()}else{t.method="get"}var e=[r,undefined];var i=Promise.resolve(t);this.interceptors.request.forEach(function unshiftRequestInterceptors(t){e.unshift(t.fulfilled,t.rejected)});this.interceptors.response.forEach(function pushResponseInterceptors(t){e.push(t.fulfilled,t.rejected)});while(e.length){i=i.then(e.shift(),e.shift())}return i};Axios.prototype.getUri=function getUri(t){t=c(this.defaults,t);return o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};n.forEach(["delete","get","head","options"],function forEachMethodNoData(t){Axios.prototype[t]=function(e,i){return this.request(n.merge(i||{},{method:t,url:e}))}});n.forEach(["post","put","patch"],function forEachMethodWithData(t){Axios.prototype[t]=function(e,i,o){return this.request(n.merge(o||{},{method:t,url:e,data:i}))}});t.exports=Axios},3214:(t,e,i)=>{"use strict";var n=i(20328);function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function use(t,e){this.handlers.push({fulfilled:t,rejected:e});return this.handlers.length-1};InterceptorManager.prototype.eject=function eject(t){if(this.handlers[t]){this.handlers[t]=null}};InterceptorManager.prototype.forEach=function forEach(t){n.forEach(this.handlers,function forEachHandler(e){if(e!==null){t(e)}})};t.exports=InterceptorManager},41934:(t,e,i)=>{"use strict";var n=i(41301);var o=i(57189);t.exports=function buildFullPath(t,e){if(t&&!n(e)){return o(t,e)}return e}},15226:(t,e,i)=>{"use strict";var n=i(21516);t.exports=function createError(t,e,i,o,s){var r=new Error(t);return n(r,e,i,o,s)}},85062:(t,e,i)=>{"use strict";var n=i(20328);var o=i(19812);var s=i(64057);var r=i(98190);function throwIfCancellationRequested(t){if(t.cancelToken){t.cancelToken.throwIfRequested()}}t.exports=function dispatchRequest(t){throwIfCancellationRequested(t);t.headers=t.headers||{};t.data=o(t.data,t.headers,t.transformRequest);t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers);n.forEach(["delete","get","head","post","put","patch","common"],function cleanHeaderConfig(e){delete t.headers[e]});var e=t.adapter||r.adapter;return e(t).then(function onAdapterResolution(e){throwIfCancellationRequested(t);e.data=o(e.data,e.headers,t.transformResponse);return e},function onAdapterRejection(e){if(!s(e)){throwIfCancellationRequested(t);if(e&&e.response){e.response.data=o(e.response.data,e.response.headers,t.transformResponse)}}return Promise.reject(e)})}},21516:t=>{"use strict";t.exports=function enhanceError(t,e,i,n,o){t.config=e;if(i){t.code=i}t.request=n;t.response=o;t.isAxiosError=true;t.toJSON=function(){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:this.config,code:this.code}};return t}},74831:(t,e,i)=>{"use strict";var n=i(20328);t.exports=function mergeConfig(t,e){e=e||{};var i={};var o=["url","method","params","data"];var s=["headers","auth","proxy"];var r=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];n.forEach(o,function valueFromConfig2(t){if(typeof e[t]!=="undefined"){i[t]=e[t]}});n.forEach(s,function mergeDeepProperties(o){if(n.isObject(e[o])){i[o]=n.deepMerge(t[o],e[o])}else if(typeof e[o]!=="undefined"){i[o]=e[o]}else if(n.isObject(t[o])){i[o]=n.deepMerge(t[o])}else if(typeof t[o]!=="undefined"){i[o]=t[o]}});n.forEach(r,function defaultToConfig2(n){if(typeof e[n]!=="undefined"){i[n]=e[n]}else if(typeof t[n]!=="undefined"){i[n]=t[n]}});var c=o.concat(s).concat(r);var a=Object.keys(e).filter(function filterAxiosKeys(t){return c.indexOf(t)===-1});n.forEach(a,function otherKeysDefaultToConfig2(n){if(typeof e[n]!=="undefined"){i[n]=e[n]}else if(typeof t[n]!=="undefined"){i[n]=t[n]}});return i}},13211:(t,e,i)=>{"use strict";var n=i(15226);t.exports=function settle(t,e,i){var o=i.config.validateStatus;if(!o||o(i.status)){t(i)}else{e(n("Request failed with status code "+i.status,i.config,null,i.request,i))}}},19812:(t,e,i)=>{"use strict";var n=i(20328);t.exports=function transformData(t,e,i){n.forEach(i,function transform(i){t=i(t,e)});return t}},98190:(t,e,i)=>{"use strict";var n=i(20328);var o=i(36240);var s={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(t,e){if(!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])){t["Content-Type"]=e}}function getDefaultAdapter(){var t;if(typeof XMLHttpRequest!=="undefined"){t=i(3454)}else if(typeof process!=="undefined"&&Object.prototype.toString.call(process)==="[object process]"){t=i(68104)}return t}var r={adapter:getDefaultAdapter(),transformRequest:[function transformRequest(t,e){o(e,"Accept");o(e,"Content-Type");if(n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)){return t}if(n.isArrayBufferView(t)){return t.buffer}if(n.isURLSearchParams(t)){setContentTypeIfUnset(e,"application/x-www-form-urlencoded;charset=utf-8");return t.toString()}if(n.isObject(t)){setContentTypeIfUnset(e,"application/json;charset=utf-8");return JSON.stringify(t)}return t}],transformResponse:[function transformResponse(t){if(typeof t==="string"){try{t=JSON.parse(t)}catch(t){}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function validateStatus(t){return t>=200&&t<300}};r.headers={common:{Accept:"application/json, text/plain, */*"}};n.forEach(["delete","get","head"],function forEachMethodNoData(t){r.headers[t]={}});n.forEach(["post","put","patch"],function forEachMethodWithData(t){r.headers[t]=n.merge(s)});t.exports=r},77065:t=>{"use strict";t.exports=function bind(t,e){return function wrap(){var i=new Array(arguments.length);for(var n=0;n{"use strict";var n=i(20328);function encode(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function buildURL(t,e,i){if(!e){return t}var o;if(i){o=i(e)}else if(n.isURLSearchParams(e)){o=e.toString()}else{var s=[];n.forEach(e,function serialize(t,e){if(t===null||typeof t==="undefined"){return}if(n.isArray(t)){e=e+"[]"}else{t=[t]}n.forEach(t,function parseValue(t){if(n.isDate(t)){t=t.toISOString()}else if(n.isObject(t)){t=JSON.stringify(t)}s.push(encode(e)+"="+encode(t))})});o=s.join("&")}if(o){var r=t.indexOf("#");if(r!==-1){t=t.slice(0,r)}t+=(t.indexOf("?")===-1?"?":"&")+o}return t}},57189:t=>{"use strict";t.exports=function combineURLs(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},21545:(t,e,i)=>{"use strict";var n=i(20328);t.exports=n.isStandardBrowserEnv()?function standardBrowserEnv(){return{write:function write(t,e,i,o,s,r){var c=[];c.push(t+"="+encodeURIComponent(e));if(n.isNumber(i)){c.push("expires="+new Date(i).toGMTString())}if(n.isString(o)){c.push("path="+o)}if(n.isString(s)){c.push("domain="+s)}if(r===true){c.push("secure")}document.cookie=c.join("; ")},read:function read(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function remove(t){this.write(t,"",Date.now()-864e5)}}}():function nonStandardBrowserEnv(){return{write:function write(){},read:function read(){return null},remove:function remove(){}}}()},41301:t=>{"use strict";t.exports=function isAbsoluteURL(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},33608:(t,e,i)=>{"use strict";var n=i(20328);t.exports=n.isStandardBrowserEnv()?function standardBrowserEnv(){var t=/(msie|trident)/i.test(navigator.userAgent);var e=document.createElement("a");var i;function resolveURL(i){var n=i;if(t){e.setAttribute("href",n);n=e.href}e.setAttribute("href",n);return{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}i=resolveURL(window.location.href);return function isURLSameOrigin(t){var e=n.isString(t)?resolveURL(t):t;return e.protocol===i.protocol&&e.host===i.host}}():function nonStandardBrowserEnv(){return function isURLSameOrigin(){return true}}()},36240:(t,e,i)=>{"use strict";var n=i(20328);t.exports=function normalizeHeaderName(t,e){n.forEach(t,function processHeader(i,n){if(n!==e&&n.toUpperCase()===e.toUpperCase()){t[e]=i;delete t[n]}})}},86455:(t,e,i)=>{"use strict";var n=i(20328);var o=["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"];t.exports=function parseHeaders(t){var e={};var i;var s;var r;if(!t){return e}n.forEach(t.split("\n"),function parser(t){r=t.indexOf(":");i=n.trim(t.substr(0,r)).toLowerCase();s=n.trim(t.substr(r+1));if(i){if(e[i]&&o.indexOf(i)>=0){return}if(i==="set-cookie"){e[i]=(e[i]?e[i]:[]).concat([s])}else{e[i]=e[i]?e[i]+", "+s:s}}});return e}},74850:t=>{"use strict";t.exports=function spread(t){return function wrap(e){return t.apply(null,e)}}},20328:(t,e,i)=>{"use strict";var n=i(77065);var o=Object.prototype.toString;function isArray(t){return o.call(t)==="[object Array]"}function isUndefined(t){return typeof t==="undefined"}function isBuffer(t){return t!==null&&!isUndefined(t)&&t.constructor!==null&&!isUndefined(t.constructor)&&typeof t.constructor.isBuffer==="function"&&t.constructor.isBuffer(t)}function isArrayBuffer(t){return o.call(t)==="[object ArrayBuffer]"}function isFormData(t){return typeof FormData!=="undefined"&&t instanceof FormData}function isArrayBufferView(t){var e;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){e=ArrayBuffer.isView(t)}else{e=t&&t.buffer&&t.buffer instanceof ArrayBuffer}return e}function isString(t){return typeof t==="string"}function isNumber(t){return typeof t==="number"}function isObject(t){return t!==null&&typeof t==="object"}function isDate(t){return o.call(t)==="[object Date]"}function isFile(t){return o.call(t)==="[object File]"}function isBlob(t){return o.call(t)==="[object Blob]"}function isFunction(t){return o.call(t)==="[object Function]"}function isStream(t){return isObject(t)&&isFunction(t.pipe)}function isURLSearchParams(t){return typeof URLSearchParams!=="undefined"&&t instanceof URLSearchParams}function trim(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function isStandardBrowserEnv(){if(typeof navigator!=="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}function forEach(t,e){if(t===null||typeof t==="undefined"){return}if(typeof t!=="object"){t=[t]}if(isArray(t)){for(var i=0,n=t.length;i{"use strict";var n=i(64293).Buffer;var o=i(64293).SlowBuffer;t.exports=bufferEq;function bufferEq(t,e){if(!n.isBuffer(t)||!n.isBuffer(e)){return false}if(t.length!==e.length){return false}var i=0;for(var o=0;o=e?t:""+Array(e+1-n.length).join(i)+t},m={s:v,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),n=Math.floor(i/60),o=i%60;return(e<=0?"+":"-")+v(n,2,"0")+":"+v(o,2,"0")},m:function t(e,i){if(e.date(){"use strict";var n=i(21867).Buffer;var o=i(30528);var s=128,r=0,c=32,a=16,u=2,h=a|c|r<<6,f=u|r<<6;function base64Url(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function signatureAsBuffer(t){if(n.isBuffer(t)){return t}else if("string"===typeof t){return n.from(t,"base64")}throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function derToJose(t,e){t=signatureAsBuffer(t);var i=o(e);var r=i+1;var c=t.length;var a=0;if(t[a++]!==h){throw new Error('Could not find expected "seq"')}var u=t[a++];if(u===(s|1)){u=t[a++]}if(c-a=s;if(o){--n}return n}function joseToDer(t,e){t=signatureAsBuffer(t);var i=o(e);var r=t.length;if(r!==i*2){throw new TypeError('"'+e+'" signatures must be "'+i*2+'" bytes, saw "'+r+'"')}var c=countPadding(t,0,i);var a=countPadding(t,i,t.length);var u=i-c;var p=i-a;var d=1+1+u+1+1+p;var l=d{"use strict";function getParamSize(t){var e=(t/8|0)+(t%8===0?0:1);return e}var e={ES256:getParamSize(256),ES384:getParamSize(384),ES512:getParamSize(521)};function getParamBytesForAlg(t){var i=e[t];if(i){return i}throw new Error('Unknown algorithm "'+t+'"')}t.exports=getParamBytesForAlg},67707:(t,e,i)=>{var n=i(78835);var o=i(98605);var s=i(57211);var r=i(42357);var c=i(92413).Writable;var a=i(73226)("follow-redirects");var u={GET:true,HEAD:true,OPTIONS:true,TRACE:true};var h=Object.create(null);["abort","aborted","error","socket","timeout"].forEach(function(t){h[t]=function(e){this._redirectable.emit(t,e)}});function RedirectableRequest(t,e){c.call(this);t.headers=t.headers||{};this._options=t;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t.host){if(!t.hostname){t.hostname=t.host}delete t.host}if(e){this.on("response",e)}var i=this;this._onNativeResponse=function(t){i._processResponse(t)};if(!t.pathname&&t.path){var n=t.path.indexOf("?");if(n<0){t.pathname=t.path}else{t.pathname=t.path.substring(0,n);t.search=t.path.substring(n)}}this._performRequest()}RedirectableRequest.prototype=Object.create(c.prototype);RedirectableRequest.prototype.write=function(t,e,i){if(!(typeof t==="string"||typeof t==="object"&&"length"in t)){throw new Error("data should be a string, Buffer or Uint8Array")}if(typeof e==="function"){i=e;e=null}if(t.length===0){if(i){i()}return}if(this._requestBodyLength+t.length<=this._options.maxBodyLength){this._requestBodyLength+=t.length;this._requestBodyBuffers.push({data:t,encoding:e});this._currentRequest.write(t,e,i)}else{this.emit("error",new Error("Request body larger than maxBodyLength limit"));this.abort()}};RedirectableRequest.prototype.end=function(t,e,i){if(typeof t==="function"){i=t;t=e=null}else if(typeof e==="function"){i=e;e=null}var n=this._currentRequest;this.write(t||"",e,function(){n.end(null,null,i)})};RedirectableRequest.prototype.setHeader=function(t,e){this._options.headers[t]=e;this._currentRequest.setHeader(t,e)};RedirectableRequest.prototype.removeHeader=function(t){delete this._options.headers[t];this._currentRequest.removeHeader(t)};["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive","setTimeout"].forEach(function(t){RedirectableRequest.prototype[t]=function(e,i){return this._currentRequest[t](e,i)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(RedirectableRequest.prototype,t,{get:function(){return this._currentRequest[t]}})});RedirectableRequest.prototype._performRequest=function(){var t=this._options.protocol;var e=this._options.nativeProtocols[t];if(!e){this.emit("error",new Error("Unsupported protocol "+t));return}if(this._options.agents){var i=t.substr(0,t.length-1);this._options.agent=this._options.agents[i]}var o=this._currentRequest=e.request(this._options,this._onNativeResponse);this._currentUrl=n.format(this._options);o._redirectable=this;for(var s in h){if(s){o.on(s,h[s])}}if(this._isRedirect){var r=0;var c=this._requestBodyBuffers;(function writeNext(){if(r=300&&t.statusCode<400){if(++this._redirectCount>this._options.maxRedirects){this.emit("error",new Error("Max redirects exceeded."));return}var i;var o=this._options.headers;if(t.statusCode!==307&&!(this._options.method in u)){this._options.method="GET";this._requestBodyBuffers=[];for(i in o){if(/^content-/i.test(i)){delete o[i]}}}if(!this._isRedirect){for(i in o){if(/^host$/i.test(i)){delete o[i]}}}var s=n.resolve(this._currentUrl,e);a("redirecting to",s);Object.assign(this._options,n.parse(s));this._isRedirect=true;this._performRequest();t.destroy()}else{t.responseUrl=this._currentUrl;t.redirects=this._redirects;this.emit("response",t);this._requestBodyBuffers=[]}};function wrap(t){var e={maxRedirects:21,maxBodyLength:10*1024*1024};var i={};Object.keys(t).forEach(function(o){var s=o+":";var c=i[s]=t[o];var u=e[o]=Object.create(c);u.request=function(t,o){if(typeof t==="string"){t=n.parse(t);t.maxRedirects=e.maxRedirects}else{t=Object.assign({protocol:s,maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},t)}t.nativeProtocols=i;r.equal(t.protocol,s,"protocol mismatch");a("options",t);return new RedirectableRequest(t,o)};u.get=function(t,e){var i=u.request(t,e);i.end();return i}});return e}t.exports=wrap({http:o,https:s});t.exports.wrap=wrap},83542:(t,e,i)=>{e=t.exports=i(80472);e.log=log;e.formatArgs=formatArgs;e.save=save;e.load=load;e.useColors=useColors;e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage();e.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"){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+)/)}e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function formatArgs(t){var i=this.useColors;t[0]=(i?"%c":"")+this.namespace+(i?" %c":" ")+t[0]+(i?"%c ":" ")+"+"+e.humanize(this.diff);if(!i)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var o=0;var s=0;t[0].replace(/%[a-zA-Z%]/g,function(t){if("%%"===t)return;o++;if("%c"===t){s=o}});t.splice(s,0,n)}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(t){try{if(null==t){e.storage.removeItem("debug")}else{e.storage.debug=t}}catch(t){}}function load(){var t;try{t=e.storage.debug}catch(t){}if(!t&&typeof process!=="undefined"&&"env"in process){t=process.env.DEBUG}return t}e.enable(load());function localstorage(){try{return window.localStorage}catch(t){}}},80472:(t,e,i)=>{e=t.exports=createDebug.debug=createDebug["default"]=createDebug;e.coerce=coerce;e.disable=disable;e.enable=enable;e.enabled=enabled;e.humanize=i(80900);e.instances=[];e.names=[];e.skips=[];e.formatters={};function selectColor(t){var i=0,n;for(n in t){i=(i<<5)-i+t.charCodeAt(n);i|=0}return e.colors[Math.abs(i)%e.colors.length]}function createDebug(t){var i;function debug(){if(!debug.enabled)return;var t=debug;var n=+new Date;var o=n-(i||n);t.diff=o;t.prev=i;t.curr=n;i=n;var s=new Array(arguments.length);for(var r=0;r{if(typeof process==="undefined"||process.type==="renderer"){t.exports=i(83542)}else{t.exports=i(8302)}},8302:(t,e,i)=>{var n=i(33867);var o=i(31669);e=t.exports=i(80472);e.init=init;e.log=log;e.formatArgs=formatArgs;e.save=save;e.load=load;e.useColors=useColors;e.colors=[6,2,3,4,5,1];try{var s=i(59318);if(s&&s.level>=2){e.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(t){}e.inspectOpts=Object.keys(process.env).filter(function(t){return/^debug_/i.test(t)}).reduce(function(t,e){var i=e.substring(6).toLowerCase().replace(/_([a-z])/g,function(t,e){return e.toUpperCase()});var n=process.env[e];if(/^(yes|on|true|enabled)$/i.test(n))n=true;else if(/^(no|off|false|disabled)$/i.test(n))n=false;else if(n==="null")n=null;else n=Number(n);t[i]=n;return t},{});function useColors(){return"colors"in e.inspectOpts?Boolean(e.inspectOpts.colors):n.isatty(process.stderr.fd)}e.formatters.o=function(t){this.inspectOpts.colors=this.useColors;return o.inspect(t,this.inspectOpts).split("\n").map(function(t){return t.trim()}).join(" ")};e.formatters.O=function(t){this.inspectOpts.colors=this.useColors;return o.inspect(t,this.inspectOpts)};function formatArgs(t){var i=this.namespace;var n=this.useColors;if(n){var o=this.color;var s="[3"+(o<8?o:"8;5;"+o);var r=" "+s+";1m"+i+" "+"";t[0]=r+t[0].split("\n").join("\n"+r);t.push(s+"m+"+e.humanize(this.diff)+"")}else{t[0]=getDate()+i+" "+t[0]}}function getDate(){if(e.inspectOpts.hideDate){return""}else{return(new Date).toISOString()+" "}}function log(){return process.stderr.write(o.format.apply(o,arguments)+"\n")}function save(t){if(null==t){delete process.env.DEBUG}else{process.env.DEBUG=t}}function load(){return process.env.DEBUG}function init(t){t.inspectOpts={};var i=Object.keys(e.inspectOpts);for(var n=0;n{"use strict";t.exports=((t,e=process.argv)=>{const i=t.startsWith("-")?"":t.length===1?"-":"--";const n=e.indexOf(i+t);const o=e.indexOf("--");return n!==-1&&(o===-1||n{var n=i(4636);t.exports=function(t,e){e=e||{};var i=n.decode(t,e);if(!i){return null}var o=i.payload;if(typeof o==="string"){try{var s=JSON.parse(o);if(s!==null&&typeof s==="object"){o=s}}catch(t){}}if(e.complete===true){return{header:i.header,payload:o,signature:i.signature}}return o}},77486:(t,e,i)=>{t.exports={decode:i(53359),verify:i(12327),sign:i(82022),JsonWebTokenError:i(405),NotBeforeError:i(4383),TokenExpiredError:i(46637)}},405:t=>{var e=function(t,e){Error.call(this,t);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="JsonWebTokenError";this.message=t;if(e)this.inner=e};e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;t.exports=e},4383:(t,e,i)=>{var n=i(405);var o=function(t,e){n.call(this,t);this.name="NotBeforeError";this.date=e};o.prototype=Object.create(n.prototype);o.prototype.constructor=o;t.exports=o},46637:(t,e,i)=>{var n=i(405);var o=function(t,e){n.call(this,t);this.name="TokenExpiredError";this.expiredAt=e};o.prototype=Object.create(n.prototype);o.prototype.constructor=o;t.exports=o},59085:(t,e,i)=>{var n=i(27174);t.exports=n.satisfies(process.version,"^6.12.0 || >=8.0.0")},46098:(t,e,i)=>{var n=i(84098);t.exports=function(t,e){var i=e||Math.floor(Date.now()/1e3);if(typeof t==="string"){var o=n(t);if(typeof o==="undefined"){return}return Math.floor(i+o/1e3)}else if(typeof t==="number"){return i+t}else{return}}},84098:t=>{var e=1e3;var i=e*60;var n=i*60;var o=n*24;var s=o*7;var r=o*365.25;t.exports=function(t,e){e=e||{};var i=typeof t;if(i==="string"&&t.length>0){return parse(t)}else if(i==="number"&&isFinite(t)){return e.long?fmtLong(t):fmtShort(t)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function parse(t){t=String(t);if(t.length>100){return}var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!c){return}var a=parseFloat(c[1]);var u=(c[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return a*r;case"weeks":case"week":case"w":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*i;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return undefined}}function fmtShort(t){var s=Math.abs(t);if(s>=o){return Math.round(t/o)+"d"}if(s>=n){return Math.round(t/n)+"h"}if(s>=i){return Math.round(t/i)+"m"}if(s>=e){return Math.round(t/e)+"s"}return t+"ms"}function fmtLong(t){var s=Math.abs(t);if(s>=o){return plural(t,s,o,"day")}if(s>=n){return plural(t,s,n,"hour")}if(s>=i){return plural(t,s,i,"minute")}if(s>=e){return plural(t,s,e,"second")}return t+" ms"}function plural(t,e,i,n){var o=e>=i*1.5;return Math.round(t/i)+" "+n+(o?"s":"")}},27174:(t,e)=>{e=t.exports=SemVer;var i;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){i=function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER");console.log.apply(console,t)}}else{i=function(){}}e.SEMVER_SPEC_VERSION="2.0.0";var n=256;var o=Number.MAX_SAFE_INTEGER||9007199254740991;var s=16;var r=e.re=[];var c=e.src=[];var a=0;var u=a++;c[u]="0|[1-9]\\d*";var h=a++;c[h]="[0-9]+";var f=a++;c[f]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var p=a++;c[p]="("+c[u]+")\\."+"("+c[u]+")\\."+"("+c[u]+")";var d=a++;c[d]="("+c[h]+")\\."+"("+c[h]+")\\."+"("+c[h]+")";var l=a++;c[l]="(?:"+c[u]+"|"+c[f]+")";var v=a++;c[v]="(?:"+c[h]+"|"+c[f]+")";var m=a++;c[m]="(?:-("+c[l]+"(?:\\."+c[l]+")*))";var _=a++;c[_]="(?:-?("+c[v]+"(?:\\."+c[v]+")*))";var g=a++;c[g]="[0-9A-Za-z-]+";var y=a++;c[y]="(?:\\+("+c[g]+"(?:\\."+c[g]+")*))";var S=a++;var b="v?"+c[p]+c[m]+"?"+c[y]+"?";c[S]="^"+b+"$";var w="[v=\\s]*"+c[d]+c[_]+"?"+c[y]+"?";var L=a++;c[L]="^"+w+"$";var I=a++;c[I]="((?:<|>)?=?)";var O=a++;c[O]=c[h]+"|x|X|\\*";var N=a++;c[N]=c[u]+"|x|X|\\*";var x=a++;c[x]="[v=\\s]*("+c[N]+")"+"(?:\\.("+c[N]+")"+"(?:\\.("+c[N]+")"+"(?:"+c[m]+")?"+c[y]+"?"+")?)?";var C=a++;c[C]="[v=\\s]*("+c[O]+")"+"(?:\\.("+c[O]+")"+"(?:\\.("+c[O]+")"+"(?:"+c[_]+")?"+c[y]+"?"+")?)?";var P=a++;c[P]="^"+c[I]+"\\s*"+c[x]+"$";var k=a++;c[k]="^"+c[I]+"\\s*"+c[C]+"$";var F=a++;c[F]="(?:^|[^\\d])"+"(\\d{1,"+s+"})"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:$|[^\\d])";var T=a++;c[T]="(?:~>?)";var J=a++;c[J]="(\\s*)"+c[T]+"\\s+";r[J]=new RegExp(c[J],"g");var E="$1~";var j=a++;c[j]="^"+c[T]+c[x]+"$";var U=a++;c[U]="^"+c[T]+c[C]+"$";var A=a++;c[A]="(?:\\^)";var D=a++;c[D]="(\\s*)"+c[A]+"\\s+";r[D]=new RegExp(c[D],"g");var R="$1^";var M=a++;c[M]="^"+c[A]+c[x]+"$";var W=a++;c[W]="^"+c[A]+c[C]+"$";var q=a++;c[q]="^"+c[I]+"\\s*("+w+")$|^$";var z=a++;c[z]="^"+c[I]+"\\s*("+b+")$|^$";var $=a++;c[$]="(\\s*)"+c[I]+"\\s*("+w+"|"+c[x]+")";r[$]=new RegExp(c[$],"g");var G="$1$2$3";var V=a++;c[V]="^\\s*("+c[x]+")"+"\\s+-\\s+"+"("+c[x]+")"+"\\s*$";var B=a++;c[B]="^\\s*("+c[C]+")"+"\\s+-\\s+"+"("+c[C]+")"+"\\s*$";var Q=a++;c[Q]="(<|>)?=?\\s*\\*";for(var K=0;Kn){return null}var i=e.loose?r[L]:r[S];if(!i.test(t)){return null}try{return new SemVer(t,e)}catch(t){return null}}e.valid=valid;function valid(t,e){var i=parse(t,e);return i?i.version:null}e.clean=clean;function clean(t,e){var i=parse(t.trim().replace(/^[=v]+/,""),e);return i?i.version:null}e.SemVer=SemVer;function SemVer(t,e){if(!e||typeof e!=="object"){e={loose:!!e,includePrerelease:false}}if(t instanceof SemVer){if(t.loose===e.loose){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError("Invalid Version: "+t)}if(t.length>n){throw new TypeError("version is longer than "+n+" characters")}if(!(this instanceof SemVer)){return new SemVer(t,e)}i("SemVer",t,e);this.options=e;this.loose=!!e.loose;var s=t.trim().match(e.loose?r[L]:r[S]);if(!s){throw new TypeError("Invalid Version: "+t)}this.raw=t;this.major=+s[1];this.minor=+s[2];this.patch=+s[3];if(this.major>o||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>o||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>o||this.patch<0){throw new TypeError("Invalid patch version")}if(!s[4]){this.prerelease=[]}else{this.prerelease=s[4].split(".").map(function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1){this.prerelease.push(0)}}if(e){if(this.prerelease[0]===e){if(isNaN(this.prerelease[1])){this.prerelease=[e,0]}}else{this.prerelease=[e,0]}}break;default:throw new Error("invalid increment argument: "+t)}this.format();this.raw=this.version;return this};e.inc=inc;function inc(t,e,i,n){if(typeof i==="string"){n=i;i=undefined}try{return new SemVer(t,i).inc(e,n).version}catch(t){return null}}e.diff=diff;function diff(t,e){if(eq(t,e)){return null}else{var i=parse(t);var n=parse(e);var o="";if(i.prerelease.length||n.prerelease.length){o="pre";var s="prerelease"}for(var r in i){if(r==="major"||r==="minor"||r==="patch"){if(i[r]!==n[r]){return o+r}}}return s}}e.compareIdentifiers=compareIdentifiers;var H=/^[0-9]+$/;function compareIdentifiers(t,e){var i=H.test(t);var n=H.test(e);if(i&&n){t=+t;e=+e}return t===e?0:i&&!n?-1:n&&!i?1:t0}e.lt=lt;function lt(t,e,i){return compare(t,e,i)<0}e.eq=eq;function eq(t,e,i){return compare(t,e,i)===0}e.neq=neq;function neq(t,e,i){return compare(t,e,i)!==0}e.gte=gte;function gte(t,e,i){return compare(t,e,i)>=0}e.lte=lte;function lte(t,e,i){return compare(t,e,i)<=0}e.cmp=cmp;function cmp(t,e,i,n){switch(e){case"===":if(typeof t==="object")t=t.version;if(typeof i==="object")i=i.version;return t===i;case"!==":if(typeof t==="object")t=t.version;if(typeof i==="object")i=i.version;return t!==i;case"":case"=":case"==":return eq(t,i,n);case"!=":return neq(t,i,n);case">":return gt(t,i,n);case">=":return gte(t,i,n);case"<":return lt(t,i,n);case"<=":return lte(t,i,n);default:throw new TypeError("Invalid operator: "+e)}}e.Comparator=Comparator;function Comparator(t,e){if(!e||typeof e!=="object"){e={loose:!!e,includePrerelease:false}}if(t instanceof Comparator){if(t.loose===!!e.loose){return t}else{t=t.value}}if(!(this instanceof Comparator)){return new Comparator(t,e)}i("comparator",t,e);this.options=e;this.loose=!!e.loose;this.parse(t);if(this.semver===X){this.value=""}else{this.value=this.operator+this.semver.version}i("comp",this)}var X={};Comparator.prototype.parse=function(t){var e=this.options.loose?r[q]:r[z];var i=t.match(e);if(!i){throw new TypeError("Invalid comparator: "+t)}this.operator=i[1];if(this.operator==="="){this.operator=""}if(!i[2]){this.semver=X}else{this.semver=new SemVer(i[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(t){i("Comparator.test",t,this.options.loose);if(this.semver===X){return true}if(typeof t==="string"){t=new SemVer(t,this.options)}return cmp(t,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(t,e){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!e||typeof e!=="object"){e={loose:!!e,includePrerelease:false}}var i;if(this.operator===""){i=new Range(t.value,e);return satisfies(this.value,i,e)}else if(t.operator===""){i=new Range(this.value,e);return satisfies(t.semver,i,e)}var n=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">");var o=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<");var s=this.semver.version===t.semver.version;var r=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<=");var c=cmp(this.semver,"<",t.semver,e)&&((this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"));var a=cmp(this.semver,">",t.semver,e)&&((this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">"));return n||o||s&&r||c||a};e.Range=Range;function Range(t,e){if(!e||typeof e!=="object"){e={loose:!!e,includePrerelease:false}}if(t instanceof Range){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease){return t}else{return new Range(t.raw,e)}}if(t instanceof Comparator){return new Range(t.value,e)}if(!(this instanceof Range)){return new Range(t,e)}this.options=e;this.loose=!!e.loose;this.includePrerelease=!!e.includePrerelease;this.raw=t;this.set=t.split(/\s*\|\|\s*/).map(function(t){return this.parseRange(t.trim())},this).filter(function(t){return t.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+t)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(t){return t.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(t){var e=this.options.loose;t=t.trim();var n=e?r[B]:r[V];t=t.replace(n,hyphenReplace);i("hyphen replace",t);t=t.replace(r[$],G);i("comparator trim",t,r[$]);t=t.replace(r[J],E);t=t.replace(r[D],R);t=t.split(/\s+/).join(" ");var o=e?r[q]:r[z];var s=t.split(" ").map(function(t){return parseComparator(t,this.options)},this).join(" ").split(/\s+/);if(this.options.loose){s=s.filter(function(t){return!!t.match(o)})}s=s.map(function(t){return new Comparator(t,this.options)},this);return s};Range.prototype.intersects=function(t,e){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(function(i){return i.every(function(i){return t.set.some(function(t){return t.every(function(t){return i.intersects(t,e)})})})})};e.toComparators=toComparators;function toComparators(t,e){return new Range(t,e).set.map(function(t){return t.map(function(t){return t.value}).join(" ").trim().split(" ")})}function parseComparator(t,e){i("comp",t,e);t=replaceCarets(t,e);i("caret",t);t=replaceTildes(t,e);i("tildes",t);t=replaceXRanges(t,e);i("xrange",t);t=replaceStars(t,e);i("stars",t);return t}function isX(t){return!t||t.toLowerCase()==="x"||t==="*"}function replaceTildes(t,e){return t.trim().split(/\s+/).map(function(t){return replaceTilde(t,e)}).join(" ")}function replaceTilde(t,e){var n=e.loose?r[U]:r[j];return t.replace(n,function(e,n,o,s,r){i("tilde",t,e,n,o,s,r);var c;if(isX(n)){c=""}else if(isX(o)){c=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(s)){c=">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0"}else if(r){i("replaceTilde pr",r);c=">="+n+"."+o+"."+s+"-"+r+" <"+n+"."+(+o+1)+".0"}else{c=">="+n+"."+o+"."+s+" <"+n+"."+(+o+1)+".0"}i("tilde return",c);return c})}function replaceCarets(t,e){return t.trim().split(/\s+/).map(function(t){return replaceCaret(t,e)}).join(" ")}function replaceCaret(t,e){i("caret",t,e);var n=e.loose?r[W]:r[M];return t.replace(n,function(e,n,o,s,r){i("caret",t,e,n,o,s,r);var c;if(isX(n)){c=""}else if(isX(o)){c=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(s)){if(n==="0"){c=">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0"}else{c=">="+n+"."+o+".0 <"+(+n+1)+".0.0"}}else if(r){i("replaceCaret pr",r);if(n==="0"){if(o==="0"){c=">="+n+"."+o+"."+s+"-"+r+" <"+n+"."+o+"."+(+s+1)}else{c=">="+n+"."+o+"."+s+"-"+r+" <"+n+"."+(+o+1)+".0"}}else{c=">="+n+"."+o+"."+s+"-"+r+" <"+(+n+1)+".0.0"}}else{i("no pr");if(n==="0"){if(o==="0"){c=">="+n+"."+o+"."+s+" <"+n+"."+o+"."+(+s+1)}else{c=">="+n+"."+o+"."+s+" <"+n+"."+(+o+1)+".0"}}else{c=">="+n+"."+o+"."+s+" <"+(+n+1)+".0.0"}}i("caret return",c);return c})}function replaceXRanges(t,e){i("replaceXRanges",t,e);return t.split(/\s+/).map(function(t){return replaceXRange(t,e)}).join(" ")}function replaceXRange(t,e){t=t.trim();var n=e.loose?r[k]:r[P];return t.replace(n,function(e,n,o,s,r,c){i("xRange",t,e,n,o,s,r,c);var a=isX(o);var u=a||isX(s);var h=u||isX(r);var f=h;if(n==="="&&f){n=""}if(a){if(n===">"||n==="<"){e="<0.0.0"}else{e="*"}}else if(n&&f){if(u){s=0}r=0;if(n===">"){n=">=";if(u){o=+o+1;s=0;r=0}else{s=+s+1;r=0}}else if(n==="<="){n="<";if(u){o=+o+1}else{s=+s+1}}e=n+o+"."+s+"."+r}else if(u){e=">="+o+".0.0 <"+(+o+1)+".0.0"}else if(h){e=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"}i("xRange return",e);return e})}function replaceStars(t,e){i("replaceStars",t,e);return t.trim().replace(r[Q],"")}function hyphenReplace(t,e,i,n,o,s,r,c,a,u,h,f,p){if(isX(i)){e=""}else if(isX(n)){e=">="+i+".0.0"}else if(isX(o)){e=">="+i+"."+n+".0"}else{e=">="+e}if(isX(a)){c=""}else if(isX(u)){c="<"+(+a+1)+".0.0"}else if(isX(h)){c="<"+a+"."+(+u+1)+".0"}else if(f){c="<="+a+"."+u+"."+h+"-"+f}else{c="<="+c}return(e+" "+c).trim()}Range.prototype.test=function(t){if(!t){return false}if(typeof t==="string"){t=new SemVer(t,this.options)}for(var e=0;e0){var s=t[o].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch){return true}}}return false}return true}e.satisfies=satisfies;function satisfies(t,e,i){try{e=new Range(e,i)}catch(t){return false}return e.test(t)}e.maxSatisfying=maxSatisfying;function maxSatisfying(t,e,i){var n=null;var o=null;try{var s=new Range(e,i)}catch(t){return null}t.forEach(function(t){if(s.test(t)){if(!n||o.compare(t)===-1){n=t;o=new SemVer(n,i)}}});return n}e.minSatisfying=minSatisfying;function minSatisfying(t,e,i){var n=null;var o=null;try{var s=new Range(e,i)}catch(t){return null}t.forEach(function(t){if(s.test(t)){if(!n||o.compare(t)===1){n=t;o=new SemVer(n,i)}}});return n}e.minVersion=minVersion;function minVersion(t,e){t=new Range(t,e);var i=new SemVer("0.0.0");if(t.test(i)){return i}i=new SemVer("0.0.0-0");if(t.test(i)){return i}i=null;for(var n=0;n":if(e.prerelease.length===0){e.patch++}else{e.prerelease.push(0)}e.raw=e.format();case"":case">=":if(!i||gt(i,e)){i=e}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+t.operator)}})}if(i&&t.test(i)){return i}return null}e.validRange=validRange;function validRange(t,e){try{return new Range(t,e).range||"*"}catch(t){return null}}e.ltr=ltr;function ltr(t,e,i){return outside(t,e,"<",i)}e.gtr=gtr;function gtr(t,e,i){return outside(t,e,">",i)}e.outside=outside;function outside(t,e,i,n){t=new SemVer(t,n);e=new Range(e,n);var o,s,r,c,a;switch(i){case">":o=gt;s=lte;r=lt;c=">";a=">=";break;case"<":o=lt;s=gte;r=gt;c="<";a="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(t,e,n)){return false}for(var u=0;u=0.0.0")}f=f||t;p=p||t;if(o(t.semver,f.semver,n)){f=t}else if(r(t.semver,p.semver,n)){p=t}});if(f.operator===c||f.operator===a){return false}if((!p.operator||p.operator===c)&&s(t,p.semver)){return false}else if(p.operator===a&&r(t,p.semver)){return false}}return true}e.prerelease=prerelease;function prerelease(t,e){var i=parse(t,e);return i&&i.prerelease.length?i.prerelease:null}e.intersects=intersects;function intersects(t,e,i){t=new Range(t,i);e=new Range(e,i);return t.intersects(e)}e.coerce=coerce;function coerce(t){if(t instanceof SemVer){return t}if(typeof t!=="string"){return null}var e=t.match(r[F]);if(e==null){return null}return parse(e[1]+"."+(e[2]||"0")+"."+(e[3]||"0"))}},82022:(t,e,i)=>{var n=i(46098);var o=i(59085);var s=i(4636);var r=i(17931);var c=i(16501);var a=i(21441);var u=i(40298);var h=i(25723);var f=i(25180);var p=i(94499);var d=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];if(o){d.splice(3,0,"PS256","PS384","PS512")}var l={expiresIn:{isValid:function(t){return a(t)||f(t)&&t},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(t){return a(t)||f(t)&&t},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(t){return f(t)||Array.isArray(t)},message:'"audience" must be a string or array'},algorithm:{isValid:r.bind(null,d),message:'"algorithm" must be a valid string enum value'},header:{isValid:h,message:'"header" must be an object'},encoding:{isValid:f,message:'"encoding" must be a string'},issuer:{isValid:f,message:'"issuer" must be a string'},subject:{isValid:f,message:'"subject" must be a string'},jwtid:{isValid:f,message:'"jwtid" must be a string'},noTimestamp:{isValid:c,message:'"noTimestamp" must be a boolean'},keyid:{isValid:f,message:'"keyid" must be a string'},mutatePayload:{isValid:c,message:'"mutatePayload" must be a boolean'}};var v={iat:{isValid:u,message:'"iat" should be a number of seconds'},exp:{isValid:u,message:'"exp" should be a number of seconds'},nbf:{isValid:u,message:'"nbf" should be a number of seconds'}};function validate(t,e,i,n){if(!h(i)){throw new Error('Expected "'+n+'" to be a plain object.')}Object.keys(i).forEach(function(o){var s=t[o];if(!s){if(!e){throw new Error('"'+o+'" is not allowed in "'+n+'"')}return}if(!s.isValid(i[o])){throw new Error(s.message)}})}function validateOptions(t){return validate(l,false,t,"options")}function validatePayload(t){return validate(v,true,t,"payload")}var m={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"};var _=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];t.exports=function(t,e,i,o){if(typeof i==="function"){o=i;i={}}else{i=i||{}}var r=typeof t==="object"&&!Buffer.isBuffer(t);var c=Object.assign({alg:i.algorithm||"HS256",typ:r?"JWT":undefined,kid:i.keyid},i.header);function failure(t){if(o){return o(t)}throw t}if(!e&&i.algorithm!=="none"){return failure(new Error("secretOrPrivateKey must have a value"))}if(typeof t==="undefined"){return failure(new Error("payload is required"))}else if(r){try{validatePayload(t)}catch(t){return failure(t)}if(!i.mutatePayload){t=Object.assign({},t)}}else{var a=_.filter(function(t){return typeof i[t]!=="undefined"});if(a.length>0){return failure(new Error("invalid "+a.join(",")+" option for "+typeof t+" payload"))}}if(typeof t.exp!=="undefined"&&typeof i.expiresIn!=="undefined"){return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'))}if(typeof t.nbf!=="undefined"&&typeof i.notBefore!=="undefined"){return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'))}try{validateOptions(i)}catch(t){return failure(t)}var u=t.iat||Math.floor(Date.now()/1e3);if(i.noTimestamp){delete t.iat}else if(r){t.iat=u}if(typeof i.notBefore!=="undefined"){try{t.nbf=n(i.notBefore,u)}catch(t){return failure(t)}if(typeof t.nbf==="undefined"){return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}}if(typeof i.expiresIn!=="undefined"&&typeof t==="object"){try{t.exp=n(i.expiresIn,u)}catch(t){return failure(t)}if(typeof t.exp==="undefined"){return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}}Object.keys(m).forEach(function(e){var n=m[e];if(typeof i[e]!=="undefined"){if(typeof t[n]!=="undefined"){return failure(new Error('Bad "options.'+e+'" option. The payload already has an "'+n+'" property.'))}t[n]=i[e]}});var h=i.encoding||"utf8";if(typeof o==="function"){o=o&&p(o);s.createSign({header:c,privateKey:e,payload:t,encoding:h}).once("error",o).once("done",function(t){o(null,t)})}else{return s.sign({header:c,payload:t,secret:e,encoding:h})}}},12327:(t,e,i)=>{var n=i(405);var o=i(4383);var s=i(46637);var r=i(53359);var c=i(46098);var a=i(59085);var u=i(4636);var h=["RS256","RS384","RS512","ES256","ES384","ES512"];var f=["RS256","RS384","RS512"];var p=["HS256","HS384","HS512"];if(a){h.splice(3,0,"PS256","PS384","PS512");f.splice(3,0,"PS256","PS384","PS512")}t.exports=function(t,e,i,a){if(typeof i==="function"&&!a){a=i;i={}}if(!i){i={}}i=Object.assign({},i);var d;if(a){d=a}else{d=function(t,e){if(t)throw t;return e}}if(i.clockTimestamp&&typeof i.clockTimestamp!=="number"){return d(new n("clockTimestamp must be a number"))}if(i.nonce!==undefined&&(typeof i.nonce!=="string"||i.nonce.trim()==="")){return d(new n("nonce must be a non-empty string"))}var l=i.clockTimestamp||Math.floor(Date.now()/1e3);if(!t){return d(new n("jwt must be provided"))}if(typeof t!=="string"){return d(new n("jwt must be a string"))}var v=t.split(".");if(v.length!==3){return d(new n("jwt malformed"))}var m;try{m=r(t,{complete:true})}catch(t){return d(t)}if(!m){return d(new n("invalid token"))}var _=m.header;var g;if(typeof e==="function"){if(!a){return d(new n("verify must be called asynchronous if secret or public key is provided as a callback"))}g=e}else{g=function(t,i){return i(null,e)}}return g(_,function(e,r){if(e){return d(new n("error in secret or public key callback: "+e.message))}var a=v[2].trim()!=="";if(!a&&r){return d(new n("jwt signature is required"))}if(a&&!r){return d(new n("secret or public key must be provided"))}if(!a&&!i.algorithms){i.algorithms=["none"]}if(!i.algorithms){i.algorithms=~r.toString().indexOf("BEGIN CERTIFICATE")||~r.toString().indexOf("BEGIN PUBLIC KEY")?h:~r.toString().indexOf("BEGIN RSA PUBLIC KEY")?f:p}if(!~i.algorithms.indexOf(m.header.alg)){return d(new n("invalid algorithm"))}var g;try{g=u.verify(t,m.header.alg,r)}catch(t){return d(t)}if(!g){return d(new n("invalid signature"))}var y=m.payload;if(typeof y.nbf!=="undefined"&&!i.ignoreNotBefore){if(typeof y.nbf!=="number"){return d(new n("invalid nbf value"))}if(y.nbf>l+(i.clockTolerance||0)){return d(new o("jwt not active",new Date(y.nbf*1e3)))}}if(typeof y.exp!=="undefined"&&!i.ignoreExpiration){if(typeof y.exp!=="number"){return d(new n("invalid exp value"))}if(l>=y.exp+(i.clockTolerance||0)){return d(new s("jwt expired",new Date(y.exp*1e3)))}}if(i.audience){var S=Array.isArray(i.audience)?i.audience:[i.audience];var b=Array.isArray(y.aud)?y.aud:[y.aud];var w=b.some(function(t){return S.some(function(e){return e instanceof RegExp?e.test(t):e===t})});if(!w){return d(new n("jwt audience invalid. expected: "+S.join(" or ")))}}if(i.issuer){var L=typeof i.issuer==="string"&&y.iss!==i.issuer||Array.isArray(i.issuer)&&i.issuer.indexOf(y.iss)===-1;if(L){return d(new n("jwt issuer invalid. expected: "+i.issuer))}}if(i.subject){if(y.sub!==i.subject){return d(new n("jwt subject invalid. expected: "+i.subject))}}if(i.jwtid){if(y.jti!==i.jwtid){return d(new n("jwt jwtid invalid. expected: "+i.jwtid))}}if(i.nonce){if(y.nonce!==i.nonce){return d(new n("jwt nonce invalid. expected: "+i.nonce))}}if(i.maxAge){if(typeof y.iat!=="number"){return d(new n("iat required when maxAge is specified"))}var I=c(i.maxAge,y.iat);if(typeof I==="undefined"){return d(new n('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(l>=I+(i.clockTolerance||0)){return d(new s("maxAge exceeded",new Date(I*1e3)))}}if(i.complete===true){var O=m.signature;return d(null,{header:_,payload:y,signature:O})}return d(null,y)})}},96010:(t,e,i)=>{var n=i(9239);var o=i(21867).Buffer;var s=i(76417);var r=i(11728);var c=i(31669);var a='"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".';var u="secret must be a string or buffer";var h="key must be a string or a buffer";var f="key must be a string, a buffer or an object";var p=typeof s.createPublicKey==="function";if(p){h+=" or a KeyObject";u+="or a KeyObject"}function checkIsPublicKey(t){if(o.isBuffer(t)){return}if(typeof t==="string"){return}if(!p){throw typeError(h)}if(typeof t!=="object"){throw typeError(h)}if(typeof t.type!=="string"){throw typeError(h)}if(typeof t.asymmetricKeyType!=="string"){throw typeError(h)}if(typeof t.export!=="function"){throw typeError(h)}}function checkIsPrivateKey(t){if(o.isBuffer(t)){return}if(typeof t==="string"){return}if(typeof t==="object"){return}throw typeError(f)}function checkIsSecretKey(t){if(o.isBuffer(t)){return}if(typeof t==="string"){return t}if(!p){throw typeError(u)}if(typeof t!=="object"){throw typeError(u)}if(t.type!=="secret"){throw typeError(u)}if(typeof t.export!=="function"){throw typeError(u)}}function fromBase64(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function toBase64(t){t=t.toString();var e=4-t.length%4;if(e!==4){for(var i=0;i{var n=i(73334);var o=i(5522);var s=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];e.ALGORITHMS=s;e.sign=n.sign;e.verify=o.verify;e.decode=o.decode;e.isValid=o.isValid;e.createSign=function createSign(t){return new n(t)};e.createVerify=function createVerify(t){return new o(t)}},61868:(t,e,i)=>{var n=i(21867).Buffer;var o=i(92413);var s=i(31669);function DataStream(t){this.buffer=null;this.writable=true;this.readable=true;if(!t){this.buffer=n.alloc(0);return this}if(typeof t.pipe==="function"){this.buffer=n.alloc(0);t.pipe(this);return this}if(t.length||typeof t==="object"){this.buffer=t;this.writable=false;process.nextTick(function(){this.emit("end",t);this.readable=false;this.emit("close")}.bind(this));return this}throw new TypeError("Unexpected data type ("+typeof t+")")}s.inherits(DataStream,o);DataStream.prototype.write=function write(t){this.buffer=n.concat([this.buffer,n.from(t)]);this.emit("data",t)};DataStream.prototype.end=function end(t){if(t)this.write(t);this.emit("end",t);this.emit("close");this.writable=false;this.readable=false};t.exports=DataStream},73334:(t,e,i)=>{var n=i(21867).Buffer;var o=i(61868);var s=i(96010);var r=i(92413);var c=i(65292);var a=i(31669);function base64url(t,e){return n.from(t,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function jwsSecuredInput(t,e,i){i=i||"utf8";var n=base64url(c(t),"binary");var o=base64url(c(e),i);return a.format("%s.%s",n,o)}function jwsSign(t){var e=t.header;var i=t.payload;var n=t.secret||t.privateKey;var o=t.encoding;var r=s(e.alg);var c=jwsSecuredInput(e,i,o);var u=r.sign(c,n);return a.format("%s.%s",c,u)}function SignStream(t){var e=t.secret||t.privateKey||t.key;var i=new o(e);this.readable=true;this.header=t.header;this.encoding=t.encoding;this.secret=this.privateKey=this.key=i;this.payload=new o(t.payload);this.secret.once("close",function(){if(!this.payload.writable&&this.readable)this.sign()}.bind(this));this.payload.once("close",function(){if(!this.secret.writable&&this.readable)this.sign()}.bind(this))}a.inherits(SignStream,r);SignStream.prototype.sign=function sign(){try{var t=jwsSign({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});this.emit("done",t);this.emit("data",t);this.emit("end");this.readable=false;return t}catch(t){this.readable=false;this.emit("error",t);this.emit("close")}};SignStream.sign=jwsSign;t.exports=SignStream},65292:(t,e,i)=>{var n=i(64293).Buffer;t.exports=function toString(t){if(typeof t==="string")return t;if(typeof t==="number"||n.isBuffer(t))return t.toString();return JSON.stringify(t)}},5522:(t,e,i)=>{var n=i(21867).Buffer;var o=i(61868);var s=i(96010);var r=i(92413);var c=i(65292);var a=i(31669);var u=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function isObject(t){return Object.prototype.toString.call(t)==="[object Object]"}function safeJsonParse(t){if(isObject(t))return t;try{return JSON.parse(t)}catch(t){return undefined}}function headerFromJWS(t){var e=t.split(".",1)[0];return safeJsonParse(n.from(e,"base64").toString("binary"))}function securedInputFromJWS(t){return t.split(".",2).join(".")}function signatureFromJWS(t){return t.split(".")[2]}function payloadFromJWS(t,e){e=e||"utf8";var i=t.split(".")[1];return n.from(i,"base64").toString(e)}function isValidJws(t){return u.test(t)&&!!headerFromJWS(t)}function jwsVerify(t,e,i){if(!e){var n=new Error("Missing algorithm parameter for jws.verify");n.code="MISSING_ALGORITHM";throw n}t=c(t);var o=signatureFromJWS(t);var r=securedInputFromJWS(t);var a=s(e);return a.verify(r,o,i)}function jwsDecode(t,e){e=e||{};t=c(t);if(!isValidJws(t))return null;var i=headerFromJWS(t);if(!i)return null;var n=payloadFromJWS(t);if(i.typ==="JWT"||e.json)n=JSON.parse(n,e.encoding);return{header:i,payload:n,signature:signatureFromJWS(t)}}function VerifyStream(t){t=t||{};var e=t.secret||t.publicKey||t.key;var i=new o(e);this.readable=true;this.algorithm=t.algorithm;this.encoding=t.encoding;this.secret=this.publicKey=this.key=i;this.signature=new o(t.signature);this.secret.once("close",function(){if(!this.signature.writable&&this.readable)this.verify()}.bind(this));this.signature.once("close",function(){if(!this.secret.writable&&this.readable)this.verify()}.bind(this))}a.inherits(VerifyStream,r);VerifyStream.prototype.verify=function verify(){try{var t=jwsVerify(this.signature.buffer,this.algorithm,this.key.buffer);var e=jwsDecode(this.signature.buffer,this.encoding);this.emit("done",t,e);this.emit("data",t);this.emit("end");this.readable=false;return t}catch(t){this.readable=false;this.emit("error",t);this.emit("close")}};VerifyStream.decode=jwsDecode;VerifyStream.isValid=isValidJws;VerifyStream.verify=jwsVerify;t.exports=VerifyStream},17931:t=>{var e=1/0,i=9007199254740991,n=1.7976931348623157e308,o=0/0;var s="[object Arguments]",r="[object Function]",c="[object GeneratorFunction]",a="[object String]",u="[object Symbol]";var h=/^\s+|\s+$/g;var f=/^[-+]0x[0-9a-f]+$/i;var p=/^0b[01]+$/i;var d=/^0o[0-7]+$/i;var l=/^(?:0|[1-9]\d*)$/;var v=parseInt;function arrayMap(t,e){var i=-1,n=t?t.length:0,o=Array(n);while(++i-1&&t%1==0&&t-1:!!o&&baseIndexOf(t,e,i)>-1}function isArguments(t){return isArrayLikeObject(t)&&_.call(t,"callee")&&(!y.call(t,"callee")||g.call(t)==s)}var w=Array.isArray;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isFunction(t){var e=isObject(t)?g.call(t):"";return e==r||e==c}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=i}function isObject(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}function isString(t){return typeof t=="string"||!w(t)&&isObjectLike(t)&&g.call(t)==a}function isSymbol(t){return typeof t=="symbol"||isObjectLike(t)&&g.call(t)==u}function toFinite(t){if(!t){return t===0?t:0}t=toNumber(t);if(t===e||t===-e){var i=t<0?-1:1;return i*n}return t===t?t:0}function toInteger(t){var e=toFinite(t),i=e%1;return e===e?i?e-i:e:0}function toNumber(t){if(typeof t=="number"){return t}if(isSymbol(t)){return o}if(isObject(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=isObject(e)?e+"":e}if(typeof t!="string"){return t===0?t:+t}t=t.replace(h,"");var i=p.test(t);return i||d.test(t)?v(t.slice(2),i?2:8):f.test(t)?o:+t}function keys(t){return isArrayLike(t)?arrayLikeKeys(t):baseKeys(t)}function values(t){return t?baseValues(t,keys(t)):[]}t.exports=includes},16501:t=>{var e="[object Boolean]";var i=Object.prototype;var n=i.toString;function isBoolean(t){return t===true||t===false||isObjectLike(t)&&n.call(t)==e}function isObjectLike(t){return!!t&&typeof t=="object"}t.exports=isBoolean},21441:t=>{var e=1/0,i=1.7976931348623157e308,n=0/0;var o="[object Symbol]";var s=/^\s+|\s+$/g;var r=/^[-+]0x[0-9a-f]+$/i;var c=/^0b[01]+$/i;var a=/^0o[0-7]+$/i;var u=parseInt;var h=Object.prototype;var f=h.toString;function isInteger(t){return typeof t=="number"&&t==toInteger(t)}function isObject(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}function isSymbol(t){return typeof t=="symbol"||isObjectLike(t)&&f.call(t)==o}function toFinite(t){if(!t){return t===0?t:0}t=toNumber(t);if(t===e||t===-e){var n=t<0?-1:1;return n*i}return t===t?t:0}function toInteger(t){var e=toFinite(t),i=e%1;return e===e?i?e-i:e:0}function toNumber(t){if(typeof t=="number"){return t}if(isSymbol(t)){return n}if(isObject(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=isObject(e)?e+"":e}if(typeof t!="string"){return t===0?t:+t}t=t.replace(s,"");var i=c.test(t);return i||a.test(t)?u(t.slice(2),i?2:8):r.test(t)?n:+t}t.exports=isInteger},40298:t=>{var e="[object Number]";var i=Object.prototype;var n=i.toString;function isObjectLike(t){return!!t&&typeof t=="object"}function isNumber(t){return typeof t=="number"||isObjectLike(t)&&n.call(t)==e}t.exports=isNumber},25723:t=>{var e="[object Object]";function isHostObject(t){var e=false;if(t!=null&&typeof t.toString!="function"){try{e=!!(t+"")}catch(t){}}return e}function overArg(t,e){return function(i){return t(e(i))}}var i=Function.prototype,n=Object.prototype;var o=i.toString;var s=n.hasOwnProperty;var r=o.call(Object);var c=n.toString;var a=overArg(Object.getPrototypeOf,Object);function isObjectLike(t){return!!t&&typeof t=="object"}function isPlainObject(t){if(!isObjectLike(t)||c.call(t)!=e||isHostObject(t)){return false}var i=a(t);if(i===null){return true}var n=s.call(i,"constructor")&&i.constructor;return typeof n=="function"&&n instanceof n&&o.call(n)==r}t.exports=isPlainObject},25180:t=>{var e="[object String]";var i=Object.prototype;var n=i.toString;var o=Array.isArray;function isObjectLike(t){return!!t&&typeof t=="object"}function isString(t){return typeof t=="string"||!o(t)&&isObjectLike(t)&&n.call(t)==e}t.exports=isString},94499:t=>{var e="Expected a function";var i=1/0,n=1.7976931348623157e308,o=0/0;var s="[object Symbol]";var r=/^\s+|\s+$/g;var c=/^[-+]0x[0-9a-f]+$/i;var a=/^0b[01]+$/i;var u=/^0o[0-7]+$/i;var h=parseInt;var f=Object.prototype;var p=f.toString;function before(t,i){var n;if(typeof i!="function"){throw new TypeError(e)}t=toInteger(t);return function(){if(--t>0){n=i.apply(this,arguments)}if(t<=1){i=undefined}return n}}function once(t){return before(2,t)}function isObject(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}function isSymbol(t){return typeof t=="symbol"||isObjectLike(t)&&p.call(t)==s}function toFinite(t){if(!t){return t===0?t:0}t=toNumber(t);if(t===i||t===-i){var e=t<0?-1:1;return e*n}return t===t?t:0}function toInteger(t){var e=toFinite(t),i=e%1;return e===e?i?e-i:e:0}function toNumber(t){if(typeof t=="number"){return t}if(isSymbol(t)){return o}if(isObject(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=isObject(e)?e+"":e}if(typeof t!="string"){return t===0?t:+t}t=t.replace(r,"");var i=a.test(t);return i||u.test(t)?h(t.slice(2),i?2:8):c.test(t)?o:+t}t.exports=once},90250:function(t,e,i){t=i.nmd(t);(function(){var i;var n="4.17.20";var o=200;var s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",r="Expected a function";var c="__lodash_hash_undefined__";var a=500;var u="__lodash_placeholder__";var h=1,f=2,p=4;var d=1,l=2;var v=1,m=2,_=4,g=8,y=16,S=32,b=64,w=128,L=256,I=512;var O=30,N="...";var x=800,C=16;var P=1,k=2,F=3;var T=1/0,J=9007199254740991,E=1.7976931348623157e308,j=0/0;var U=4294967295,A=U-1,D=U>>>1;var R=[["ary",w],["bind",v],["bindKey",m],["curry",g],["curryRight",y],["flip",I],["partial",S],["partialRight",b],["rearg",L]];var M="[object Arguments]",W="[object Array]",q="[object AsyncFunction]",z="[object Boolean]",$="[object Date]",G="[object DOMException]",V="[object Error]",B="[object Function]",Q="[object GeneratorFunction]",K="[object Map]",H="[object Number]",X="[object Null]",Y="[object Object]",Z="[object Promise]",tt="[object Proxy]",et="[object RegExp]",it="[object Set]",nt="[object String]",ot="[object Symbol]",st="[object Undefined]",rt="[object WeakMap]",ct="[object WeakSet]";var at="[object ArrayBuffer]",ut="[object DataView]",ht="[object Float32Array]",ft="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",lt="[object Int32Array]",vt="[object Uint8Array]",mt="[object Uint8ClampedArray]",_t="[object Uint16Array]",gt="[object Uint32Array]";var yt=/\b__p \+= '';/g,St=/\b(__p \+=) '' \+/g,bt=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var wt=/&(?:amp|lt|gt|quot|#39);/g,Lt=/[&<>"']/g,It=RegExp(wt.source),Ot=RegExp(Lt.source);var Nt=/<%-([\s\S]+?)%>/g,xt=/<%([\s\S]+?)%>/g,Ct=/<%=([\s\S]+?)%>/g;var Pt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kt=/^\w*$/,Ft=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var Tt=/[\\^$.*+?()[\]{}|]/g,Jt=RegExp(Tt.source);var Et=/^\s+|\s+$/g,jt=/^\s+/,Ut=/\s+$/;var At=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Dt=/\{\n\/\* \[wrapped with (.+)\] \*/,Rt=/,? & /;var Mt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Wt=/\\(\\)?/g;var qt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var zt=/\w*$/;var $t=/^[-+]0x[0-9a-f]+$/i;var Gt=/^0b[01]+$/i;var Vt=/^\[object .+?Constructor\]$/;var Bt=/^0o[0-7]+$/i;var Qt=/^(?:0|[1-9]\d*)$/;var Kt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;var Ht=/($^)/;var Xt=/['\n\r\u2028\u2029\\]/g;var Yt="\\ud800-\\udfff",Zt="\\u0300-\\u036f",te="\\ufe20-\\ufe2f",ee="\\u20d0-\\u20ff",ie=Zt+te+ee,ne="\\u2700-\\u27bf",oe="a-z\\xdf-\\xf6\\xf8-\\xff",se="\\xac\\xb1\\xd7\\xf7",re="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ce="\\u2000-\\u206f",ae=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ue="A-Z\\xc0-\\xd6\\xd8-\\xde",he="\\ufe0e\\ufe0f",fe=se+re+ce+ae;var pe="['’]",de="["+Yt+"]",le="["+fe+"]",ve="["+ie+"]",me="\\d+",_e="["+ne+"]",ge="["+oe+"]",ye="[^"+Yt+fe+me+ne+oe+ue+"]",Se="\\ud83c[\\udffb-\\udfff]",be="(?:"+ve+"|"+Se+")",we="[^"+Yt+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",Oe="["+ue+"]",Ne="\\u200d";var xe="(?:"+ge+"|"+ye+")",Ce="(?:"+Oe+"|"+ye+")",Pe="(?:"+pe+"(?:d|ll|m|re|s|t|ve))?",ke="(?:"+pe+"(?:D|LL|M|RE|S|T|VE))?",Fe=be+"?",Te="["+he+"]?",Je="(?:"+Ne+"(?:"+[we,Le,Ie].join("|")+")"+Te+Fe+")*",Ee="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ue=Te+Fe+Je,Ae="(?:"+[_e,Le,Ie].join("|")+")"+Ue,De="(?:"+[we+ve+"?",ve,Le,Ie,de].join("|")+")";var Re=RegExp(pe,"g");var Me=RegExp(ve,"g");var We=RegExp(Se+"(?="+Se+")|"+De+Ue,"g");var qe=RegExp([Oe+"?"+ge+"+"+Pe+"(?="+[le,Oe,"$"].join("|")+")",Ce+"+"+ke+"(?="+[le,Oe+xe,"$"].join("|")+")",Oe+"?"+xe+"+"+Pe,Oe+"+"+ke,je,Ee,me,Ae].join("|"),"g");var ze=RegExp("["+Ne+Yt+ie+he+"]");var $e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ge=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"];var Ve=-1;var Be={};Be[ht]=Be[ft]=Be[pt]=Be[dt]=Be[lt]=Be[vt]=Be[mt]=Be[_t]=Be[gt]=true;Be[M]=Be[W]=Be[at]=Be[z]=Be[ut]=Be[$]=Be[V]=Be[B]=Be[K]=Be[H]=Be[Y]=Be[et]=Be[it]=Be[nt]=Be[rt]=false;var Qe={};Qe[M]=Qe[W]=Qe[at]=Qe[ut]=Qe[z]=Qe[$]=Qe[ht]=Qe[ft]=Qe[pt]=Qe[dt]=Qe[lt]=Qe[K]=Qe[H]=Qe[Y]=Qe[et]=Qe[it]=Qe[nt]=Qe[ot]=Qe[vt]=Qe[mt]=Qe[_t]=Qe[gt]=true;Qe[V]=Qe[B]=Qe[rt]=false;var Ke={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"};var He={"&":"&","<":"<",">":">",'"':""","'":"'"};var Xe={"&":"&","<":"<",">":">",""":'"',"'":"'"};var Ye={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var Ze=parseFloat,ti=parseInt;var ei=typeof global=="object"&&global&&global.Object===Object&&global;var ii=typeof self=="object"&&self&&self.Object===Object&&self;var ni=ei||ii||Function("return this")();var oi=true&&e&&!e.nodeType&&e;var si=oi&&"object"=="object"&&t&&!t.nodeType&&t;var ri=si&&si.exports===oi;var ci=ri&&ei.process;var ai=function(){try{var t=si&&si.require&&si.require("util").types;if(t){return t}return ci&&ci.binding&&ci.binding("util")}catch(t){}}();var ui=ai&&ai.isArrayBuffer,hi=ai&&ai.isDate,fi=ai&&ai.isMap,pi=ai&&ai.isRegExp,di=ai&&ai.isSet,li=ai&&ai.isTypedArray;function apply(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}function arrayAggregator(t,e,i,n){var o=-1,s=t==null?0:t.length;while(++o-1}function arrayIncludesWith(t,e,i){var n=-1,o=t==null?0:t.length;while(++n-1){}return i}function charsEndIndex(t,e){var i=t.length;while(i--&&baseIndexOf(e,t[i],0)>-1){}return i}function countHolders(t,e){var i=t.length,n=0;while(i--){if(t[i]===e){++n}}return n}var mi=basePropertyOf(Ke);var _i=basePropertyOf(He);function escapeStringChar(t){return"\\"+Ye[t]}function getValue(t,e){return t==null?i:t[e]}function hasUnicode(t){return ze.test(t)}function hasUnicodeWord(t){return $e.test(t)}function iteratorToArray(t){var e,i=[];while(!(e=t.next()).done){i.push(e.value)}return i}function mapToArray(t){var e=-1,i=Array(t.size);t.forEach(function(t,n){i[++e]=[n,t]});return i}function overArg(t,e){return function(i){return t(e(i))}}function replaceHolders(t,e){var i=-1,n=t.length,o=0,s=[];while(++i-1}function listCacheSet(t,e){var i=this.__data__,n=assocIndexOf(i,t);if(n<0){++this.size;i.push([t,e])}else{i[n][1]=e}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e=e?t:e}}return t}function baseClone(t,e,n,o,s,r){var c,a=e&h,u=e&f,d=e&p;if(n){c=s?n(t,o,s,r):n(t)}if(c!==i){return c}if(!isObject(t)){return t}var l=Fn(t);if(l){c=initCloneArray(t);if(!a){return copyArray(t,c)}}else{var v=Mi(t),m=v==B||v==Q;if(Jn(t)){return cloneBuffer(t,a)}if(v==Y||v==M||m&&!s){c=u||m?{}:initCloneObject(t);if(!a){return u?copySymbolsIn(t,baseAssignIn(c,t)):copySymbols(t,baseAssign(c,t))}}else{if(!Qe[v]){return s?t:{}}c=initCloneByTag(t,v,a)}}r||(r=new Stack);var _=r.get(t);if(_){return _}r.set(t,c);if(An(t)){t.forEach(function(i){c.add(baseClone(i,e,n,i,t,r))})}else if(jn(t)){t.forEach(function(i,o){c.set(o,baseClone(i,e,n,o,t,r))})}var g=d?u?getAllKeysIn:getAllKeys:u?keysIn:keys;var y=l?i:g(t);arrayEach(y||t,function(i,o){if(y){o=i;i=t[o]}assignValue(c,o,baseClone(i,e,n,o,t,r))});return c}function baseConforms(t){var e=keys(t);return function(i){return baseConformsTo(i,t,e)}}function baseConformsTo(t,e,n){var o=n.length;if(t==null){return!o}t=ee(t);while(o--){var s=n[o],r=e[s],c=t[s];if(c===i&&!(s in t)||!r(c)){return false}}return true}function baseDelay(t,e,n){if(typeof t!="function"){throw new oe(r)}return zi(function(){t.apply(i,n)},e)}function baseDifference(t,e,i,n){var s=-1,r=arrayIncludes,c=true,a=t.length,u=[],h=e.length;if(!a){return u}if(i){e=arrayMap(e,baseUnary(i))}if(n){r=arrayIncludesWith;c=false}else if(e.length>=o){r=cacheHas;c=false;e=new SetCache(e)}t:while(++ss?0:s+n}o=o===i||o>s?s:toInteger(o);if(o<0){o+=s}o=n>o?0:toLength(o);while(n0&&i(c)){if(e>1){baseFlatten(c,e-1,i,n,o)}else{arrayPush(o,c)}}else if(!n){o[o.length]=c}}return o}var ki=createBaseFor();var Fi=createBaseFor(true);function baseForOwn(t,e){return t&&ki(t,e,keys)}function baseForOwnRight(t,e){return t&&Fi(t,e,keys)}function baseFunctions(t,e){return arrayFilter(e,function(e){return isFunction(t[e])})}function baseGet(t,e){e=castPath(e,t);var n=0,o=e.length;while(t!=null&&ne}function baseHas(t,e){return t!=null&&he.call(t,e)}function baseHasIn(t,e){return t!=null&&e in ee(t)}function baseInRange(t,e,i){return t>=qe(e,i)&&t=120&&p.length>=120)?new SetCache(a&&p):i}p=t[0];var d=-1,l=u[0];t:while(++d-1){if(c!==t){Ie.call(c,a,1)}Ie.call(t,a,1)}}return t}function basePullAt(t,e){var i=t?e.length:0,n=i-1;while(i--){var o=e[i];if(i==n||o!==s){var s=o;if(isIndex(o)){Ie.call(t,o,1)}else{baseUnset(t,o)}}}return t}function baseRandom(t,e){return t+Je(Ke()*(e-t+1))}function baseRange(t,i,n,o){var s=-1,r=We(Te((i-t)/(n||1)),0),c=e(r);while(r--){c[o?r:++s]=t;t+=n}return c}function baseRepeat(t,e){var i="";if(!t||e<1||e>J){return i}do{if(e%2){i+=t}e=Je(e/2);if(e){t+=t}}while(e);return i}function baseRest(t,e){return $i(overRest(t,e,identity),t+"")}function baseSample(t){return arraySample(values(t))}function baseSampleSize(t,e){var i=values(t);return shuffleSelf(i,baseClamp(e,0,i.length))}function baseSet(t,e,n,o){if(!isObject(t)){return t}e=castPath(e,t);var s=-1,r=e.length,c=r-1,a=t;while(a!=null&&++ss?0:s+i}n=n>s?s:n;if(n<0){n+=s}s=i>n?0:n-i>>>0;i>>>=0;var r=e(s);while(++o>>1,r=t[s];if(r!==null&&!isSymbol(r)&&(i?r<=e:r=o){var h=e?null:Ui(t);if(h){return setToArray(h)}c=false;s=cacheHas;u=new SetCache}else{u=e?[]:a}t:while(++n=o?t:baseSlice(t,e,n)}var ji=Pe||function(t){return ni.clearTimeout(t)};function cloneBuffer(t,e){if(e){return t.slice()}var i=t.length,n=Se?Se(i):new t.constructor(i);t.copy(n);return n}function cloneArrayBuffer(t){var e=new t.constructor(t.byteLength);new ye(e).set(new ye(t));return e}function cloneDataView(t,e){var i=e?cloneArrayBuffer(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}function cloneRegExp(t){var e=new t.constructor(t.source,zt.exec(t));e.lastIndex=t.lastIndex;return e}function cloneSymbol(t){return Oi?ee(Oi.call(t)):{}}function cloneTypedArray(t,e){var i=e?cloneArrayBuffer(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function compareAscending(t,e){if(t!==e){var n=t!==i,o=t===null,s=t===t,r=isSymbol(t);var c=e!==i,a=e===null,u=e===e,h=isSymbol(e);if(!a&&!h&&!r&&t>e||r&&c&&u&&!a&&!h||o&&c&&u||!n&&u||!s){return 1}if(!o&&!r&&!h&&t=c){return a}var u=i[n];return a*(u=="desc"?-1:1)}}return t.index-e.index}function composeArgs(t,i,n,o){var s=-1,r=t.length,c=n.length,a=-1,u=i.length,h=We(r-c,0),f=e(u+h),p=!o;while(++a1?n[s-1]:i,c=s>2?n[2]:i;r=t.length>3&&typeof r=="function"?(s--,r):i;if(c&&isIterateeCall(n[0],n[1],c)){r=s<3?i:r;s=1}e=ee(e);while(++o-1?s[r?e[c]:c]:i}}function createFlow(t){return flatRest(function(e){var n=e.length,o=n,s=LodashWrapper.prototype.thru;if(t){e.reverse()}while(o--){var c=e[o];if(typeof c!="function"){throw new oe(r)}if(s&&!a&&getFuncName(c)=="wrapper"){var a=new LodashWrapper([],true)}}o=a?o:n;while(++o1){v.reverse()}if(p&&ha)){return false}var h=r.get(t);var f=r.get(e);if(h&&f){return h==e&&f==t}var p=-1,v=true,m=n&l?new SetCache:i;r.set(t,e);r.set(e,t);while(++p1?"& ":"")+e[n];e=e.join(i>2?", ":" ");return t.replace(At,"{\n/* [wrapped with "+e+"] */\n")}function isFlattenable(t){return Fn(t)||kn(t)||!!(Oe&&t&&t[Oe])}function isIndex(t,e){var i=typeof t;e=e==null?J:e;return!!e&&(i=="number"||i!="symbol"&&Qt.test(t))&&(t>-1&&t%1==0&&t0){if(++e>=x){return arguments[0]}}else{e=0}return t.apply(i,arguments)}}function shuffleSelf(t,e){var n=-1,o=t.length,s=o-1;e=e===i?o:e;while(++n1?t[e-1]:i;n=typeof n=="function"?(t.pop(),n):i;return unzipWith(t,n)});function chain(t){var e=lodash(t);e.__chain__=true;return e}function tap(t,e){e(t);return t}function thru(t,e){return e(t)}var hn=flatRest(function(t){var e=t.length,n=e?t[0]:0,o=this.__wrapped__,s=function(e){return baseAt(e,t)};if(e>1||this.__actions__.length||!(o instanceof LazyWrapper)||!isIndex(n)){return this.thru(s)}o=o.slice(n,+n+(e?1:0));o.__actions__.push({func:thru,args:[s],thisArg:i});return new LodashWrapper(o,this.__chain__).thru(function(t){if(e&&!t.length){t.push(i)}return t})});function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}function wrapperNext(){if(this.__values__===i){this.__values__=toArray(this.value())}var t=this.__index__>=this.__values__.length,e=t?i:this.__values__[this.__index__++];return{done:t,value:e}}function wrapperToIterator(){return this}function wrapperPlant(t){var e,n=this;while(n instanceof baseLodash){var o=wrapperClone(n);o.__index__=0;o.__values__=i;if(e){s.__wrapped__=o}else{e=o}var s=o;n=n.__wrapped__}s.__wrapped__=t;return e}function wrapperReverse(){var t=this.__wrapped__;if(t instanceof LazyWrapper){var e=t;if(this.__actions__.length){e=new LazyWrapper(this)}e=e.reverse();e.__actions__.push({func:thru,args:[reverse],thisArg:i});return new LodashWrapper(e,this.__chain__)}return this.thru(reverse)}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}var fn=createAggregator(function(t,e,i){if(he.call(t,i)){++t[i]}else{baseAssignValue(t,i,1)}});function every(t,e,n){var o=Fn(t)?arrayEvery:baseEvery;if(n&&isIterateeCall(t,e,n)){e=i}return o(t,getIteratee(e,3))}function filter(t,e){var i=Fn(t)?arrayFilter:baseFilter;return i(t,getIteratee(e,3))}var pn=createFind(findIndex);var dn=createFind(findLastIndex);function flatMap(t,e){return baseFlatten(map(t,e),1)}function flatMapDeep(t,e){return baseFlatten(map(t,e),T)}function flatMapDepth(t,e,n){n=n===i?1:toInteger(n);return baseFlatten(map(t,e),n)}function forEach(t,e){var i=Fn(t)?arrayEach:Ci;return i(t,getIteratee(e,3))}function forEachRight(t,e){var i=Fn(t)?arrayEachRight:Pi;return i(t,getIteratee(e,3))}var ln=createAggregator(function(t,e,i){if(he.call(t,i)){t[i].push(e)}else{baseAssignValue(t,i,[e])}});function includes(t,e,i,n){t=isArrayLike(t)?t:values(t);i=i&&!n?toInteger(i):0;var o=t.length;if(i<0){i=We(o+i,0)}return isString(t)?i<=o&&t.indexOf(e,i)>-1:!!o&&baseIndexOf(t,e,i)>-1}var vn=baseRest(function(t,i,n){var o=-1,s=typeof i=="function",r=isArrayLike(t)?e(t.length):[];Ci(t,function(t){r[++o]=s?apply(i,t,n):baseInvoke(t,i,n)});return r});var mn=createAggregator(function(t,e,i){baseAssignValue(t,i,e)});function map(t,e){var i=Fn(t)?arrayMap:baseMap;return i(t,getIteratee(e,3))}function orderBy(t,e,n,o){if(t==null){return[]}if(!Fn(e)){e=e==null?[]:[e]}n=o?i:n;if(!Fn(n)){n=n==null?[]:[n]}return baseOrderBy(t,e,n)}var _n=createAggregator(function(t,e,i){t[i?0:1].push(e)},function(){return[[],[]]});function reduce(t,e,i){var n=Fn(t)?arrayReduce:baseReduce,o=arguments.length<3;return n(t,getIteratee(e,4),i,o,Ci)}function reduceRight(t,e,i){var n=Fn(t)?arrayReduceRight:baseReduce,o=arguments.length<3;return n(t,getIteratee(e,4),i,o,Pi)}function reject(t,e){var i=Fn(t)?arrayFilter:baseFilter;return i(t,negate(getIteratee(e,3)))}function sample(t){var e=Fn(t)?arraySample:baseSample;return e(t)}function sampleSize(t,e,n){if(n?isIterateeCall(t,e,n):e===i){e=1}else{e=toInteger(e)}var o=Fn(t)?arraySampleSize:baseSampleSize;return o(t,e)}function shuffle(t){var e=Fn(t)?arrayShuffle:baseShuffle;return e(t)}function size(t){if(t==null){return 0}if(isArrayLike(t)){return isString(t)?stringSize(t):t.length}var e=Mi(t);if(e==K||e==it){return t.size}return baseKeys(t).length}function some(t,e,n){var o=Fn(t)?arraySome:baseSome;if(n&&isIterateeCall(t,e,n)){e=i}return o(t,getIteratee(e,3))}var gn=baseRest(function(t,e){if(t==null){return[]}var i=e.length;if(i>1&&isIterateeCall(t,e[0],e[1])){e=[]}else if(i>2&&isIterateeCall(e[0],e[1],e[2])){e=[e[0]]}return baseOrderBy(t,baseFlatten(e,1),[])});var yn=ke||function(){return ni.Date.now()};function after(t,e){if(typeof e!="function"){throw new oe(r)}t=toInteger(t);return function(){if(--t<1){return e.apply(this,arguments)}}}function ary(t,e,n){e=n?i:e;e=t&&e==null?t.length:e;return createWrap(t,w,i,i,i,i,e)}function before(t,e){var n;if(typeof e!="function"){throw new oe(r)}t=toInteger(t);return function(){if(--t>0){n=e.apply(this,arguments)}if(t<=1){e=i}return n}}var Sn=baseRest(function(t,e,i){var n=v;if(i.length){var o=replaceHolders(i,getHolder(Sn));n|=S}return createWrap(t,n,e,i,o)});var bn=baseRest(function(t,e,i){var n=v|m;if(i.length){var o=replaceHolders(i,getHolder(bn));n|=S}return createWrap(e,n,t,i,o)});function curry(t,e,n){e=n?i:e;var o=createWrap(t,g,i,i,i,i,i,e);o.placeholder=curry.placeholder;return o}function curryRight(t,e,n){e=n?i:e;var o=createWrap(t,y,i,i,i,i,i,e);o.placeholder=curryRight.placeholder;return o}function debounce(t,e,n){var o,s,c,a,u,h,f=0,p=false,d=false,l=true;if(typeof t!="function"){throw new oe(r)}e=toNumber(e)||0;if(isObject(n)){p=!!n.leading;d="maxWait"in n;c=d?We(toNumber(n.maxWait)||0,e):c;l="trailing"in n?!!n.trailing:l}function invokeFunc(e){var n=o,r=s;o=s=i;f=e;a=t.apply(r,n);return a}function leadingEdge(t){f=t;u=zi(timerExpired,e);return p?invokeFunc(t):a}function remainingWait(t){var i=t-h,n=t-f,o=e-i;return d?qe(o,c-n):o}function shouldInvoke(t){var n=t-h,o=t-f;return h===i||n>=e||n<0||d&&o>=c}function timerExpired(){var t=yn();if(shouldInvoke(t)){return trailingEdge(t)}u=zi(timerExpired,remainingWait(t))}function trailingEdge(t){u=i;if(l&&o){return invokeFunc(t)}o=s=i;return a}function cancel(){if(u!==i){ji(u)}f=0;o=h=s=u=i}function flush(){return u===i?a:trailingEdge(yn())}function debounced(){var t=yn(),n=shouldInvoke(t);o=arguments;s=this;h=t;if(n){if(u===i){return leadingEdge(h)}if(d){ji(u);u=zi(timerExpired,e);return invokeFunc(h)}}if(u===i){u=zi(timerExpired,e)}return a}debounced.cancel=cancel;debounced.flush=flush;return debounced}var wn=baseRest(function(t,e){return baseDelay(t,1,e)});var Ln=baseRest(function(t,e,i){return baseDelay(t,toNumber(e)||0,i)});function flip(t){return createWrap(t,I)}function memoize(t,e){if(typeof t!="function"||e!=null&&typeof e!="function"){throw new oe(r)}var i=function(){var n=arguments,o=e?e.apply(this,n):n[0],s=i.cache;if(s.has(o)){return s.get(o)}var r=t.apply(this,n);i.cache=s.set(o,r)||s;return r};i.cache=new(memoize.Cache||MapCache);return i}memoize.Cache=MapCache;function negate(t){if(typeof t!="function"){throw new oe(r)}return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function once(t){return before(2,t)}var In=Ei(function(t,e){e=e.length==1&&Fn(e[0])?arrayMap(e[0],baseUnary(getIteratee())):arrayMap(baseFlatten(e,1),baseUnary(getIteratee()));var i=e.length;return baseRest(function(n){var o=-1,s=qe(n.length,i);while(++o=e});var kn=baseIsArguments(function(){return arguments}())?baseIsArguments:function(t){return isObjectLike(t)&&he.call(t,"callee")&&!Le.call(t,"callee")};var Fn=e.isArray;var Tn=ui?baseUnary(ui):baseIsArrayBuffer;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isBoolean(t){return t===true||t===false||isObjectLike(t)&&baseGetTag(t)==z}var Jn=je||stubFalse;var En=hi?baseUnary(hi):baseIsDate;function isElement(t){return isObjectLike(t)&&t.nodeType===1&&!isPlainObject(t)}function isEmpty(t){if(t==null){return true}if(isArrayLike(t)&&(Fn(t)||typeof t=="string"||typeof t.splice=="function"||Jn(t)||Dn(t)||kn(t))){return!t.length}var e=Mi(t);if(e==K||e==it){return!t.size}if(isPrototype(t)){return!baseKeys(t).length}for(var i in t){if(he.call(t,i)){return false}}return true}function isEqual(t,e){return baseIsEqual(t,e)}function isEqualWith(t,e,n){n=typeof n=="function"?n:i;var o=n?n(t,e):i;return o===i?baseIsEqual(t,e,i,n):!!o}function isError(t){if(!isObjectLike(t)){return false}var e=baseGetTag(t);return e==V||e==G||typeof t.message=="string"&&typeof t.name=="string"&&!isPlainObject(t)}function isFinite(t){return typeof t=="number"&&Ue(t)}function isFunction(t){if(!isObject(t)){return false}var e=baseGetTag(t);return e==B||e==Q||e==q||e==tt}function isInteger(t){return typeof t=="number"&&t==toInteger(t)}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=J}function isObject(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function isObjectLike(t){return t!=null&&typeof t=="object"}var jn=fi?baseUnary(fi):baseIsMap;function isMatch(t,e){return t===e||baseIsMatch(t,e,getMatchData(e))}function isMatchWith(t,e,n){n=typeof n=="function"?n:i;return baseIsMatch(t,e,getMatchData(e),n)}function isNaN(t){return isNumber(t)&&t!=+t}function isNative(t){if(Wi(t)){throw new Yt(s)}return baseIsNative(t)}function isNull(t){return t===null}function isNil(t){return t==null}function isNumber(t){return typeof t=="number"||isObjectLike(t)&&baseGetTag(t)==H}function isPlainObject(t){if(!isObjectLike(t)||baseGetTag(t)!=Y){return false}var e=be(t);if(e===null){return true}var i=he.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&ue.call(i)==le}var Un=pi?baseUnary(pi):baseIsRegExp;function isSafeInteger(t){return isInteger(t)&&t>=-J&&t<=J}var An=di?baseUnary(di):baseIsSet;function isString(t){return typeof t=="string"||!Fn(t)&&isObjectLike(t)&&baseGetTag(t)==nt}function isSymbol(t){return typeof t=="symbol"||isObjectLike(t)&&baseGetTag(t)==ot}var Dn=li?baseUnary(li):baseIsTypedArray;function isUndefined(t){return t===i}function isWeakMap(t){return isObjectLike(t)&&Mi(t)==rt}function isWeakSet(t){return isObjectLike(t)&&baseGetTag(t)==ct}var Rn=createRelationalOperation(baseLt);var Mn=createRelationalOperation(function(t,e){return t<=e});function toArray(t){if(!t){return[]}if(isArrayLike(t)){return isString(t)?stringToArray(t):copyArray(t)}if(Ne&&t[Ne]){return iteratorToArray(t[Ne]())}var e=Mi(t),i=e==K?mapToArray:e==it?setToArray:values;return i(t)}function toFinite(t){if(!t){return t===0?t:0}t=toNumber(t);if(t===T||t===-T){var e=t<0?-1:1;return e*E}return t===t?t:0}function toInteger(t){var e=toFinite(t),i=e%1;return e===e?i?e-i:e:0}function toLength(t){return t?baseClamp(toInteger(t),0,U):0}function toNumber(t){if(typeof t=="number"){return t}if(isSymbol(t)){return j}if(isObject(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=isObject(e)?e+"":e}if(typeof t!="string"){return t===0?t:+t}t=t.replace(Et,"");var i=Gt.test(t);return i||Bt.test(t)?ti(t.slice(2),i?2:8):$t.test(t)?j:+t}function toPlainObject(t){return copyObject(t,keysIn(t))}function toSafeInteger(t){return t?baseClamp(toInteger(t),-J,J):t===0?t:0}function toString(t){return t==null?"":baseToString(t)}var Wn=createAssigner(function(t,e){if(isPrototype(e)||isArrayLike(e)){copyObject(e,keys(e),t);return}for(var i in e){if(he.call(e,i)){assignValue(t,i,e[i])}}});var qn=createAssigner(function(t,e){copyObject(e,keysIn(e),t)});var zn=createAssigner(function(t,e,i,n){copyObject(e,keysIn(e),t,n)});var $n=createAssigner(function(t,e,i,n){copyObject(e,keys(e),t,n)});var Gn=flatRest(baseAt);function create(t,e){var i=xi(t);return e==null?i:baseAssign(i,e)}var Vn=baseRest(function(t,e){t=ee(t);var n=-1;var o=e.length;var s=o>2?e[2]:i;if(s&&isIterateeCall(e[0],e[1],s)){o=1}while(++n1);return e});copyObject(t,getAllKeysIn(t),i);if(n){i=baseClone(i,h|f|p,customOmitClone)}var o=e.length;while(o--){baseUnset(i,e[o])}return i});function omitBy(t,e){return pickBy(t,negate(getIteratee(e)))}var to=flatRest(function(t,e){return t==null?{}:basePick(t,e)});function pickBy(t,e){if(t==null){return{}}var i=arrayMap(getAllKeysIn(t),function(t){return[t]});e=getIteratee(e);return basePickBy(t,i,function(t,i){return e(t,i[0])})}function result(t,e,n){e=castPath(e,t);var o=-1,s=e.length;if(!s){s=1;t=i}while(++oe){var o=t;t=e;e=o}if(n||t%1||e%1){var s=Ke();return qe(t+s*(e-t+Ze("1e-"+((s+"").length-1))),e)}return baseRandom(t,e)}var no=createCompounder(function(t,e,i){e=e.toLowerCase();return t+(i?capitalize(e):e)});function capitalize(t){return ho(toString(t).toLowerCase())}function deburr(t){t=toString(t);return t&&t.replace(Kt,mi).replace(Me,"")}function endsWith(t,e,n){t=toString(t);e=baseToString(e);var o=t.length;n=n===i?o:baseClamp(toInteger(n),0,o);var s=n;n-=e.length;return n>=0&&t.slice(n,s)==e}function escape(t){t=toString(t);return t&&Ot.test(t)?t.replace(Lt,_i):t}function escapeRegExp(t){t=toString(t);return t&&Jt.test(t)?t.replace(Tt,"\\$&"):t}var oo=createCompounder(function(t,e,i){return t+(i?"-":"")+e.toLowerCase()});var so=createCompounder(function(t,e,i){return t+(i?" ":"")+e.toLowerCase()});var ro=createCaseFirst("toLowerCase");function pad(t,e,i){t=toString(t);e=toInteger(e);var n=e?stringSize(t):0;if(!e||n>=e){return t}var o=(e-n)/2;return createPadding(Je(o),i)+t+createPadding(Te(o),i)}function padEnd(t,e,i){t=toString(t);e=toInteger(e);var n=e?stringSize(t):0;return e&&n>>0;if(!n){return[]}t=toString(t);if(t&&(typeof e=="string"||e!=null&&!Un(e))){e=baseToString(e);if(!e&&hasUnicode(t)){return castSlice(stringToArray(t),0,n)}}return t.split(e,n)}var ao=createCompounder(function(t,e,i){return t+(i?" ":"")+ho(e)});function startsWith(t,e,i){t=toString(t);i=i==null?0:baseClamp(toInteger(i),0,t.length);e=baseToString(e);return t.slice(i,i+e.length)==e}function template(t,e,n){var o=lodash.templateSettings;if(n&&isIterateeCall(t,e,n)){e=i}t=toString(t);e=zn({},e,o,customDefaultsAssignIn);var s=zn({},e.imports,o.imports,customDefaultsAssignIn),r=keys(s),c=baseValues(s,r);var a,u,h=0,f=e.interpolate||Ht,p="__p += '";var d=ie((e.escape||Ht).source+"|"+f.source+"|"+(f===Ct?qt:Ht).source+"|"+(e.evaluate||Ht).source+"|$","g");var l="//# sourceURL="+(he.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ve+"]")+"\n";t.replace(d,function(e,i,n,o,s,r){n||(n=o);p+=t.slice(h,r).replace(Xt,escapeStringChar);if(i){a=true;p+="' +\n__e("+i+") +\n'"}if(s){u=true;p+="';\n"+s+";\n__p += '"}if(n){p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}h=r+e.length;return e});p+="';\n";var v=he.call(e,"variable")&&e.variable;if(!v){p="with (obj) {\n"+p+"\n}\n"}p=(u?p.replace(yt,""):p).replace(St,"$1").replace(bt,"$1;");p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var m=fo(function(){return Zt(r,l+"return "+p).apply(i,c)});m.source=p;if(isError(m)){throw m}return m}function toLower(t){return toString(t).toLowerCase()}function toUpper(t){return toString(t).toUpperCase()}function trim(t,e,n){t=toString(t);if(t&&(n||e===i)){return t.replace(Et,"")}if(!t||!(e=baseToString(e))){return t}var o=stringToArray(t),s=stringToArray(e),r=charsStartIndex(o,s),c=charsEndIndex(o,s)+1;return castSlice(o,r,c).join("")}function trimEnd(t,e,n){t=toString(t);if(t&&(n||e===i)){return t.replace(Ut,"")}if(!t||!(e=baseToString(e))){return t}var o=stringToArray(t),s=charsEndIndex(o,stringToArray(e))+1;return castSlice(o,0,s).join("")}function trimStart(t,e,n){t=toString(t);if(t&&(n||e===i)){return t.replace(jt,"")}if(!t||!(e=baseToString(e))){return t}var o=stringToArray(t),s=charsStartIndex(o,stringToArray(e));return castSlice(o,s).join("")}function truncate(t,e){var n=O,o=N;if(isObject(e)){var s="separator"in e?e.separator:s;n="length"in e?toInteger(e.length):n;o="omission"in e?baseToString(e.omission):o}t=toString(t);var r=t.length;if(hasUnicode(t)){var c=stringToArray(t);r=c.length}if(n>=r){return t}var a=n-stringSize(o);if(a<1){return o}var u=c?castSlice(c,0,a).join(""):t.slice(0,a);if(s===i){return u+o}if(c){a+=u.length-a}if(Un(s)){if(t.slice(a).search(s)){var h,f=u;if(!s.global){s=ie(s.source,toString(zt.exec(s))+"g")}s.lastIndex=0;while(h=s.exec(f)){var p=h.index}u=u.slice(0,p===i?a:p)}}else if(t.indexOf(baseToString(s),a)!=a){var d=u.lastIndexOf(s);if(d>-1){u=u.slice(0,d)}}return u+o}function unescape(t){t=toString(t);return t&&It.test(t)?t.replace(wt,gi):t}var uo=createCompounder(function(t,e,i){return t+(i?" ":"")+e.toUpperCase()});var ho=createCaseFirst("toUpperCase");function words(t,e,n){t=toString(t);e=n?i:e;if(e===i){return hasUnicodeWord(t)?unicodeWords(t):asciiWords(t)}return t.match(e)||[]}var fo=baseRest(function(t,e){try{return apply(t,i,e)}catch(t){return isError(t)?t:new Yt(t)}});var po=flatRest(function(t,e){arrayEach(e,function(e){e=toKey(e);baseAssignValue(t,e,Sn(t[e],t))});return t});function cond(t){var e=t==null?0:t.length,i=getIteratee();t=!e?[]:arrayMap(t,function(t){if(typeof t[1]!="function"){throw new oe(r)}return[i(t[0]),t[1]]});return baseRest(function(i){var n=-1;while(++nJ){return[]}var i=U,n=qe(t,U);e=getIteratee(e);t-=U;var o=baseTimes(n,e);while(++i0||e<0)){return new LazyWrapper(n)}if(t<0){n=n.takeRight(-t)}else if(t){n=n.drop(t)}if(e!==i){e=toInteger(e);n=e<0?n.dropRight(-e):n.take(e-t)}return n};LazyWrapper.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()};LazyWrapper.prototype.toArray=function(){return this.take(U)};baseForOwn(LazyWrapper.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),s=lodash[o?"take"+(e=="last"?"Right":""):e],r=o||/^find/.test(e);if(!s){return}lodash.prototype[e]=function(){var e=this.__wrapped__,c=o?[1]:arguments,a=e instanceof LazyWrapper,u=c[0],h=a||Fn(e);var f=function(t){var e=s.apply(lodash,arrayPush([t],c));return o&&p?e[0]:e};if(h&&n&&typeof u=="function"&&u.length!=1){a=h=false}var p=this.__chain__,d=!!this.__actions__.length,l=r&&!p,v=a&&!d;if(!r&&h){e=v?e:new LazyWrapper(this);var m=t.apply(e,c);m.__actions__.push({func:thru,args:[f],thisArg:i});return new LodashWrapper(m,p)}if(l&&v){return t.apply(this,c)}m=this.thru(f);return l?o?m.value()[0]:m.value():m}});arrayEach(["pop","push","shift","sort","splice","unshift"],function(t){var e=se[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);lodash.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var o=this.value();return e.apply(Fn(o)?o:[],t)}return this[i](function(i){return e.apply(Fn(i)?i:[],t)})}});baseForOwn(LazyWrapper.prototype,function(t,e){var i=lodash[e];if(i){var n=i.name+"";if(!he.call(ai,n)){ai[n]=[]}ai[n].push({name:e,func:i})}});ai[createHybrid(i,m).name]=[{name:"wrapper",func:i}];LazyWrapper.prototype.clone=lazyClone;LazyWrapper.prototype.reverse=lazyReverse;LazyWrapper.prototype.value=lazyValue;lodash.prototype.at=hn;lodash.prototype.chain=wrapperChain;lodash.prototype.commit=wrapperCommit;lodash.prototype.next=wrapperNext;lodash.prototype.plant=wrapperPlant;lodash.prototype.reverse=wrapperReverse;lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue;lodash.prototype.first=lodash.prototype.head;if(Ne){lodash.prototype[Ne]=wrapperToIterator}return lodash};var Si=yi();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){ni._=Si;define(function(){return Si})}else if(si){(si.exports=Si)._=Si;oi._=Si}else{ni._=Si}}).call(this)},80900:t=>{var e=1e3;var i=e*60;var n=i*60;var o=n*24;var s=o*365.25;t.exports=function(t,e){e=e||{};var i=typeof t;if(i==="string"&&t.length>0){return parse(t)}else if(i==="number"&&isNaN(t)===false){return e.long?fmtLong(t):fmtShort(t)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function parse(t){t=String(t);if(t.length>100){return}var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!r){return}var c=parseFloat(r[1]);var a=(r[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*i;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return undefined}}function fmtShort(t){if(t>=o){return Math.round(t/o)+"d"}if(t>=n){return Math.round(t/n)+"h"}if(t>=i){return Math.round(t/i)+"m"}if(t>=e){return Math.round(t/e)+"s"}return t+"ms"}function fmtLong(t){return plural(t,o,"day")||plural(t,n,"hour")||plural(t,i,"minute")||plural(t,e,"second")||t+" ms"}function plural(t,e,i){if(t{"use strict";var n=i(28289);t.exports=ArrayIterator;function ArrayIterator(t,e,i,n){this.array=t;this.start=e||0;this.stop=i||Infinity;this.step=n||1}ArrayIterator.prototype.next=function(){var t;if(this.start{"use strict";t.exports=Iteration;function Iteration(t,e,i){this.value=t;this.done=e;this.index=i}Iteration.prototype.equals=function(t){return typeof t=="object"&&t.value===this.value&&t.done===this.done&&t.index===this.index}},14801:(t,e,i)=>{"use strict";var n=i(28289);var o=i(57045);t.exports=ObjectIterator;function ObjectIterator(t,e,i,n){this.object=t;this.keysIterator=new o(Object.keys(t),e,i,n)}ObjectIterator.prototype.next=function(){var t=this.keysIterator.next();if(t.done){return t}var e=t.value;return new n(this.object[e],false,e)}},71591:(t,e,i)=>{"use strict";var n=i(57045);var o=i(14801);t.exports=iterate;function iterate(t,e,i,s){if(!t){return empty}else if(Array.isArray(t)){return new n(t,e,i,s)}else if(typeof t.next==="function"){return t}else if(typeof t.iterate==="function"){return t.iterate(e,i,s)}else if(typeof t==="object"){return new o(t)}else{throw new TypeError("Can't iterate "+t)}}},56172:(t,e,i)=>{"use strict";var n=false;try{throw new Error}catch(t){n=!!t.stack}var o=captureLine();var s;var r=i(42414);var c=i(71591);var a=i(87943);function isObject(t){return t===Object(t)}var u="From previous event:";function makeStackTraceLong(t,e){if(n&&e.stack&&typeof t==="object"&&t!==null&&t.stack&&t.stack.indexOf(u)===-1){var i=[];for(var o=e;!!o&&h.get(o);o=h.get(o).became){if(o.stack){i.unshift(o.stack)}}i.unshift(t.stack);var s=i.join("\n"+u+"\n");t.stack=filterStackString(s)}}function filterStackString(t){if(Q.isIntrospective){return t}var e=t.split("\n");var i=[];for(var n=0;n=o&&n<=_}function captureLine(){if(!n){return}try{throw new Error}catch(n){var t=n.stack.split("\n");var e=t[0].indexOf("@")>0?t[1]:t[2];var i=getFileNameAndLineNumber(e);if(!i){return}s=i[0];return i[1]}}function deprecate(t,e,i){return function Q_deprecate(){if(typeof console!=="undefined"&&typeof console.warn==="function"){if(i){console.warn(e+" is deprecated, use "+i+" instead.",new Error("").stack)}else{console.warn(e+" is deprecated.",new Error("").stack)}}return t.apply(this,arguments)}}var h=new r;function Q_getHandler(t){var e=h.get(t);if(!e||!e.became){return e}e=follow(e);h.set(t,e);return e}function follow(t){if(!t.became){return t}else{t.became=follow(t.became);return t.became}}var f=new Error("Can't resolve a promise with itself");var p=Q_reject(f);var d=Q_getHandler(p);var l=new r;t.exports=Q;function Q(t){if(Q_isPromise(t)){return t}else if(isThenable(t)){if(!l.has(t)){l.set(t,new Promise(new Thenable(t)))}return l.get(t)}else{return new Promise(new Fulfilled(t))}}Q.longStackSupport=false;Q.reject=Q_reject;function Q_reject(t){return new Promise(new Rejected(t))}Q.defer=defer;function defer(){var t=new Pending;var e=new Promise(t);var i=new Deferred(e);if(Q.longStackSupport&&n){try{throw new Error}catch(t){e.stack=t.stack.substring(t.stack.indexOf("\n")+1)}}return i}Q.when=function Q_when(t,e,i,n){return Q(t).then(e,i,n)};Q.all=Q_all;function Q_all(t){if(Q_isPromise(t)){if(typeof console!=="undefined"&&typeof console.warn==="function"){console.warn("Q.all no longer directly unwraps a promise. Use Q(array).all()")}return Q(t).all()}var e=0;var i=defer();var n=Array(t.length);var o=[];var s=-Infinity;var r;Array.prototype.forEach.call(t,function Q_all_each(c,a){var u;if(Q_isPromise(c)&&(u=Q_getHandler(c)).state==="fulfilled"){n[a]=u.value}else{++e;c=Q(c);c.then(function Q_all_eachFulfilled(t){n[a]=t;if(--e===0){i.resolve(n)}},i.reject);c.observeEstimate(function Q_all_eachEstimate(e){var n=o[a];o[a]=e;if(e>s){s=e}else if(n===s&&e<=s){computeEstimate()}if(o.length===t.length&&s!==r){i.setEstimate(s);r=s}})}});function computeEstimate(){s=-Infinity;for(var t=0;ts){s=o[t]}}}if(e===0){i.resolve(n)}return i.promise}Q.allSettled=Q_allSettled;function Q_allSettled(t){if(Q_isPromise(t)){if(typeof console!=="undefined"&&typeof console.warn==="function"){console.warn("Q.allSettled no longer directly unwraps a promise. Use Q(array).allSettled()")}return Q(t).allSettled()}return Q_all(t.map(function Q_allSettled_each(t){t=Q(t);function regardless(){return t.inspect()}return t.then(regardless,regardless)}))}Q.delay=function Q_delay(t,e){if(e===void 0){e=t;t=void 0}return Q(t).delay(e)};Q.timeout=function Q_timeout(t,e,i){return Q(t).timeout(e,i)};Q.spread=Q_spread;function Q_spread(t,e,i){return Q(t).spread(e,i)}Q.join=function Q_join(t,e){return Q.spread([t,e],function Q_joined(t,e){if(t===e){return t}else{throw new Error("Can't join: not the same: "+t+" "+e)}})};Q.race=Q_race;function Q_race(t){return new Promise(function(e){t.forEach(function(t){Q(t).then(e.resolve,e.reject)})})}Q.try=function Q_try(t){return Q(t).dispatch("call",[[]])};Q.function=Promise_function;function Promise_function(t){return function promiseFunctionWrapper(){var e=new Array(arguments.length);for(var i=0;i{"use strict";var n=String.prototype.replace;var o=/%20/g;var s=i(72360);var r={RFC1738:"RFC1738",RFC3986:"RFC3986"};t.exports=s.assign({default:r.RFC3986,formatters:{RFC1738:function(t){return n.call(t,o,"+")},RFC3986:function(t){return String(t)}}},r)},22760:(t,e,i)=>{"use strict";var n=i(79954);var o=i(33912);var s=i(74907);t.exports={formats:s,parse:o,stringify:n}},33912:(t,e,i)=>{"use strict";var n=i(72360);var o=Object.prototype.hasOwnProperty;var s=Array.isArray;var r={allowDots:false,allowPrototypes:false,arrayLimit:20,charset:"utf-8",charsetSentinel:false,comma:false,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1e3,parseArrays:true,plainObjects:false,strictNullHandling:false};var c=function(t){return t.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(parseInt(e,10))})};var a=function(t,e){if(t&&typeof t==="string"&&e.comma&&t.indexOf(",")>-1){return t.split(",")}return t};var u="utf8=%26%2310003%3B";var h="utf8=%E2%9C%93";var f=function parseQueryStringValues(t,e){var i={};var f=e.ignoreQueryPrefix?t.replace(/^\?/,""):t;var p=e.parameterLimit===Infinity?undefined:e.parameterLimit;var d=f.split(e.delimiter,p);var l=-1;var v;var m=e.charset;if(e.charsetSentinel){for(v=0;v-1){b=s(b)?[b]:b}if(o.call(i,S)){i[S]=n.combine(i[S],b)}else{i[S]=b}}return i};var p=function(t,e,i,n){var o=n?e:a(e,i);for(var s=t.length-1;s>=0;--s){var r;var c=t[s];if(c==="[]"&&i.parseArrays){r=[].concat(o)}else{r=i.plainObjects?Object.create(null):{};var u=c.charAt(0)==="["&&c.charAt(c.length-1)==="]"?c.slice(1,-1):c;var h=parseInt(u,10);if(!i.parseArrays&&u===""){r={0:o}}else if(!isNaN(h)&&c!==u&&String(h)===u&&h>=0&&(i.parseArrays&&h<=i.arrayLimit)){r=[];r[h]=o}else{r[u]=o}}o=r}return o};var d=function parseQueryStringKeys(t,e,i,n){if(!t){return}var s=i.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;var r=/(\[[^[\]]*])/;var c=/(\[[^[\]]*])/g;var a=i.depth>0&&r.exec(s);var u=a?s.slice(0,a.index):s;var h=[];if(u){if(!i.plainObjects&&o.call(Object.prototype,u)){if(!i.allowPrototypes){return}}h.push(u)}var f=0;while(i.depth>0&&(a=c.exec(s))!==null&&f{"use strict";var n=i(72360);var o=i(74907);var s=Object.prototype.hasOwnProperty;var r={brackets:function brackets(t){return t+"[]"},comma:"comma",indices:function indices(t,e){return t+"["+e+"]"},repeat:function repeat(t){return t}};var c=Array.isArray;var a=Array.prototype.push;var u=function(t,e){a.apply(t,c(e)?e:[e])};var h=Date.prototype.toISOString;var f=o["default"];var p={addQueryPrefix:false,allowDots:false,charset:"utf-8",charsetSentinel:false,delimiter:"&",encode:true,encoder:n.encode,encodeValuesOnly:false,format:f,formatter:o.formatters[f],indices:false,serializeDate:function serializeDate(t){return h.call(t)},skipNulls:false,strictNullHandling:false};var d=function isNonNullishPrimitive(t){return typeof t==="string"||typeof t==="number"||typeof t==="boolean"||typeof t==="symbol"||typeof t==="bigint"};var l=function stringify(t,e,i,o,s,r,a,h,f,l,v,m,_){var g=t;if(typeof a==="function"){g=a(e,g)}else if(g instanceof Date){g=l(g)}else if(i==="comma"&&c(g)){g=n.maybeMap(g,function(t){if(t instanceof Date){return l(t)}return t}).join(",")}if(g===null){if(o){return r&&!m?r(e,p.encoder,_,"key"):e}g=""}if(d(g)||n.isBuffer(g)){if(r){var y=m?e:r(e,p.encoder,_,"key");return[v(y)+"="+v(r(g,p.encoder,_,"value"))]}return[v(e)+"="+v(String(g))]}var S=[];if(typeof g==="undefined"){return S}var b;if(c(a)){b=a}else{var w=Object.keys(g);b=h?w.sort(h):w}for(var L=0;L0?_+m:""}},72360:t=>{"use strict";var e=Object.prototype.hasOwnProperty;var i=Array.isArray;var n=function(){var t=[];for(var e=0;e<256;++e){t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase())}return t}();var o=function compactQueue(t){while(t.length>1){var e=t.pop();var n=e.obj[e.prop];if(i(n)){var o=[];for(var s=0;s=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122){s+=o.charAt(r);continue}if(c<128){s=s+n[c];continue}if(c<2048){s=s+(n[192|c>>6]+n[128|c&63]);continue}if(c<55296||c>=57344){s=s+(n[224|c>>12]+n[128|c>>6&63]+n[128|c&63]);continue}r+=1;c=65536+((c&1023)<<10|o.charCodeAt(r)&1023);s+=n[240|c>>18]+n[128|c>>12&63]+n[128|c>>6&63]+n[128|c&63]}return s};var h=function compact(t){var e=[{obj:{o:t},prop:"o"}];var i=[];for(var n=0;n{"use strict";var i=Object.prototype.hasOwnProperty,n;function decode(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function encode(t){try{return encodeURIComponent(t)}catch(t){return null}}function querystring(t){var e=/([^=?#&]+)=?([^&]*)/g,i={},n;while(n=e.exec(t)){var o=decode(n[1]),s=decode(n[2]);if(o===null||s===null||o in i)continue;i[o]=s}return i}function querystringify(t,e){e=e||"";var o=[],s,r;if("string"!==typeof e)e="?";for(r in t){if(i.call(t,r)){s=t[r];if(!s&&(s===null||s===n||isNaN(s))){s=""}r=encode(r);s=encode(s);if(r===null||s===null)continue;o.push(r+"="+s)}}return o.length?e+o.join("&"):""}e.stringify=querystringify;e.parse=querystring},44742:t=>{"use strict";t.exports=function required(t,e){e=e.split(":")[0];t=+t;if(!t)return false;switch(e){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return false}return t!==0}},21867:(t,e,i)=>{var n=i(64293);var o=n.Buffer;function copyProps(t,e){for(var i in t){e[i]=t[i]}}if(o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow){t.exports=n}else{copyProps(n,e);e.Buffer=SafeBuffer}function SafeBuffer(t,e,i){return o(t,e,i)}SafeBuffer.prototype=Object.create(o.prototype);copyProps(o,SafeBuffer);SafeBuffer.from=function(t,e,i){if(typeof t==="number"){throw new TypeError("Argument must not be a number")}return o(t,e,i)};SafeBuffer.alloc=function(t,e,i){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}var n=o(t);if(e!==undefined){if(typeof i==="string"){n.fill(e,i)}else{n.fill(e)}}else{n.fill(0)}return n};SafeBuffer.allocUnsafe=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return o(t)};SafeBuffer.allocUnsafeSlow=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(t)}},8812:(t,e,i)=>{"use strict";const n=i(76417);const o=i(50806);t.exports=function scmp(t,e){if(!Buffer.isBuffer(t)||!Buffer.isBuffer(e)){throw new Error("Both scmp args must be Buffers")}if(t.length!==e.length){return false}if(n.timingSafeEqual){return n.timingSafeEqual(t,e)}return o(t,e)}},50806:t=>{"use strict";t.exports=function scmpCompare(t,e){const i=t.length;let n=0;for(let o=0;o{"use strict";const n=i(12087);const o=i(33867);const s=i(31621);const{env:r}=process;let c;if(s("no-color")||s("no-colors")||s("color=false")||s("color=never")){c=0}else if(s("color")||s("colors")||s("color=true")||s("color=always")){c=1}if("FORCE_COLOR"in r){if(r.FORCE_COLOR==="true"){c=1}else if(r.FORCE_COLOR==="false"){c=0}else{c=r.FORCE_COLOR.length===0?1:Math.min(parseInt(r.FORCE_COLOR,10),3)}}function translateLevel(t){if(t===0){return false}return{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function supportsColor(t,e){if(c===0){return 0}if(s("color=16m")||s("color=full")||s("color=truecolor")){return 3}if(s("color=256")){return 2}if(t&&!e&&c===undefined){return 0}const i=c||0;if(r.TERM==="dumb"){return i}if(process.platform==="win32"){const t=n.release().split(".");if(Number(t[0])>=10&&Number(t[2])>=10586){return Number(t[2])>=14931?3:2}return 1}if("CI"in r){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(t=>t in r)||r.CI_NAME==="codeship"){return 1}return i}if("TEAMCITY_VERSION"in r){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0}if(r.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in r){const t=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(r.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)){return 1}if("COLORTERM"in r){return 1}return i}function getSupportLevel(t){const e=supportsColor(t,t&&t.isTTY);return translateLevel(e)}t.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,o.isatty(1))),stderr:translateLevel(supportsColor(true,o.isatty(2)))}},64580:(t,e,i)=>{"use strict";var n=i(90250);function Domain(t,e){this.twilio=t;this.baseUrl=e}Domain.prototype.absoluteUrl=function(t){return n.trim(this.baseUrl,"/")+"/"+n.trim(t,"/")};Domain.prototype.request=function(t){return this.twilio.request(n.assign({},t,{uri:this.absoluteUrl(t.uri)}))};t.exports=Domain},60938:(t,e,i)=>{"use strict";var n=i(90250);var o=i(50284);function Page(t,e,i){var n=this.processResponse(e);this._version=t;this._payload=n;this._solution=i;this.nextPageUrl=this.getNextPageUrl();this.previousPageUrl=this.getPreviousPageUrl();this.instances=this.loadInstances(this.loadPage(n))}Page.prototype.META_KEYS=["end","first_page_uri","last_page_uri","next_page_uri","num_pages","page","page_size","previous_page_uri","start","total","uri"];Page.prototype.getPreviousPageUrl=function(){if("meta"in this._payload&&"previous_page_url"in this._payload.meta&&this._payload.meta.previous_page_url){return this._payload.meta.previous_page_url}if("previous_page_uri"in this._payload&&this._payload.previous_page_uri){return this._version._domain.absoluteUrl(this._payload.previous_page_uri)}return undefined};Page.prototype.getNextPageUrl=function(){if("meta"in this._payload&&"next_page_url"in this._payload.meta&&this._payload.meta.next_page_url){return this._payload.meta.next_page_url}if("next_page_uri"in this._payload&&this._payload.next_page_uri){return this._version._domain.absoluteUrl(this._payload.next_page_uri)}return undefined};Page.prototype.getInstance=function(t){throw new Error("Page.get_instance() must be implemented in the derived class")};Page.prototype.loadInstances=function(t){return n.map(t,function(t){return this.getInstance(t)}.bind(this))};Page.prototype.nextPage=function(){if(!this.nextPageUrl){return undefined}var t=this._version._domain.twilio.request({method:"GET",uri:this.nextPageUrl});t=t.then(function(t){return new this.constructor(this._version,t,this._solution)}.bind(this));return t};Page.prototype.previousPage=function(){if(!this.previousPageUrl){return undefined}var t=this._version._domain.twilio.request({method:"GET",uri:this.previousPageUrl});t=t.then(function(t){return new this.constructor(this._version,t,this._solution)}.bind(this));return t};Page.prototype.processResponse=function(t){if(t.statusCode!==200){throw new o(t)}if(typeof t.body==="string"){return JSON.parse(t.body)}return t.body};Page.prototype.loadPage=function(t){if("meta"in t&&"key"in t.meta){return t[t.meta.key]}var e=n.chain(t).keys().difference(this.META_KEYS).value();if(e.length===1){return t[e[0]]}throw new Error("Page Records cannot be deserialized")};t.exports=Page},77761:(t,e,i)=>{"use strict";var n=i(90250);var o=i(96545);var s=i(35747);var r=i(98605);var c=i(57211);var a=i(56172);var u=i(22760);var h=i(12785);var f=i(51438);o.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded";var p=function(){};p.prototype.request=function(t){t=t||{};if(!t.method){throw new Error("http method is required")}if(!t.uri){throw new Error("uri is required")}var e=a.defer();var i=t.headers||{};if(!i.Connection&&!i.connection){i.Connection="close"}if(t.username&&t.password){var p=Buffer.from(t.username+":"+t.password).toString("base64");i.Authorization="Basic "+p}var d={timeout:t.timeout||3e4,maxRedirects:t.allowRedirects?10:0,url:t.uri,method:t.method,headers:t.headers,httpAgent:t.forever?new r.Agent({keepAlive:true}):undefined,httpsAgent:t.forever?new c.Agent({keepAlive:true}):undefined,validateStatus:t=>t>=100&&t<600};if(process.env.TWILIO_CA_BUNDLE!==undefined){if(this.ca===undefined){this.ca=s.readFileSync(process.env.TWILIO_CA_BUNDLE)}d.ca=this.ca}if(!n.isNull(t.data)){d.data=u.stringify(t.data,{arrayFormat:"repeat"})}if(!n.isNull(t.params)){d.params=t.params;d.paramsSerializer=(t=>{return u.stringify(t,{arrayFormat:"repeat"})})}var l={method:d.method,url:d.url,auth:p||null,params:d.params,data:t.data,headers:d.headers,ca:d.ca};if(t.logLevel==="debug"){this.logRequest(d)}var v=this;this.lastResponse=undefined;this.lastRequest=new f(l);o(d).then(i=>{if(t.logLevel==="debug"){console.log(`response.statusCode: ${i.status}`);console.log(`response.headers: ${JSON.stringify(i.headers)}`)}v.lastResponse=new h(i.status,i.data,i.headers);e.resolve({statusCode:i.status,body:i.data})}).catch(t=>{v.lastResponse=undefined;e.reject(t)});return e.promise};p.prototype.filterLoggingHeaders=function(t){return Object.keys(t).filter(t=>{return!"authorization".includes(t.toLowerCase())})};p.prototype.logRequest=function(t){console.log("-- BEGIN Twilio API Request --");console.log(`${t.method} ${t.url}`);if(t.params){console.log("Querystring:");console.log(t.params)}if(t.headers){console.log("Headers:");const e=this.filterLoggingHeaders(t.headers);e.forEach(e=>console.log(`${e}: ${t.headers[e]}`))}console.log("-- END Twilio API Request --")};t.exports=p},50284:t=>{"use strict";class RestException extends Error{constructor(t){super("[HTTP "+t.statusCode+"] Failed to execute request");const e=typeof t.body==="string"?JSON.parse(t.body):t.body;this.status=t.statusCode;this.message=e.message;this.code=e.code;this.moreInfo=e.more_info;this.details=e.details}}t.exports=RestException},64351:(t,e,i)=>{"use strict";var n=i(90250);var o=i(50284);function Version(t,e){this._domain=t;this._version=e}Version.prototype.absoluteUrl=function(t){return this._domain.absoluteUrl(this.relativeUrl(t))};Version.prototype.relativeUrl=function(t){return n.trim(this._version,"/")+"/"+n.trim(t,"/")};Version.prototype.request=function(t){return this._domain.request(n.assign({},t,{uri:this.relativeUrl(t.uri)}))};Version.prototype.fetch=function(t){var e=this.request(t);e=e.then(function success(t){if(t.statusCode<200||t.statusCode>=400){throw new o(t)}if(typeof t.body==="string"){return JSON.parse(t.body)}return t.body});return e};Version.prototype.update=function(t){var e=this.request(t);e=e.then(function success(t){if(t.statusCode<200||t.statusCode>=300){throw new o(t)}if(typeof t.body==="string"){return JSON.parse(t.body)}return t.body});return e};Version.prototype.remove=function(t){var e=this.request(t);e=e.then(function success(t){if(t.statusCode<200||t.statusCode>=300){throw new o(t)}return t.statusCode===204});return e};Version.prototype.create=function(t){var e=this.request(t);e=e.then(function success(t){if(t.statusCode<200||t.statusCode>=300){throw new o(t)}if(typeof t.body==="string"){return JSON.parse(t.body)}return t.body});return e};Version.prototype.page=function(t){return this.request(t)};Version.prototype.readLimits=function(t){var e=t.limit;var i;var o=t.pageSize;if(!n.isNil(e)&&(!n.isFinite(e)||e<=0)){throw new TypeError("Parameter limit must be a positive integer")}if(!n.isNil(o)&&(!n.isFinite(o)||o<=0)){throw new TypeError("Parameter pageSize must be a positive integer")}if(e){if(!o){o=e}i=parseInt(Math.ceil(e/parseFloat(o)),10)}return{limit:e,pageSize:o,pageLimit:i}};t.exports=Version},80513:(t,e,i)=>{"use strict";var n=i(90250);var o=i(7401);var s=i(94359);o.extend(s);function parseDate(t,e){var i=o.utc(t,e);if(i.isValid()){return i.toDate()}return t}function parseNumber(t,e){var i=e(t);if(isNaN(i)){return t}return i}function iso8601Date(t){return parseDate(t,"YYYY-MM-DD")}function iso8601DateTime(t){return parseDate(t,"YYYY-MM-DD[T]HH:mm:ss[Z]")}function rfc2822DateTime(t){return parseDate(t,"ddd, DD MMM YYYY HH:mm:ss [+0000]")}function decimal(t){return parseNumber(t,parseFloat)}function integer(t){return parseNumber(t,n.parseInt)}t.exports={iso8601Date:iso8601Date,iso8601DateTime:iso8601DateTime,rfc2822DateTime:rfc2822DateTime,decimal:decimal,integer:integer}},76306:(t,e,i)=>{"use strict";var n=i(31669);function ObsoleteClient(t,e,i){throw new Error(this.constructor.name+" has been removed from this version of the library. Please refer to https://www.twilio.com/docs/libraries/node for more information.")}function RestClient(t,e,i){RestClient.super_.call(this,t,e,i)}n.inherits(RestClient,ObsoleteClient);function IpMessagingClient(t,e,i){IpMessagingClient.super_.call(this,t,e,i)}n.inherits(IpMessagingClient,ObsoleteClient);function PricingClient(t,e,i){PricingClient.super_.call(this,t,e,i)}n.inherits(PricingClient,ObsoleteClient);function MonitorClient(t,e,i){MonitorClient.super_.call(this,t,e,i)}n.inherits(MonitorClient,ObsoleteClient);function TaskRouterClient(t,e,i){TaskRouterClient.super_.call(this,t,e,i)}n.inherits(TaskRouterClient,ObsoleteClient);function LookupsClient(t,e,i){LookupsClient.super_.call(this,t,e,i)}n.inherits(LookupsClient,ObsoleteClient);function TrunkingClient(t,e,i){TrunkingClient.super_.call(this,t,e,i)}n.inherits(TrunkingClient,ObsoleteClient);t.exports={RestClient:RestClient,IpMessagingClient:IpMessagingClient,PricingClient:PricingClient,MonitorClient:MonitorClient,TaskRouterClient:TaskRouterClient,LookupsClient:LookupsClient,TrunkingClient:TrunkingClient}},6372:(t,e,i)=>{"use strict";var n=i(90250);var o=i(7401);var s=i(94359);o.extend(s);t.exports={};t.exports.iso8601Date=function(t){if(n.isUndefined(t)||n.isString(t)||!n.isDate(t)){return t}else{return o.utc(t).format("YYYY-MM-DD")}};t.exports.iso8601DateTime=function(t){if(n.isUndefined(t)||n.isString(t)||!(t instanceof Date)){return t}else{return o.utc(t).format("YYYY-MM-DD[T]HH:mm:ss[Z]")}};t.exports.prefixedCollapsibleMap=function(t,e){if(n.isUndefined(t)||!n.isPlainObject(t)){return{}}function flatten(t,e,i){e=e||{};i=i||[];n.each(n.keys(t),function(o){if(n.isPlainObject(t[o])){flatten(t[o],e,n.union(i,[o]))}else{e[n.join(n.union(i,[o]),".")]=t[o]}});return e}var i=flatten(t);var o=i;if(e){o={};n.each(n.keys(i),function(t){o[e+"."+t]=i[t]})}return o};t.exports.object=function(t){if(n.isObject(t)||n.isArray(t)){return JSON.stringify(t)}return t};t.exports.bool=function(t){if(n.isString(t)){return t}if(n.isBoolean(t)){return t.toString()}return t};t.exports.map=function(t,e){if(n.isArray(t)){return n.map(t,e)}return t}},72142:(t,e,i)=>{"use strict";var n=i(90250);function of(t){return n.omitBy(t,n.isUndefined)}t.exports={of:of}},51438:(t,e,i)=>{"use strict";var n=i(90250);var o=function(t){t=t||{};this.method=t.method||this.ANY;this.url=t.url||this.ANY;this.auth=t.auth||this.ANY;this.params=t.params||this.ANY;this.data=t.data||this.ANY;this.headers=t.headers||this.ANY;this.ca=t.ca};o.prototype.ANY="*";o.prototype.attributeEqual=function(t,e){if(t===this.ANY||e===this.ANY){return true}t=t||undefined;e=e||undefined;return n.isEqual(t,e)};o.prototype.isEqual=function(t){return this.attributeEqual(this.method,t.method)&&this.attributeEqual(this.url,t.url)&&this.attributeEqual(this.auth,t.auth)&&this.attributeEqual(this.params,t.params)&&this.attributeEqual(this.data,t.data)&&this.attributeEqual(this.headers,t.headers)};o.prototype.toString=function(){var t="";if(this.auth&&this.auth!==this.ANY){t=this.auth+" "}var e="";if(this.params&&this.params!==this.ANY){e="?"+n.join(n.chain(n.keys(this.params)).map(function(t){return t+"="+this.params[t]}.bind(this)).value(),"&")}var i="";if(this.data&&this.data!==this.ANY){if(this.method==="GET"){i="\n -G"}i=i+"\n"+n.join(n.map(this.data,function(t,e){return" -d "+e+"="+t}),"\n")}var o="";if(this.headers&&this.headers!==this.ANY){o="\n"+n.join(n.map(this.headers,function(t,e){return" -H "+e+"="+t}),"\n")}return t+this.method+" "+this.url+e+i+o};t.exports=o},12785:t=>{"use strict";var e=function(t,e,i){this.statusCode=t;this.body=e;this.headers=i};e.prototype.toString=function(){return"HTTP "+this.statusCode+" "+this.body};t.exports=e},75595:(t,e,i)=>{"use strict";var n=i(98239);var o=i(19149);var s=i(76306);var r=function(t,e,i){return new n(t,e,i)};r.Twilio=n;r.jwt={};r.twiml={};var c;Object.defineProperty(r.jwt,"AccessToken",{get:function(){return c=c||i(59733)}});var a;Object.defineProperty(r.jwt,"ClientCapability",{get:function(){return a=a||i(44594)}});var u;Object.defineProperty(r.jwt,"taskrouter",{get:function(){return u=u||{TaskRouterCapability:i(68382),util:i(88790)}}});var h;Object.defineProperty(r.twiml,"VoiceResponse",{get:function(){return h=h||i(28905)}});var f;Object.defineProperty(r.twiml,"MessagingResponse",{get:function(){return f=f||i(53341)}});var p;Object.defineProperty(r.twiml,"FaxResponse",{get:function(){return p=p||i(18682)}});r.RestClient=s.RestClient;r.PricingClient=s.PricingClient;r.MonitorClient=s.MonitorClient;r.TaskRouterClient=s.TaskRouterClient;r.IpMessagingClient=s.IpMessagingClient;r.LookupsClient=s.LookupsClient;r.TrunkingClient=s.TrunkingClient;r.validateRequest=o.validateRequest;r.validateRequestWithBody=o.validateRequestWithBody;r.validateExpressRequest=o.validateExpressRequest;r.webhook=o.webhook;t.exports=r},59733:(t,e,i)=>{"use strict";var n=i(90250);var o=i(77486);var s=i(31669);function TaskRouterGrant(t){t=t||{};this.workspaceSid=t.workspaceSid;this.workerSid=t.workerSid;this.role=t.role}n.extend(TaskRouterGrant.prototype,{key:"task_router",toPayload:function(){var t={};if(this.workspaceSid){t.workspace_sid=this.workspaceSid}if(this.workerSid){t.worker_sid=this.workerSid}if(this.role){t.role=this.role}return t}});function ChatGrant(t){t=t||{};this.serviceSid=t.serviceSid;this.endpointId=t.endpointId;this.deploymentRoleSid=t.deploymentRoleSid;this.pushCredentialSid=t.pushCredentialSid}n.extend(ChatGrant.prototype,{key:"chat",toPayload:function(){var t={};if(this.serviceSid){t.service_sid=this.serviceSid}if(this.endpointId){t.endpoint_id=this.endpointId}if(this.deploymentRoleSid){t.deployment_role_sid=this.deploymentRoleSid}if(this.pushCredentialSid){t.push_credential_sid=this.pushCredentialSid}return t}});function IpMessagingGrant(t){ChatGrant.call(this,t)}IpMessagingGrant.prototype=n.create(ChatGrant.prototype,n.assign({_super:ChatGrant.prototype,constructor:ChatGrant}));IpMessagingGrant.prototype.key="ip_messaging";function ConversationsGrant(t){t=t||{};this.configurationProfileSid=t.configurationProfileSid}n.extend(ConversationsGrant.prototype,{key:"rtc",toPayload:function(){var t={};if(this.configurationProfileSid){t.configuration_profile_sid=this.configurationProfileSid}return t}});function VideoGrant(t){t=t||{};this.room=t.room}n.extend(VideoGrant.prototype,{key:"video",toPayload:function(){var t={};if(this.room){t.room=this.room}return t}});function SyncGrant(t){t=t||{};this.serviceSid=t.serviceSid;this.endpointId=t.endpointId}n.extend(SyncGrant.prototype,{key:"data_sync",toPayload:function(){var t={};if(this.serviceSid){t.service_sid=this.serviceSid}if(this.endpointId){t.endpoint_id=this.endpointId}return t}});function VoiceGrant(t){t=t||{};this.incomingAllow=t.incomingAllow;this.outgoingApplicationSid=t.outgoingApplicationSid;this.outgoingApplicationParams=t.outgoingApplicationParams;this.pushCredentialSid=t.pushCredentialSid;this.endpointId=t.endpointId}n.extend(VoiceGrant.prototype,{key:"voice",toPayload:function(){var t={};if(this.incomingAllow===true){t.incoming={allow:true}}if(this.outgoingApplicationSid){t.outgoing={};t.outgoing.application_sid=this.outgoingApplicationSid;if(this.outgoingApplicationParams){t.outgoing.params=this.outgoingApplicationParams}}if(this.pushCredentialSid){t.push_credential_sid=this.pushCredentialSid}if(this.endpointId){t.endpoint_id=this.endpointId}return t}});function AccessToken(t,e,i,n){if(!t){throw new Error("accountSid is required")}if(!e){throw new Error("keySid is required")}if(!i){throw new Error("secret is required")}n=n||{};this.accountSid=t;this.keySid=e;this.secret=i;this.ttl=n.ttl||3600;this.identity=n.identity;this.nbf=n.nbf;this.region=n.region;this.grants=[]}AccessToken.IpMessagingGrant=s.deprecate(IpMessagingGrant,"IpMessagingGrant is deprecated, use ChatGrant instead.");AccessToken.ChatGrant=ChatGrant;AccessToken.VoiceGrant=VoiceGrant;AccessToken.SyncGrant=SyncGrant;AccessToken.VideoGrant=VideoGrant;AccessToken.ConversationsGrant=s.deprecate(ConversationsGrant,"ConversationsGrant is deprecated, use VideoGrant instead.");AccessToken.TaskRouterGrant=TaskRouterGrant;AccessToken.DEFAULT_ALGORITHM="HS256";AccessToken.ALGORITHMS=["HS256","HS384","HS512"];n.extend(AccessToken.prototype,{addGrant:function(t){this.grants.push(t)},toJwt:function(t){t=t||AccessToken.DEFAULT_ALGORITHM;if(!n.includes(AccessToken.ALGORITHMS,t)){throw new Error("Algorithm not supported. Allowed values are "+AccessToken.ALGORITHMS.join(", "))}var e={};if(n.isInteger(this.identity)||n.isString(this.identity)){e.identity=String(this.identity)}n.each(this.grants,function(t){e[t.key]=t.toPayload()});var i=Math.floor(Date.now()/1e3);var s={jti:this.keySid+"-"+i,grants:e};if(n.isNumber(this.nbf)){s.nbf=this.nbf}var r={cty:"twilio-fpa;v=1",typ:"JWT"};if(this.region&&n.isString(this.region)){r.twr=this.region}return o.sign(s,this.secret,{header:r,algorithm:t,issuer:this.keySid,subject:this.accountSid,expiresIn:this.ttl})}});t.exports=AccessToken},44594:(t,e,i)=>{"use strict";var n=i(90250);var o=i(77486);var s=i(71191);function EventStreamScope(t){this.filters=t||{}}n.extend(EventStreamScope.prototype,{scope:"scope:stream:subscribe",payload:function(){var t=["path=/2010-04-01/Events"];if(!n.isEmpty(this.filters)){var e=n.map(this.filters,function(t,e){return n.join([s.escape(e),s.escape(t)],"=")});var i=n.join(e,"&");t.push(n.join(["appParams",s.escape(i)],"="))}var o=n.join(t,"&");return n.join([this.scope,o],"?")}});function IncomingClientScope(t){this.clientName=t}n.extend(IncomingClientScope.prototype,{scope:"scope:client:incoming",payload:function(){var t=n.join(["clientName",s.escape(this.clientName)],"=");return n.join([this.scope,t],"?")}});function OutgoingClientScope(t){if(n.isUndefined(t)){throw new Error('Required parameter "options" missing.')}if(n.isUndefined(t.applicationSid)){throw new Error('Required parameter "options.applicationSid" missing.')}t=t||{};this.applicationSid=t.applicationSid;this.clientName=t.clientName;this.params=t.params}n.extend(OutgoingClientScope.prototype,{scope:"scope:client:outgoing",payload:function(){var t=[n.join(["appSid",s.escape(this.applicationSid)],"=")];if(n.isString(this.clientName)){t.push(n.join(["clientName",s.escape(this.clientName)],"="))}if(n.isObject(this.params)){var e=n.map(this.params,function(t,e){return n.join([s.escape(e),s.escape(t)],"=")});var i=n.join(e,"&");t.push(n.join(["appParams",s.escape(i)],"="))}var o=n.join(t,"&");return n.join([this.scope,o],"?")}});function ClientCapability(t){if(n.isUndefined(t)){throw new Error('Required parameter "options" missing.')}if(n.isUndefined(t.accountSid)){throw new Error('Required parameter "options.accountSid" missing.')}if(n.isUndefined(t.authToken)){throw new Error('Required parameter "options.authToken" missing.')}t=t||{};this.accountSid=t.accountSid;this.authToken=t.authToken;this.ttl=t.ttl||3600;this.scopes=[]}ClientCapability.EventStreamScope=EventStreamScope;ClientCapability.IncomingClientScope=IncomingClientScope;ClientCapability.OutgoingClientScope=OutgoingClientScope;n.extend(ClientCapability.prototype,{addScope:function(t){this.scopes.push(t)},toJwt:function(){var t={scope:n.join(n.map(this.scopes,function(t){return t.payload()})," "),iss:this.accountSid,exp:Math.floor(new Date/1e3)+this.ttl};return o.sign(t,this.authToken)}});t.exports=ClientCapability},68382:(t,e,i)=>{"use strict";var n=i(77486);var o=i(90250);function Policy(t){t=t||{};this.url=t.url;this.method=t.method||"GET";this.queryFilter=t.queryFilter||{};this.postFilter=t.postFilter||{};this.allow=t.allow||true}o.extend(Policy.prototype,{payload:function(){return{url:this.url,method:this.method,query_filter:this.queryFilter,post_filter:this.postFilter,allow:this.allow}}});function TaskRouterCapability(t){if(o.isUndefined(t)){throw new Error('Required parameter "options" missing.')}if(o.isUndefined(t.accountSid)){throw new Error('Required parameter "options.accountSid" missing.')}if(o.isUndefined(t.authToken)){throw new Error('Required parameter "options.authToken" missing.')}if(o.isUndefined(t.workspaceSid)){throw new Error('Required parameter "options.workspaceSid" missing.')}if(o.isUndefined(t.channelId)){throw new Error('Required parameter "options.channelId" missing.')}this.accountSid=t.accountSid;this.authToken=t.authToken;this.workspaceSid=t.workspaceSid;this.channelId=t.channelId;this.friendlyName=t.friendlyName;this.ttl=t.ttl||3600;this.version=t.version||"v1";this.policies=[]}TaskRouterCapability.Policy=Policy;o.extend(TaskRouterCapability.prototype,{addPolicy:function(t){this.policies.push(t)},toJwt:function(){var t={iss:this.accountSid,exp:Math.floor(new Date/1e3)+this.ttl,version:this.version,friendly_name:this.friendlyName,account_sid:this.accountSid,channel:this.channelId,workspace_sid:this.workspaceSid,policies:o.map(this.policies,function(t){return t.payload()})};if(o.startsWith(this.channelId,"WK")){t.worker_sid=this.channelId}else if(o.startsWith(this.channelId,"WQ")){t.taskqueue_sid=this.channelId}return n.sign(t,this.authToken)}});t.exports=TaskRouterCapability},88790:(t,e,i)=>{"use strict";var n=i(90250);var o=i(68382).Policy;var s="https://event-bridge.twilio.com/v1/wschannels";var r="https://taskrouter.twilio.com";var c="v1";function defaultWorkerPolicies(t,e,i){var s=new o({url:n.join([r,t,"Workspaces",e,"Activities"],"/"),method:"GET",allow:true});var c=new o({url:n.join([r,t,"Workspaces",e,"Tasks","**"],"/"),method:"GET",allow:true});var a=new o({url:n.join([r,t,"Workspaces",e,"Workers",i,"Reservations","**"],"/"),method:"GET",allow:true});var u=new o({url:n.join([r,t,"Workspaces",e,"Workers",i],"/"),method:"GET",allow:true});return[s,c,a,u]}function defaultEventBridgePolicies(t,e){var i=n.join([s,t,e],"/");return[new o({url:i,method:"GET",allow:true}),new o({url:i,method:"POST",allow:true})]}function workspacesUrl(t){return n.join(n.filter([r,c,"Workspaces",t],n.isString),"/")}function taskQueuesUrl(t,e){return n.join(n.filter([workspacesUrl(t),"TaskQueues",e],n.isString),"/")}function tasksUrl(t,e){return n.join(n.filter([workspacesUrl(t),"Tasks",e],n.isString),"/")}function activitiesUrl(t,e){return n.join(n.filter([workspacesUrl(t),"Activities",e],n.isString),"/")}function workersUrl(t,e){return n.join(n.filter([workspacesUrl(t),"Workers",e],n.isString),"/")}function reservationsUrl(t,e,i){return n.join(n.filter([workersUrl(t,e),"Reservations",i],n.isString),"/")}t.exports={defaultWorkerPolicies:defaultWorkerPolicies,defaultEventBridgePolicies:defaultEventBridgePolicies,workspacesUrl:workspacesUrl,taskQueuesUrl:taskQueuesUrl,tasksUrl:tasksUrl,activitiesUrl:activitiesUrl,workersUrl:workersUrl,reservationsUrl:reservationsUrl}},57983:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(5020);function Accounts(t){o.prototype.constructor.call(this,t,"https://accounts.twilio.com");this._v1=undefined}n.extend(Accounts.prototype,o.prototype);Accounts.prototype.constructor=Accounts;Object.defineProperty(Accounts.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Accounts.prototype,"authTokenPromotion",{get:function(){return this.v1.authTokenPromotion}});Object.defineProperty(Accounts.prototype,"credentials",{get:function(){return this.v1.credentials}});Object.defineProperty(Accounts.prototype,"secondaryAuthToken",{get:function(){return this.v1.secondaryAuthToken}});t.exports=Accounts},15165:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(59650);function Api(t){o.prototype.constructor.call(this,t,"https://api.twilio.com");this._v2010=undefined}n.extend(Api.prototype,o.prototype);Api.prototype.constructor=Api;Object.defineProperty(Api.prototype,"v2010",{get:function(){this._v2010=this._v2010||new s(this);return this._v2010}});Object.defineProperty(Api.prototype,"account",{get:function(){return this.v2010.account}});Object.defineProperty(Api.prototype,"accounts",{get:function(){return this.v2010.accounts}});Object.defineProperty(Api.prototype,"addresses",{get:function(){return this.account.addresses}});Object.defineProperty(Api.prototype,"applications",{get:function(){return this.account.applications}});Object.defineProperty(Api.prototype,"authorizedConnectApps",{get:function(){return this.account.authorizedConnectApps}});Object.defineProperty(Api.prototype,"availablePhoneNumbers",{get:function(){return this.account.availablePhoneNumbers}});Object.defineProperty(Api.prototype,"balance",{get:function(){return this.account.balance}});Object.defineProperty(Api.prototype,"calls",{get:function(){return this.account.calls}});Object.defineProperty(Api.prototype,"conferences",{get:function(){return this.account.conferences}});Object.defineProperty(Api.prototype,"connectApps",{get:function(){return this.account.connectApps}});Object.defineProperty(Api.prototype,"incomingPhoneNumbers",{get:function(){return this.account.incomingPhoneNumbers}});Object.defineProperty(Api.prototype,"keys",{get:function(){return this.account.keys}});Object.defineProperty(Api.prototype,"messages",{get:function(){return this.account.messages}});Object.defineProperty(Api.prototype,"newKeys",{get:function(){return this.account.newKeys}});Object.defineProperty(Api.prototype,"newSigningKeys",{get:function(){return this.account.newSigningKeys}});Object.defineProperty(Api.prototype,"notifications",{get:function(){return this.account.notifications}});Object.defineProperty(Api.prototype,"outgoingCallerIds",{get:function(){return this.account.outgoingCallerIds}});Object.defineProperty(Api.prototype,"queues",{get:function(){return this.account.queues}});Object.defineProperty(Api.prototype,"recordings",{get:function(){return this.account.recordings}});Object.defineProperty(Api.prototype,"signingKeys",{get:function(){return this.account.signingKeys}});Object.defineProperty(Api.prototype,"sip",{get:function(){return this.account.sip}});Object.defineProperty(Api.prototype,"shortCodes",{get:function(){return this.account.shortCodes}});Object.defineProperty(Api.prototype,"tokens",{get:function(){return this.account.tokens}});Object.defineProperty(Api.prototype,"transcriptions",{get:function(){return this.account.transcriptions}});Object.defineProperty(Api.prototype,"usage",{get:function(){return this.account.usage}});Object.defineProperty(Api.prototype,"validationRequests",{get:function(){return this.account.validationRequests}});t.exports=Api},6824:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(6522);function Autopilot(t){o.prototype.constructor.call(this,t,"https://autopilot.twilio.com");this._v1=undefined}n.extend(Autopilot.prototype,o.prototype);Autopilot.prototype.constructor=Autopilot;Object.defineProperty(Autopilot.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Autopilot.prototype,"assistants",{get:function(){return this.v1.assistants}});Object.defineProperty(Autopilot.prototype,"restoreAssistant",{get:function(){return this.v1.restoreAssistant}});t.exports=Autopilot},48999:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(51999);function Bulkexports(t){o.prototype.constructor.call(this,t,"https://bulkexports.twilio.com");this._v1=undefined}n.extend(Bulkexports.prototype,o.prototype);Bulkexports.prototype.constructor=Bulkexports;Object.defineProperty(Bulkexports.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Bulkexports.prototype,"exports",{get:function(){return this.v1.exports}});Object.defineProperty(Bulkexports.prototype,"exportConfiguration",{get:function(){return this.v1.exportConfiguration}});t.exports=Bulkexports},85546:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(21772);var r=i(65979);function Chat(t){o.prototype.constructor.call(this,t,"https://chat.twilio.com");this._v1=undefined;this._v2=undefined}n.extend(Chat.prototype,o.prototype);Chat.prototype.constructor=Chat;Object.defineProperty(Chat.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Chat.prototype,"v2",{get:function(){this._v2=this._v2||new r(this);return this._v2}});Object.defineProperty(Chat.prototype,"credentials",{get:function(){return this.v2.credentials}});Object.defineProperty(Chat.prototype,"services",{get:function(){return this.v2.services}});t.exports=Chat},99118:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(12918);function Conversations(t){o.prototype.constructor.call(this,t,"https://conversations.twilio.com");this._v1=undefined}n.extend(Conversations.prototype,o.prototype);Conversations.prototype.constructor=Conversations;Object.defineProperty(Conversations.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Conversations.prototype,"configuration",{get:function(){return this.v1.configuration}});Object.defineProperty(Conversations.prototype,"conversations",{get:function(){return this.v1.conversations}});Object.defineProperty(Conversations.prototype,"credentials",{get:function(){return this.v1.credentials}});Object.defineProperty(Conversations.prototype,"roles",{get:function(){return this.v1.roles}});Object.defineProperty(Conversations.prototype,"services",{get:function(){return this.v1.services}});Object.defineProperty(Conversations.prototype,"users",{get:function(){return this.v1.users}});t.exports=Conversations},84429:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(47767);function Events(t){o.prototype.constructor.call(this,t,"https://events.twilio.com");this._v1=undefined}n.extend(Events.prototype,o.prototype);Events.prototype.constructor=Events;Object.defineProperty(Events.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Events.prototype,"eventTypes",{get:function(){return this.v1.eventTypes}});Object.defineProperty(Events.prototype,"schemas",{get:function(){return this.v1.schemas}});Object.defineProperty(Events.prototype,"sinks",{get:function(){return this.v1.sinks}});Object.defineProperty(Events.prototype,"subscriptions",{get:function(){return this.v1.subscriptions}});t.exports=Events},68262:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(23827);function Fax(t){o.prototype.constructor.call(this,t,"https://fax.twilio.com");this._v1=undefined}n.extend(Fax.prototype,o.prototype);Fax.prototype.constructor=Fax;Object.defineProperty(Fax.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Fax.prototype,"faxes",{get:function(){return this.v1.faxes}});t.exports=Fax},43888:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(47633);function FlexApi(t){o.prototype.constructor.call(this,t,"https://flex-api.twilio.com");this._v1=undefined}n.extend(FlexApi.prototype,o.prototype);FlexApi.prototype.constructor=FlexApi;Object.defineProperty(FlexApi.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(FlexApi.prototype,"channel",{get:function(){return this.v1.channel}});Object.defineProperty(FlexApi.prototype,"configuration",{get:function(){return this.v1.configuration}});Object.defineProperty(FlexApi.prototype,"flexFlow",{get:function(){return this.v1.flexFlow}});Object.defineProperty(FlexApi.prototype,"webChannel",{get:function(){return this.v1.webChannel}});t.exports=FlexApi},32062:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(46133);function Insights(t){o.prototype.constructor.call(this,t,"https://insights.twilio.com");this._v1=undefined}n.extend(Insights.prototype,o.prototype);Insights.prototype.constructor=Insights;Object.defineProperty(Insights.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Insights.prototype,"calls",{get:function(){return this.v1.calls}});Object.defineProperty(Insights.prototype,"rooms",{get:function(){return this.v1.rooms}});t.exports=Insights},87891:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(76365);var r=i(17014);function IpMessaging(t){o.prototype.constructor.call(this,t,"https://ip-messaging.twilio.com");this._v1=undefined;this._v2=undefined}n.extend(IpMessaging.prototype,o.prototype);IpMessaging.prototype.constructor=IpMessaging;Object.defineProperty(IpMessaging.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(IpMessaging.prototype,"v2",{get:function(){this._v2=this._v2||new r(this);return this._v2}});Object.defineProperty(IpMessaging.prototype,"credentials",{get:function(){return this.v2.credentials}});Object.defineProperty(IpMessaging.prototype,"services",{get:function(){return this.v2.services}});t.exports=IpMessaging},10016:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(23896);function Lookups(t){o.prototype.constructor.call(this,t,"https://lookups.twilio.com");this._v1=undefined}n.extend(Lookups.prototype,o.prototype);Lookups.prototype.constructor=Lookups;Object.defineProperty(Lookups.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Lookups.prototype,"phoneNumbers",{get:function(){return this.v1.phoneNumbers}});t.exports=Lookups},46063:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(98776);function Messaging(t){o.prototype.constructor.call(this,t,"https://messaging.twilio.com");this._v1=undefined}n.extend(Messaging.prototype,o.prototype);Messaging.prototype.constructor=Messaging;Object.defineProperty(Messaging.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Messaging.prototype,"deactivations",{get:function(){return this.v1.deactivations}});Object.defineProperty(Messaging.prototype,"services",{get:function(){return this.v1.services}});t.exports=Messaging},52240:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(99630);function Monitor(t){o.prototype.constructor.call(this,t,"https://monitor.twilio.com");this._v1=undefined}n.extend(Monitor.prototype,o.prototype);Monitor.prototype.constructor=Monitor;Object.defineProperty(Monitor.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Monitor.prototype,"alerts",{get:function(){return this.v1.alerts}});Object.defineProperty(Monitor.prototype,"events",{get:function(){return this.v1.events}});t.exports=Monitor},96951:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(88117);function Notify(t){o.prototype.constructor.call(this,t,"https://notify.twilio.com");this._v1=undefined}n.extend(Notify.prototype,o.prototype);Notify.prototype.constructor=Notify;Object.defineProperty(Notify.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Notify.prototype,"credentials",{get:function(){return this.v1.credentials}});Object.defineProperty(Notify.prototype,"services",{get:function(){return this.v1.services}});t.exports=Notify},60482:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(16213);function Numbers(t){o.prototype.constructor.call(this,t,"https://numbers.twilio.com");this._v2=undefined}n.extend(Numbers.prototype,o.prototype);Numbers.prototype.constructor=Numbers;Object.defineProperty(Numbers.prototype,"v2",{get:function(){this._v2=this._v2||new s(this);return this._v2}});Object.defineProperty(Numbers.prototype,"regulatoryCompliance",{get:function(){return this.v2.regulatoryCompliance}});t.exports=Numbers},70930:(t,e,i)=>{"use strict";var n=i(90250);var o=i(1382);var s=i(82477);var r=i(64580);var c=i(39874);var a=i(87505);var u=i(71881);var h=i(63819);var f=i(89265);var p=i(87152);function Preview(t){r.prototype.constructor.call(this,t,"https://preview.twilio.com");this._bulk_exports=undefined;this._deployed_devices=undefined;this._hosted_numbers=undefined;this._marketplace=undefined;this._sync=undefined;this._understand=undefined;this._wireless=undefined;this._trusted_comms=undefined}n.extend(Preview.prototype,r.prototype);Preview.prototype.constructor=Preview;Object.defineProperty(Preview.prototype,"bulk_exports",{get:function(){this._bulk_exports=this._bulk_exports||new o(this);return this._bulk_exports}});Object.defineProperty(Preview.prototype,"deployed_devices",{get:function(){this._deployed_devices=this._deployed_devices||new s(this);return this._deployed_devices}});Object.defineProperty(Preview.prototype,"hosted_numbers",{get:function(){this._hosted_numbers=this._hosted_numbers||new c(this);return this._hosted_numbers}});Object.defineProperty(Preview.prototype,"marketplace",{get:function(){this._marketplace=this._marketplace||new a(this);return this._marketplace}});Object.defineProperty(Preview.prototype,"sync",{get:function(){this._sync=this._sync||new u(this);return this._sync}});Object.defineProperty(Preview.prototype,"understand",{get:function(){this._understand=this._understand||new f(this);return this._understand}});Object.defineProperty(Preview.prototype,"wireless",{get:function(){this._wireless=this._wireless||new p(this);return this._wireless}});Object.defineProperty(Preview.prototype,"trusted_comms",{get:function(){this._trusted_comms=this._trusted_comms||new h(this);return this._trusted_comms}});Object.defineProperty(Preview.prototype,"exports",{get:function(){return this.bulk_exports.exports}});Object.defineProperty(Preview.prototype,"exportConfiguration",{get:function(){return this.bulk_exports.exportConfiguration}});Object.defineProperty(Preview.prototype,"fleets",{get:function(){return this.deployed_devices.fleets}});Object.defineProperty(Preview.prototype,"authorizationDocuments",{get:function(){return this.hosted_numbers.authorizationDocuments}});Object.defineProperty(Preview.prototype,"hostedNumberOrders",{get:function(){return this.hosted_numbers.hostedNumberOrders}});Object.defineProperty(Preview.prototype,"availableAddOns",{get:function(){return this.marketplace.availableAddOns}});Object.defineProperty(Preview.prototype,"installedAddOns",{get:function(){return this.marketplace.installedAddOns}});Object.defineProperty(Preview.prototype,"services",{get:function(){return this.sync.services}});Object.defineProperty(Preview.prototype,"assistants",{get:function(){return this.understand.assistants}});Object.defineProperty(Preview.prototype,"commands",{get:function(){return this.wireless.commands}});Object.defineProperty(Preview.prototype,"ratePlans",{get:function(){return this.wireless.ratePlans}});Object.defineProperty(Preview.prototype,"sims",{get:function(){return this.wireless.sims}});Object.defineProperty(Preview.prototype,"brandedChannels",{get:function(){return this.trusted_comms.brandedChannels}});Object.defineProperty(Preview.prototype,"brandsInformation",{get:function(){return this.trusted_comms.brandsInformation}});Object.defineProperty(Preview.prototype,"cps",{get:function(){return this.trusted_comms.cps}});Object.defineProperty(Preview.prototype,"currentCalls",{get:function(){return this.trusted_comms.currentCalls}});t.exports=Preview},9037:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(49274);var r=i(27068);function Pricing(t){o.prototype.constructor.call(this,t,"https://pricing.twilio.com");this._v1=undefined;this._v2=undefined}n.extend(Pricing.prototype,o.prototype);Pricing.prototype.constructor=Pricing;Object.defineProperty(Pricing.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Pricing.prototype,"v2",{get:function(){this._v2=this._v2||new r(this);return this._v2}});Object.defineProperty(Pricing.prototype,"messaging",{get:function(){return this.v1.messaging}});Object.defineProperty(Pricing.prototype,"phoneNumbers",{get:function(){return this.v1.phoneNumbers}});Object.defineProperty(Pricing.prototype,"voice",{get:function(){return this.v2.voice}});t.exports=Pricing},31947:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(3986);function Proxy(t){o.prototype.constructor.call(this,t,"https://proxy.twilio.com");this._v1=undefined}n.extend(Proxy.prototype,o.prototype);Proxy.prototype.constructor=Proxy;Object.defineProperty(Proxy.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Proxy.prototype,"services",{get:function(){return this.v1.services}});t.exports=Proxy},7473:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(98995);function Serverless(t){o.prototype.constructor.call(this,t,"https://serverless.twilio.com");this._v1=undefined}n.extend(Serverless.prototype,o.prototype);Serverless.prototype.constructor=Serverless;Object.defineProperty(Serverless.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Serverless.prototype,"services",{get:function(){return this.v1.services}});t.exports=Serverless},25320:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(67727);var r=i(81292);function Studio(t){o.prototype.constructor.call(this,t,"https://studio.twilio.com");this._v1=undefined;this._v2=undefined}n.extend(Studio.prototype,o.prototype);Studio.prototype.constructor=Studio;Object.defineProperty(Studio.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Studio.prototype,"v2",{get:function(){this._v2=this._v2||new r(this);return this._v2}});Object.defineProperty(Studio.prototype,"flows",{get:function(){return this.v2.flows}});Object.defineProperty(Studio.prototype,"flowValidate",{get:function(){return this.v2.flowValidate}});t.exports=Studio},64165:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(16029);function Supersim(t){o.prototype.constructor.call(this,t,"https://supersim.twilio.com");this._v1=undefined}n.extend(Supersim.prototype,o.prototype);Supersim.prototype.constructor=Supersim;Object.defineProperty(Supersim.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Supersim.prototype,"commands",{get:function(){return this.v1.commands}});Object.defineProperty(Supersim.prototype,"fleets",{get:function(){return this.v1.fleets}});Object.defineProperty(Supersim.prototype,"networks",{get:function(){return this.v1.networks}});Object.defineProperty(Supersim.prototype,"networkAccessProfiles",{get:function(){return this.v1.networkAccessProfiles}});Object.defineProperty(Supersim.prototype,"sims",{get:function(){return this.v1.sims}});Object.defineProperty(Supersim.prototype,"usageRecords",{get:function(){return this.v1.usageRecords}});t.exports=Supersim},44495:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(34949);function Sync(t){o.prototype.constructor.call(this,t,"https://sync.twilio.com");this._v1=undefined}n.extend(Sync.prototype,o.prototype);Sync.prototype.constructor=Sync;Object.defineProperty(Sync.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Sync.prototype,"services",{get:function(){return this.v1.services}});t.exports=Sync},43191:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(28079);function Taskrouter(t){o.prototype.constructor.call(this,t,"https://taskrouter.twilio.com");this._v1=undefined}n.extend(Taskrouter.prototype,o.prototype);Taskrouter.prototype.constructor=Taskrouter;Object.defineProperty(Taskrouter.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Taskrouter.prototype,"workspaces",{get:function(){return this.v1.workspaces}});t.exports=Taskrouter},66569:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(99996);function Trunking(t){o.prototype.constructor.call(this,t,"https://trunking.twilio.com");this._v1=undefined}n.extend(Trunking.prototype,o.prototype);Trunking.prototype.constructor=Trunking;Object.defineProperty(Trunking.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Trunking.prototype,"trunks",{get:function(){return this.v1.trunks}});t.exports=Trunking},98239:(t,e,i)=>{"use strict";var n=i(87751);var o=i(78835);var s=i(31669);var r=i(50284);function Twilio(t,e,i){i=i||{};var n=i.env||process.env;this.username=t||n.TWILIO_ACCOUNT_SID;this.password=e||n.TWILIO_AUTH_TOKEN;this.accountSid=i.accountSid||this.username;this._httpClient=i.httpClient;if(!i.lazyLoading){this._httpClient=this.httpClient}this.edge=i.edge||n.TWILIO_EDGE;this.region=i.region||n.TWILIO_REGION;this.logLevel=i.logLevel||n.TWILIO_LOG_LEVEL;if(!this.username){throw new Error("username is required")}if(!this.password){throw new Error("password is required")}if(!this.accountSid.startsWith("AC")){throw new Error("accountSid must start with AC")}this._accounts=undefined;this._api=undefined;this._autopilot=undefined;this._chat=undefined;this._conversations=undefined;this._events=undefined;this._fax=undefined;this._flexApi=undefined;this._insights=undefined;this._ipMessaging=undefined;this._lookups=undefined;this._messaging=undefined;this._monitor=undefined;this._notify=undefined;this._numbers=undefined;this._preview=undefined;this._pricing=undefined;this._proxy=undefined;this._serverless=undefined;this._studio=undefined;this._sync=undefined;this._taskrouter=undefined;this._trunking=undefined;this._verify=undefined;this._video=undefined;this._voice=undefined;this._wireless=undefined;this._supersim=undefined;this._bulkexports=undefined;if(!i.lazyLoading){this.accounts;this.api;this.autopilot;this.chat;this.conversations;this.events;this.fax;this.flexApi;this.insights;this.ipMessaging;this.lookups;this.messaging;this.monitor;this.notify;this.numbers;this.preview;this.pricing;this.proxy;this.serverless;this.studio;this.sync;this.taskrouter;this.trunking;this.verify;this.video;this.voice;this.wireless;this.supersim;this.bulkexports}}Twilio.prototype.request=function request(t){t=t||{};if(!t.method){throw new Error("method is required")}if(!t.uri){throw new Error("uri is required")}var e=t.username||this.username;var i=t.password||this.password;var r=t.headers||{};r["User-Agent"]=s.format("twilio-node/%s (node.js %s)",n.version,process.version);r["Accept-Charset"]="utf-8";if(t.method==="POST"&&!r["Content-Type"]){r["Content-Type"]="application/x-www-form-urlencoded"}if(!r.Accept){r.Accept="application/json"}var c=new o.URL(t.uri);c.hostname=this.getHostname(c.hostname,this.edge,this.region);return this.httpClient.request({method:t.method,uri:c.href,username:e,password:i,headers:r,params:t.params,data:t.data,timeout:t.timeout,allowRedirects:t.allowRedirects,logLevel:t.logLevel||this.logLevel})};Twilio.prototype.getHostname=function getHostname(t,e,i){const n="us1";const o=t.split(".").slice(-2).join(".");const s=t.split("."+o)[0];let[r,c,a]=s.split(".");if(c&&!a){a=c;c=undefined}a=i||a||e&&n;if(!a){return t}c=e||c;return[r,c,a,o].filter(t=>t).join(".")};Twilio.prototype.validateSslCert=function validateSslCert(){return this.httpClient.request({method:"GET",uri:"https://api.twilio.com:8443/2010-04-01/.json"}).then(t=>{if(t.statusCode<200||t.statusCode>=300){throw new r(t)}return t})};Object.defineProperty(Twilio.prototype,"httpClient",{get:function(){if(!this._httpClient){var t=i(77761);this._httpClient=new t}return this._httpClient}});Object.defineProperty(Twilio.prototype,"accounts",{get:function(){if(!this._accounts){var t=i(57983);this._accounts=new t(this)}return this._accounts}});Object.defineProperty(Twilio.prototype,"api",{get:function(){if(!this._api){var t=i(15165);this._api=new t(this)}return this._api}});Object.defineProperty(Twilio.prototype,"autopilot",{get:function(){if(!this._autopilot){var t=i(6824);this._autopilot=new t(this)}return this._autopilot}});Object.defineProperty(Twilio.prototype,"chat",{get:function(){if(!this._chat){var t=i(85546);this._chat=new t(this)}return this._chat}});Object.defineProperty(Twilio.prototype,"conversations",{get:function(){if(!this._conversations){var t=i(99118);this._conversations=new t(this)}return this._conversations}});Object.defineProperty(Twilio.prototype,"events",{get:function(){if(!this._events){var t=i(84429);this._events=new t(this)}return this._events}});Object.defineProperty(Twilio.prototype,"fax",{get:function(){if(!this._fax){var t=i(68262);this._fax=new t(this)}return this._fax}});Object.defineProperty(Twilio.prototype,"flexApi",{get:function(){if(!this._flexApi){var t=i(43888);this._flexApi=new t(this)}return this._flexApi}});Object.defineProperty(Twilio.prototype,"insights",{get:function(){if(!this._insights){var t=i(32062);this._insights=new t(this)}return this._insights}});Object.defineProperty(Twilio.prototype,"ipMessaging",{get:function(){if(!this._ipMessaging){var t=i(87891);this._ipMessaging=new t(this)}return this._ipMessaging}});Object.defineProperty(Twilio.prototype,"lookups",{get:function(){if(!this._lookups){var t=i(10016);this._lookups=new t(this)}return this._lookups}});Object.defineProperty(Twilio.prototype,"messaging",{get:function(){if(!this._messaging){var t=i(46063);this._messaging=new t(this)}return this._messaging}});Object.defineProperty(Twilio.prototype,"monitor",{get:function(){if(!this._monitor){var t=i(52240);this._monitor=new t(this)}return this._monitor}});Object.defineProperty(Twilio.prototype,"notify",{get:function(){if(!this._notify){var t=i(96951);this._notify=new t(this)}return this._notify}});Object.defineProperty(Twilio.prototype,"numbers",{get:function(){if(!this._numbers){var t=i(60482);this._numbers=new t(this)}return this._numbers}});Object.defineProperty(Twilio.prototype,"preview",{get:function(){if(!this._preview){var t=i(70930);this._preview=new t(this)}return this._preview}});Object.defineProperty(Twilio.prototype,"pricing",{get:function(){if(!this._pricing){var t=i(9037);this._pricing=new t(this)}return this._pricing}});Object.defineProperty(Twilio.prototype,"proxy",{get:function(){if(!this._proxy){var t=i(31947);this._proxy=new t(this)}return this._proxy}});Object.defineProperty(Twilio.prototype,"serverless",{get:function(){if(!this._serverless){var t=i(7473);this._serverless=new t(this)}return this._serverless}});Object.defineProperty(Twilio.prototype,"studio",{get:function(){if(!this._studio){var t=i(25320);this._studio=new t(this)}return this._studio}});Object.defineProperty(Twilio.prototype,"sync",{get:function(){if(!this._sync){var t=i(44495);this._sync=new t(this)}return this._sync}});Object.defineProperty(Twilio.prototype,"taskrouter",{get:function(){if(!this._taskrouter){var t=i(43191);this._taskrouter=new t(this)}return this._taskrouter}});Object.defineProperty(Twilio.prototype,"trunking",{get:function(){if(!this._trunking){var t=i(66569);this._trunking=new t(this)}return this._trunking}});Object.defineProperty(Twilio.prototype,"verify",{get:function(){if(!this._verify){var t=i(32822);this._verify=new t(this)}return this._verify}});Object.defineProperty(Twilio.prototype,"video",{get:function(){if(!this._video){var t=i(29977);this._video=new t(this)}return this._video}});Object.defineProperty(Twilio.prototype,"voice",{get:function(){if(!this._voice){var t=i(24744);this._voice=new t(this)}return this._voice}});Object.defineProperty(Twilio.prototype,"wireless",{get:function(){if(!this._wireless){var t=i(22242);this._wireless=new t(this)}return this._wireless}});Object.defineProperty(Twilio.prototype,"supersim",{get:function(){if(!this._supersim){var t=i(64165);this._supersim=new t(this)}return this._supersim}});Object.defineProperty(Twilio.prototype,"bulkexports",{get:function(){if(!this._bulkexports){var t=i(48999);this._bulkexports=new t(this)}return this._bulkexports}});Object.defineProperty(Twilio.prototype,"addresses",{get:function(){return this.api.account.addresses}});Object.defineProperty(Twilio.prototype,"applications",{get:function(){return this.api.account.applications}});Object.defineProperty(Twilio.prototype,"authorizedConnectApps",{get:function(){return this.api.account.authorizedConnectApps}});Object.defineProperty(Twilio.prototype,"availablePhoneNumbers",{get:function(){return this.api.account.availablePhoneNumbers}});Object.defineProperty(Twilio.prototype,"balance",{get:function(){return this.api.account.balance}});Object.defineProperty(Twilio.prototype,"calls",{get:function(){return this.api.account.calls}});Object.defineProperty(Twilio.prototype,"conferences",{get:function(){return this.api.account.conferences}});Object.defineProperty(Twilio.prototype,"connectApps",{get:function(){return this.api.account.connectApps}});Object.defineProperty(Twilio.prototype,"incomingPhoneNumbers",{get:function(){return this.api.account.incomingPhoneNumbers}});Object.defineProperty(Twilio.prototype,"keys",{get:function(){return this.api.account.keys}});Object.defineProperty(Twilio.prototype,"messages",{get:function(){return this.api.account.messages}});Object.defineProperty(Twilio.prototype,"newKeys",{get:function(){return this.api.account.newKeys}});Object.defineProperty(Twilio.prototype,"newSigningKeys",{get:function(){return this.api.account.newSigningKeys}});Object.defineProperty(Twilio.prototype,"notifications",{get:function(){return this.api.account.notifications}});Object.defineProperty(Twilio.prototype,"outgoingCallerIds",{get:function(){return this.api.account.outgoingCallerIds}});Object.defineProperty(Twilio.prototype,"queues",{get:function(){return this.api.account.queues}});Object.defineProperty(Twilio.prototype,"recordings",{get:function(){return this.api.account.recordings}});Object.defineProperty(Twilio.prototype,"signingKeys",{get:function(){return this.api.account.signingKeys}});Object.defineProperty(Twilio.prototype,"sip",{get:function(){return this.api.account.sip}});Object.defineProperty(Twilio.prototype,"shortCodes",{get:function(){return this.api.account.shortCodes}});Object.defineProperty(Twilio.prototype,"tokens",{get:function(){return this.api.account.tokens}});Object.defineProperty(Twilio.prototype,"transcriptions",{get:function(){return this.api.account.transcriptions}});Object.defineProperty(Twilio.prototype,"usage",{get:function(){return this.api.account.usage}});Object.defineProperty(Twilio.prototype,"validationRequests",{get:function(){return this.api.account.validationRequests}});t.exports=Twilio},32822:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(79352);function Verify(t){o.prototype.constructor.call(this,t,"https://verify.twilio.com");this._v2=undefined}n.extend(Verify.prototype,o.prototype);Verify.prototype.constructor=Verify;Object.defineProperty(Verify.prototype,"v2",{get:function(){this._v2=this._v2||new s(this);return this._v2}});Object.defineProperty(Verify.prototype,"forms",{get:function(){return this.v2.forms}});Object.defineProperty(Verify.prototype,"services",{get:function(){return this.v2.services}});t.exports=Verify},29977:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(41933);function Video(t){o.prototype.constructor.call(this,t,"https://video.twilio.com");this._v1=undefined}n.extend(Video.prototype,o.prototype);Video.prototype.constructor=Video;Object.defineProperty(Video.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Video.prototype,"compositions",{get:function(){return this.v1.compositions}});Object.defineProperty(Video.prototype,"compositionHooks",{get:function(){return this.v1.compositionHooks}});Object.defineProperty(Video.prototype,"compositionSettings",{get:function(){return this.v1.compositionSettings}});Object.defineProperty(Video.prototype,"recordings",{get:function(){return this.v1.recordings}});Object.defineProperty(Video.prototype,"recordingSettings",{get:function(){return this.v1.recordingSettings}});Object.defineProperty(Video.prototype,"rooms",{get:function(){return this.v1.rooms}});t.exports=Video},24744:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(24691);function Voice(t){o.prototype.constructor.call(this,t,"https://voice.twilio.com");this._v1=undefined}n.extend(Voice.prototype,o.prototype);Voice.prototype.constructor=Voice;Object.defineProperty(Voice.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Voice.prototype,"byocTrunks",{get:function(){return this.v1.byocTrunks}});Object.defineProperty(Voice.prototype,"connectionPolicies",{get:function(){return this.v1.connectionPolicies}});Object.defineProperty(Voice.prototype,"dialingPermissions",{get:function(){return this.v1.dialingPermissions}});Object.defineProperty(Voice.prototype,"ipRecords",{get:function(){return this.v1.ipRecords}});Object.defineProperty(Voice.prototype,"sourceIpMappings",{get:function(){return this.v1.sourceIpMappings}});t.exports=Voice},22242:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(57415);function Wireless(t){o.prototype.constructor.call(this,t,"https://wireless.twilio.com");this._v1=undefined}n.extend(Wireless.prototype,o.prototype);Wireless.prototype.constructor=Wireless;Object.defineProperty(Wireless.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Wireless.prototype,"usageRecords",{get:function(){return this.v1.usageRecords}});Object.defineProperty(Wireless.prototype,"commands",{get:function(){return this.v1.commands}});Object.defineProperty(Wireless.prototype,"ratePlans",{get:function(){return this.v1.ratePlans}});Object.defineProperty(Wireless.prototype,"sims",{get:function(){return this.v1.sims}});t.exports=Wireless},5020:(t,e,i)=>{"use strict";var n=i(90250);var o=i(69221).AuthTokenPromotionList;var s=i(53028).CredentialList;var r=i(38505).SecondaryAuthTokenList;var c=i(64351);function V1(t){c.prototype.constructor.call(this,t,"v1");this._authTokenPromotion=undefined;this._credentials=undefined;this._secondaryAuthToken=undefined}n.extend(V1.prototype,c.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"authTokenPromotion",{get:function(){this._authTokenPromotion=this._authTokenPromotion||new o(this);return this._authTokenPromotion}});Object.defineProperty(V1.prototype,"credentials",{get:function(){this._credentials=this._credentials||new s(this);return this._credentials}});Object.defineProperty(V1.prototype,"secondaryAuthToken",{get:function(){this._secondaryAuthToken=this._secondaryAuthToken||new r(this);return this._secondaryAuthToken}});t.exports=V1},69221:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AuthTokenPromotionList(t){function AuthTokenPromotionListInstance(t){return AuthTokenPromotionListInstance.get(t)}AuthTokenPromotionListInstance._version=t;AuthTokenPromotionListInstance._solution={};AuthTokenPromotionListInstance.get=function get(){return new p(this._version)};AuthTokenPromotionListInstance.toJSON=function toJSON(){return this._solution};AuthTokenPromotionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthTokenPromotionListInstance};h=function AuthTokenPromotionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AuthTokenPromotionInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.authToken=e.auth_token;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.update=function update(t){return this._proxy.update(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AuthTokenPromotionContext(t){this._version=t;this._solution={};this._uri=`/AuthTokens/Promote`};p.prototype.update=function update(t){var e=n.defer();var i=this._version.update({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthTokenPromotionList:u,AuthTokenPromotionPage:h,AuthTokenPromotionInstance:f,AuthTokenPromotionContext:p}},53028:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(24295).AwsList;var r=i(77791).PublicKeyList;var c;c=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._publicKey=undefined;CredentialListInstance._aws=undefined;Object.defineProperty(CredentialListInstance,"publicKey",{get:function publicKey(){if(!this._publicKey){this._publicKey=new r(this._version)}return this._publicKey}});Object.defineProperty(CredentialListInstance,"aws",{get:function aws(){if(!this._aws){this._aws=new s(this._version)}return this._aws}});CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return CredentialListInstance};t.exports={CredentialList:c}},24295:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AwsList(t){function AwsListInstance(t){return AwsListInstance.get(t)}AwsListInstance._version=t;AwsListInstance._solution={};AwsListInstance._uri=`/Credentials/AWS`;AwsListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AwsListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AwsListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AwsListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AwsListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.credentials)){throw new Error('Required parameter "opts.credentials" missing.')}var i=n.defer();var s=a.of({Credentials:o.get(t,"credentials"),FriendlyName:o.get(t,"friendlyName"),AccountSid:o.get(t,"accountSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AwsListInstance.get=function get(t){return new p(this._version,t)};AwsListInstance.toJSON=function toJSON(){return this._solution};AwsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AwsListInstance};h=function AwsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AwsInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AwsContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/AWS/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AwsList:u,AwsPage:h,AwsInstance:f,AwsContext:p}},77791:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function PublicKeyList(t){function PublicKeyListInstance(t){return PublicKeyListInstance.get(t)}PublicKeyListInstance._version=t;PublicKeyListInstance._solution={};PublicKeyListInstance._uri=`/Credentials/PublicKeys`;PublicKeyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PublicKeyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PublicKeyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PublicKeyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PublicKeyListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.publicKey)){throw new Error('Required parameter "opts.publicKey" missing.')}var i=n.defer();var s=a.of({PublicKey:o.get(t,"publicKey"),FriendlyName:o.get(t,"friendlyName"),AccountSid:o.get(t,"accountSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PublicKeyListInstance.get=function get(t){return new p(this._version,t)};PublicKeyListInstance.toJSON=function toJSON(){return this._solution};PublicKeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PublicKeyListInstance};h=function PublicKeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PublicKeyInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PublicKeyContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/PublicKeys/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PublicKeyList:u,PublicKeyPage:h,PublicKeyInstance:f,PublicKeyContext:p}},38505:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SecondaryAuthTokenList(t){function SecondaryAuthTokenListInstance(t){return SecondaryAuthTokenListInstance.get(t)}SecondaryAuthTokenListInstance._version=t;SecondaryAuthTokenListInstance._solution={};SecondaryAuthTokenListInstance.get=function get(){return new p(this._version)};SecondaryAuthTokenListInstance.toJSON=function toJSON(){return this._solution};SecondaryAuthTokenListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SecondaryAuthTokenListInstance};h=function SecondaryAuthTokenPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SecondaryAuthTokenInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.secondaryAuthToken=e.secondary_auth_token;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.create=function create(t){return this._proxy.create(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SecondaryAuthTokenContext(t){this._version=t;this._solution={};this._uri=`/AuthTokens/Secondary`};p.prototype.create=function create(t){var e=n.defer();var i=this._version.create({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SecondaryAuthTokenList:u,SecondaryAuthTokenPage:h,SecondaryAuthTokenInstance:f,SecondaryAuthTokenContext:p}},59650:(t,e,i)=>{"use strict";var n=i(90250);var o=i(72241).AccountContext;var s=i(72241).AccountList;var r=i(64351);function V2010(t){r.prototype.constructor.call(this,t,"2010-04-01");this._accounts=undefined;this._account=undefined}n.extend(V2010.prototype,r.prototype);V2010.prototype.constructor=V2010;Object.defineProperty(V2010.prototype,"accounts",{get:function(){this._accounts=this._accounts||new s(this);return this._accounts}});Object.defineProperty(V2010.prototype,"account",{get:function(){if(!this._account){this._account=new o(this,this._domain.twilio.accountSid)}return this._account},set:function(t){this._account=t}});Object.defineProperty(V2010.prototype,"addresses",{get:function(){return this.account.addresses}});Object.defineProperty(V2010.prototype,"applications",{get:function(){return this.account.applications}});Object.defineProperty(V2010.prototype,"authorizedConnectApps",{get:function(){return this.account.authorizedConnectApps}});Object.defineProperty(V2010.prototype,"availablePhoneNumbers",{get:function(){return this.account.availablePhoneNumbers}});Object.defineProperty(V2010.prototype,"balance",{get:function(){return this.account.balance}});Object.defineProperty(V2010.prototype,"calls",{get:function(){return this.account.calls}});Object.defineProperty(V2010.prototype,"conferences",{get:function(){return this.account.conferences}});Object.defineProperty(V2010.prototype,"connectApps",{get:function(){return this.account.connectApps}});Object.defineProperty(V2010.prototype,"incomingPhoneNumbers",{get:function(){return this.account.incomingPhoneNumbers}});Object.defineProperty(V2010.prototype,"keys",{get:function(){return this.account.keys}});Object.defineProperty(V2010.prototype,"messages",{get:function(){return this.account.messages}});Object.defineProperty(V2010.prototype,"newKeys",{get:function(){return this.account.newKeys}});Object.defineProperty(V2010.prototype,"newSigningKeys",{get:function(){return this.account.newSigningKeys}});Object.defineProperty(V2010.prototype,"notifications",{get:function(){return this.account.notifications}});Object.defineProperty(V2010.prototype,"outgoingCallerIds",{get:function(){return this.account.outgoingCallerIds}});Object.defineProperty(V2010.prototype,"queues",{get:function(){return this.account.queues}});Object.defineProperty(V2010.prototype,"recordings",{get:function(){return this.account.recordings}});Object.defineProperty(V2010.prototype,"signingKeys",{get:function(){return this.account.signingKeys}});Object.defineProperty(V2010.prototype,"sip",{get:function(){return this.account.sip}});Object.defineProperty(V2010.prototype,"shortCodes",{get:function(){return this.account.shortCodes}});Object.defineProperty(V2010.prototype,"tokens",{get:function(){return this.account.tokens}});Object.defineProperty(V2010.prototype,"transcriptions",{get:function(){return this.account.transcriptions}});Object.defineProperty(V2010.prototype,"usage",{get:function(){return this.account.usage}});Object.defineProperty(V2010.prototype,"validationRequests",{get:function(){return this.account.validationRequests}});t.exports=V2010},72241:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(79442).AddressList;var c=i(49982).ApplicationList;var a=i(30361).AuthorizedConnectAppList;var u=i(8883).AvailablePhoneNumberCountryList;var h=i(54086).BalanceList;var f=i(1606).CallList;var p=i(41322).ConferenceList;var d=i(48104).ConnectAppList;var l=i(73350).IncomingPhoneNumberList;var v=i(36378).KeyList;var m=i(76433).MessageList;var _=i(52411).NewKeyList;var g=i(63159).NewSigningKeyList;var y=i(47066).NotificationList;var S=i(34642).OutgoingCallerIdList;var b=i(60938);var w=i(95601).QueueList;var L=i(28672).RecordingList;var I=i(72435).ShortCodeList;var O=i(40489).SigningKeyList;var N=i(93613).SipList;var x=i(87639).TokenList;var C=i(84673).TranscriptionList;var P=i(22812).UsageList;var k=i(86218).ValidationRequestList;var F=i(80513);var T=i(72142);var J;var E;var j;var U;J=function AccountList(t){function AccountListInstance(t){return AccountListInstance.get(t)}AccountListInstance._version=t;AccountListInstance._solution={};AccountListInstance._uri=`/Accounts.json`;AccountListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=T.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new j(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AccountListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AccountListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AccountListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=T.of({FriendlyName:o.get(t,"friendlyName"),Status:o.get(t,"status"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new E(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AccountListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new E(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AccountListInstance.get=function get(t){return new U(this._version,t)};AccountListInstance.toJSON=function toJSON(){return this._solution};AccountListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AccountListInstance};E=function AccountPage(t,e,i){this._solution=i;b.prototype.constructor.call(this,t,e,this._solution)};o.extend(E.prototype,b.prototype);E.prototype.constructor=E;E.prototype.getInstance=function getInstance(t){return new j(this._version,t)};E.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};E.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};j=function AccountInstance(t,e,i){this._version=t;this.authToken=e.auth_token;this.dateCreated=F.rfc2822DateTime(e.date_created);this.dateUpdated=F.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.ownerAccountSid=e.owner_account_sid;this.sid=e.sid;this.status=e.status;this.subresourceUris=e.subresource_uris;this.type=e.type;this.uri=e.uri;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(j.prototype,"_proxy",{get:function(){if(!this._context){this._context=new U(this._version,this._solution.sid)}return this._context}});j.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};j.prototype.update=function update(t,e){return this._proxy.update(t,e)};j.prototype.addresses=function addresses(){return this._proxy.addresses};j.prototype.applications=function applications(){return this._proxy.applications};j.prototype.authorizedConnectApps=function authorizedConnectApps(){return this._proxy.authorizedConnectApps};j.prototype.availablePhoneNumbers=function availablePhoneNumbers(){return this._proxy.availablePhoneNumbers};j.prototype.balance=function balance(){return this._proxy.balance};j.prototype.calls=function calls(){return this._proxy.calls};j.prototype.conferences=function conferences(){return this._proxy.conferences};j.prototype.connectApps=function connectApps(){return this._proxy.connectApps};j.prototype.incomingPhoneNumbers=function incomingPhoneNumbers(){return this._proxy.incomingPhoneNumbers};j.prototype.keys=function keys(){return this._proxy.keys};j.prototype.messages=function messages(){return this._proxy.messages};j.prototype.newKeys=function newKeys(){return this._proxy.newKeys};j.prototype.newSigningKeys=function newSigningKeys(){return this._proxy.newSigningKeys};j.prototype.notifications=function notifications(){return this._proxy.notifications};j.prototype.outgoingCallerIds=function outgoingCallerIds(){return this._proxy.outgoingCallerIds};j.prototype.queues=function queues(){return this._proxy.queues};j.prototype.recordings=function recordings(){return this._proxy.recordings};j.prototype.signingKeys=function signingKeys(){return this._proxy.signingKeys};j.prototype.sip=function sip(){return this._proxy.sip};j.prototype.shortCodes=function shortCodes(){return this._proxy.shortCodes};j.prototype.tokens=function tokens(){return this._proxy.tokens};j.prototype.transcriptions=function transcriptions(){return this._proxy.transcriptions};j.prototype.usage=function usage(){return this._proxy.usage};j.prototype.validationRequests=function validationRequests(){return this._proxy.validationRequests};j.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};j.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};U=function AccountContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Accounts/${e}.json`;this._addresses=undefined;this._applications=undefined;this._authorizedConnectApps=undefined;this._availablePhoneNumbers=undefined;this._balance=undefined;this._calls=undefined;this._conferences=undefined;this._connectApps=undefined;this._incomingPhoneNumbers=undefined;this._keys=undefined;this._messages=undefined;this._newKeys=undefined;this._newSigningKeys=undefined;this._notifications=undefined;this._outgoingCallerIds=undefined;this._queues=undefined;this._recordings=undefined;this._signingKeys=undefined;this._sip=undefined;this._shortCodes=undefined;this._tokens=undefined;this._transcriptions=undefined;this._usage=undefined;this._validationRequests=undefined};U.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new j(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};U.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=T.of({FriendlyName:o.get(t,"friendlyName"),Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new j(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(U.prototype,"addresses",{get:function(){if(!this._addresses){this._addresses=new r(this._version,this._solution.sid)}return this._addresses}});Object.defineProperty(U.prototype,"applications",{get:function(){if(!this._applications){this._applications=new c(this._version,this._solution.sid)}return this._applications}});Object.defineProperty(U.prototype,"authorizedConnectApps",{get:function(){if(!this._authorizedConnectApps){this._authorizedConnectApps=new a(this._version,this._solution.sid)}return this._authorizedConnectApps}});Object.defineProperty(U.prototype,"availablePhoneNumbers",{get:function(){if(!this._availablePhoneNumbers){this._availablePhoneNumbers=new u(this._version,this._solution.sid)}return this._availablePhoneNumbers}});Object.defineProperty(U.prototype,"balance",{get:function(){if(!this._balance){this._balance=new h(this._version,this._solution.sid)}return this._balance}});Object.defineProperty(U.prototype,"calls",{get:function(){if(!this._calls){this._calls=new f(this._version,this._solution.sid)}return this._calls}});Object.defineProperty(U.prototype,"conferences",{get:function(){if(!this._conferences){this._conferences=new p(this._version,this._solution.sid)}return this._conferences}});Object.defineProperty(U.prototype,"connectApps",{get:function(){if(!this._connectApps){this._connectApps=new d(this._version,this._solution.sid)}return this._connectApps}});Object.defineProperty(U.prototype,"incomingPhoneNumbers",{get:function(){if(!this._incomingPhoneNumbers){this._incomingPhoneNumbers=new l(this._version,this._solution.sid)}return this._incomingPhoneNumbers}});Object.defineProperty(U.prototype,"keys",{get:function(){if(!this._keys){this._keys=new v(this._version,this._solution.sid)}return this._keys}});Object.defineProperty(U.prototype,"messages",{get:function(){if(!this._messages){this._messages=new m(this._version,this._solution.sid)}return this._messages}});Object.defineProperty(U.prototype,"newKeys",{get:function(){if(!this._newKeys){this._newKeys=new _(this._version,this._solution.sid)}return this._newKeys}});Object.defineProperty(U.prototype,"newSigningKeys",{get:function(){if(!this._newSigningKeys){this._newSigningKeys=new g(this._version,this._solution.sid)}return this._newSigningKeys}});Object.defineProperty(U.prototype,"notifications",{get:function(){if(!this._notifications){this._notifications=new y(this._version,this._solution.sid)}return this._notifications}});Object.defineProperty(U.prototype,"outgoingCallerIds",{get:function(){if(!this._outgoingCallerIds){this._outgoingCallerIds=new S(this._version,this._solution.sid)}return this._outgoingCallerIds}});Object.defineProperty(U.prototype,"queues",{get:function(){if(!this._queues){this._queues=new w(this._version,this._solution.sid)}return this._queues}});Object.defineProperty(U.prototype,"recordings",{get:function(){if(!this._recordings){this._recordings=new L(this._version,this._solution.sid)}return this._recordings}});Object.defineProperty(U.prototype,"signingKeys",{get:function(){if(!this._signingKeys){this._signingKeys=new O(this._version,this._solution.sid)}return this._signingKeys}});Object.defineProperty(U.prototype,"sip",{get:function(){if(!this._sip){this._sip=new N(this._version,this._solution.sid)}return this._sip}});Object.defineProperty(U.prototype,"shortCodes",{get:function(){if(!this._shortCodes){this._shortCodes=new I(this._version,this._solution.sid)}return this._shortCodes}});Object.defineProperty(U.prototype,"tokens",{get:function(){if(!this._tokens){this._tokens=new x(this._version,this._solution.sid)}return this._tokens}});Object.defineProperty(U.prototype,"transcriptions",{get:function(){if(!this._transcriptions){this._transcriptions=new C(this._version,this._solution.sid)}return this._transcriptions}});Object.defineProperty(U.prototype,"usage",{get:function(){if(!this._usage){this._usage=new P(this._version,this._solution.sid)}return this._usage}});Object.defineProperty(U.prototype,"validationRequests",{get:function(){if(!this._validationRequests){this._validationRequests=new k(this._version,this._solution.sid)}return this._validationRequests}});U.prototype.toJSON=function toJSON(){return this._solution};U.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AccountList:J,AccountPage:E,AccountInstance:j,AccountContext:U}},79442:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(42385).DependentPhoneNumberList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function AddressList(t,e){function AddressListInstance(t){return AddressListInstance.get(t)}AddressListInstance._version=t;AddressListInstance._solution={accountSid:e};AddressListInstance._uri=`/Accounts/${e}/Addresses.json`;AddressListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.customerName)){throw new Error('Required parameter "opts.customerName" missing.')}if(o.isUndefined(t.street)){throw new Error('Required parameter "opts.street" missing.')}if(o.isUndefined(t.city)){throw new Error('Required parameter "opts.city" missing.')}if(o.isUndefined(t.region)){throw new Error('Required parameter "opts.region" missing.')}if(o.isUndefined(t.postalCode)){throw new Error('Required parameter "opts.postalCode" missing.')}if(o.isUndefined(t.isoCountry)){throw new Error('Required parameter "opts.isoCountry" missing.')}var i=n.defer();var s=h.of({CustomerName:o.get(t,"customerName"),Street:o.get(t,"street"),City:o.get(t,"city"),Region:o.get(t,"region"),PostalCode:o.get(t,"postalCode"),IsoCountry:o.get(t,"isoCountry"),FriendlyName:o.get(t,"friendlyName"),EmergencyEnabled:u.bool(o.get(t,"emergencyEnabled")),AutoCorrectAddress:u.bool(o.get(t,"autoCorrectAddress"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AddressListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AddressListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AddressListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({CustomerName:o.get(t,"customerName"),FriendlyName:o.get(t,"friendlyName"),IsoCountry:o.get(t,"isoCountry"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AddressListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AddressListInstance.get=function get(t){return new l(this._version,this._solution.accountSid,t)};AddressListInstance.toJSON=function toJSON(){return this._solution};AddressListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AddressListInstance};p=function AddressPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.accountSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AddressInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.city=e.city;this.customerName=e.customer_name;this.dateCreated=a.rfc2822DateTime(e.date_created);this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.isoCountry=e.iso_country;this.postalCode=e.postal_code;this.region=e.region;this.sid=e.sid;this.street=e.street;this.uri=e.uri;this.emergencyEnabled=e.emergency_enabled;this.validated=e.validated;this.verified=e.verified;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.dependentPhoneNumbers=function dependentPhoneNumbers(){return this._proxy.dependentPhoneNumbers};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function AddressContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Addresses/${i}.json`;this._dependentPhoneNumbers=undefined};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({FriendlyName:o.get(t,"friendlyName"),CustomerName:o.get(t,"customerName"),Street:o.get(t,"street"),City:o.get(t,"city"),Region:o.get(t,"region"),PostalCode:o.get(t,"postalCode"),EmergencyEnabled:u.bool(o.get(t,"emergencyEnabled")),AutoCorrectAddress:u.bool(o.get(t,"autoCorrectAddress"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"dependentPhoneNumbers",{get:function(){if(!this._dependentPhoneNumbers){this._dependentPhoneNumbers=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._dependentPhoneNumbers}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AddressList:f,AddressPage:p,AddressInstance:d,AddressContext:l}},42385:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function DependentPhoneNumberList(t,e,i){function DependentPhoneNumberListInstance(t){return DependentPhoneNumberListInstance.get(t)}DependentPhoneNumberListInstance._version=t;DependentPhoneNumberListInstance._solution={accountSid:e,addressSid:i};DependentPhoneNumberListInstance._uri=`/Accounts/${e}/Addresses/${i}/DependentPhoneNumbers.json`;DependentPhoneNumberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DependentPhoneNumberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DependentPhoneNumberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DependentPhoneNumberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DependentPhoneNumberListInstance.toJSON=function toJSON(){return this._solution};DependentPhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DependentPhoneNumberListInstance};h=function DependentPhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.addressSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DependentPhoneNumberInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.voiceUrl=e.voice_url;this.voiceMethod=e.voice_method;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.addressRequirements=e.address_requirements;this.capabilities=e.capabilities;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.apiVersion=e.api_version;this.smsApplicationSid=e.sms_application_sid;this.voiceApplicationSid=e.voice_application_sid;this.trunkSid=e.trunk_sid;this.emergencyStatus=e.emergency_status;this.emergencyAddressSid=e.emergency_address_sid;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,addressSid:n}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DependentPhoneNumberList:u,DependentPhoneNumberPage:h,DependentPhoneNumberInstance:f}},49982:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ApplicationList(t,e){function ApplicationListInstance(t){return ApplicationListInstance.get(t)}ApplicationListInstance._version=t;ApplicationListInstance._solution={accountSid:e};ApplicationListInstance._uri=`/Accounts/${e}/Applications.json`;ApplicationListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ApiVersion:o.get(t,"apiVersion"),VoiceUrl:o.get(t,"voiceUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceCallerIdLookup:a.bool(o.get(t,"voiceCallerIdLookup")),SmsUrl:o.get(t,"smsUrl"),SmsMethod:o.get(t,"smsMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsStatusCallback:o.get(t,"smsStatusCallback"),MessageStatusCallback:o.get(t,"messageStatusCallback"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ApplicationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ApplicationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ApplicationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ApplicationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ApplicationListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};ApplicationListInstance.toJSON=function toJSON(){return this._solution};ApplicationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ApplicationListInstance};f=function ApplicationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ApplicationInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.messageStatusCallback=e.message_status_callback;this.sid=e.sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsStatusCallback=e.sms_status_callback;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.uri=e.uri;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ApplicationContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Applications/${i}.json`};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),ApiVersion:o.get(t,"apiVersion"),VoiceUrl:o.get(t,"voiceUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceCallerIdLookup:a.bool(o.get(t,"voiceCallerIdLookup")),SmsUrl:o.get(t,"smsUrl"),SmsMethod:o.get(t,"smsMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsStatusCallback:o.get(t,"smsStatusCallback"),MessageStatusCallback:o.get(t,"messageStatusCallback")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ApplicationList:h,ApplicationPage:f,ApplicationInstance:p,ApplicationContext:d}},30361:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AuthorizedConnectAppList(t,e){function AuthorizedConnectAppListInstance(t){return AuthorizedConnectAppListInstance.get(t)}AuthorizedConnectAppListInstance._version=t;AuthorizedConnectAppListInstance._solution={accountSid:e};AuthorizedConnectAppListInstance._uri=`/Accounts/${e}/AuthorizedConnectApps.json`;AuthorizedConnectAppListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AuthorizedConnectAppListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AuthorizedConnectAppListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthorizedConnectAppListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthorizedConnectAppListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};AuthorizedConnectAppListInstance.toJSON=function toJSON(){return this._solution};AuthorizedConnectAppListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthorizedConnectAppListInstance};h=function AuthorizedConnectAppPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AuthorizedConnectAppInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.connectAppCompanyName=e.connect_app_company_name;this.connectAppDescription=e.connect_app_description;this.connectAppFriendlyName=e.connect_app_friendly_name;this.connectAppHomepageUrl=e.connect_app_homepage_url;this.connectAppSid=e.connect_app_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.permissions=e.permissions;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,connectAppSid:n||this.connectAppSid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.connectAppSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AuthorizedConnectAppContext(t,e,i){this._version=t;this._solution={accountSid:e,connectAppSid:i};this._uri=`/Accounts/${e}/AuthorizedConnectApps/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.connectAppSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthorizedConnectAppList:u,AuthorizedConnectAppPage:h,AuthorizedConnectAppInstance:f,AuthorizedConnectAppContext:p}},8883:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(16077).LocalList;var c=i(90884).MachineToMachineList;var a=i(5309).MobileList;var u=i(49122).NationalList;var h=i(60938);var f=i(4772).SharedCostList;var p=i(66499).TollFreeList;var d=i(29353).VoipList;var l=i(72142);var v;var m;var _;var g;v=function AvailablePhoneNumberCountryList(t,e){function AvailablePhoneNumberCountryListInstance(t){return AvailablePhoneNumberCountryListInstance.get(t)}AvailablePhoneNumberCountryListInstance._version=t;AvailablePhoneNumberCountryListInstance._solution={accountSid:e};AvailablePhoneNumberCountryListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers.json`;AvailablePhoneNumberCountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AvailablePhoneNumberCountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AvailablePhoneNumberCountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=l.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailablePhoneNumberCountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new m(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailablePhoneNumberCountryListInstance.get=function get(t){return new g(this._version,this._solution.accountSid,t)};AvailablePhoneNumberCountryListInstance.toJSON=function toJSON(){return this._solution};AvailablePhoneNumberCountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AvailablePhoneNumberCountryListInstance};m=function AvailablePhoneNumberCountryPage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(m.prototype,h.prototype);m.prototype.constructor=m;m.prototype.getInstance=function getInstance(t){return new _(this._version,t,this._solution.accountSid)};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function AvailablePhoneNumberCountryInstance(t,e,i,n){this._version=t;this.countryCode=e.country_code;this.country=e.country;this.uri=e.uri;this.beta=e.beta;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,countryCode:n||this.countryCode}};Object.defineProperty(_.prototype,"_proxy",{get:function(){if(!this._context){this._context=new g(this._version,this._solution.accountSid,this._solution.countryCode)}return this._context}});_.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};_.prototype.local=function local(){return this._proxy.local};_.prototype.tollFree=function tollFree(){return this._proxy.tollFree};_.prototype.mobile=function mobile(){return this._proxy.mobile};_.prototype.national=function national(){return this._proxy.national};_.prototype.voip=function voip(){return this._proxy.voip};_.prototype.sharedCost=function sharedCost(){return this._proxy.sharedCost};_.prototype.machineToMachine=function machineToMachine(){return this._proxy.machineToMachine};_.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};g=function AvailablePhoneNumberCountryContext(t,e,i){this._version=t;this._solution={accountSid:e,countryCode:i};this._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}.json`;this._local=undefined;this._tollFree=undefined;this._mobile=undefined;this._national=undefined;this._voip=undefined;this._sharedCost=undefined;this._machineToMachine=undefined};g.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new _(this._version,t,this._solution.accountSid,this._solution.countryCode))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(g.prototype,"local",{get:function(){if(!this._local){this._local=new r(this._version,this._solution.accountSid,this._solution.countryCode)}return this._local}});Object.defineProperty(g.prototype,"tollFree",{get:function(){if(!this._tollFree){this._tollFree=new p(this._version,this._solution.accountSid,this._solution.countryCode)}return this._tollFree}});Object.defineProperty(g.prototype,"mobile",{get:function(){if(!this._mobile){this._mobile=new a(this._version,this._solution.accountSid,this._solution.countryCode)}return this._mobile}});Object.defineProperty(g.prototype,"national",{get:function(){if(!this._national){this._national=new u(this._version,this._solution.accountSid,this._solution.countryCode)}return this._national}});Object.defineProperty(g.prototype,"voip",{get:function(){if(!this._voip){this._voip=new d(this._version,this._solution.accountSid,this._solution.countryCode)}return this._voip}});Object.defineProperty(g.prototype,"sharedCost",{get:function(){if(!this._sharedCost){this._sharedCost=new f(this._version,this._solution.accountSid,this._solution.countryCode)}return this._sharedCost}});Object.defineProperty(g.prototype,"machineToMachine",{get:function(){if(!this._machineToMachine){this._machineToMachine=new c(this._version,this._solution.accountSid,this._solution.countryCode)}return this._machineToMachine}});g.prototype.toJSON=function toJSON(){return this._solution};g.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AvailablePhoneNumberCountryList:v,AvailablePhoneNumberCountryPage:m,AvailablePhoneNumberCountryInstance:_,AvailablePhoneNumberCountryContext:g}},16077:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function LocalList(t,e,i){function LocalListInstance(t){return LocalListInstance.get(t)}LocalListInstance._version=t;LocalListInstance._solution={accountSid:e,countryCode:i};LocalListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/Local.json`;LocalListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};LocalListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};LocalListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LocalListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LocalListInstance.toJSON=function toJSON(){return this._solution};LocalListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return LocalListInstance};f=function LocalPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function LocalInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={LocalList:h,LocalPage:f,LocalInstance:p}},90884:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function MachineToMachineList(t,e,i){function MachineToMachineListInstance(t){return MachineToMachineListInstance.get(t)}MachineToMachineListInstance._version=t;MachineToMachineListInstance._solution={accountSid:e,countryCode:i};MachineToMachineListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/MachineToMachine.json`;MachineToMachineListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MachineToMachineListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MachineToMachineListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MachineToMachineListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MachineToMachineListInstance.toJSON=function toJSON(){return this._solution};MachineToMachineListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MachineToMachineListInstance};f=function MachineToMachinePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MachineToMachineInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MachineToMachineList:h,MachineToMachinePage:f,MachineToMachineInstance:p}},5309:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function MobileList(t,e,i){function MobileListInstance(t){return MobileListInstance.get(t)}MobileListInstance._version=t;MobileListInstance._solution={accountSid:e,countryCode:i};MobileListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/Mobile.json`;MobileListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MobileListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MobileListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MobileListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MobileListInstance.toJSON=function toJSON(){return this._solution};MobileListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MobileListInstance};f=function MobilePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MobileInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MobileList:h,MobilePage:f,MobileInstance:p}},49122:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function NationalList(t,e,i){function NationalListInstance(t){return NationalListInstance.get(t)}NationalListInstance._version=t;NationalListInstance._solution={accountSid:e,countryCode:i};NationalListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/National.json`;NationalListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NationalListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NationalListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NationalListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NationalListInstance.toJSON=function toJSON(){return this._solution};NationalListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NationalListInstance};f=function NationalPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function NationalInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NationalList:h,NationalPage:f,NationalInstance:p}},4772:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function SharedCostList(t,e,i){function SharedCostListInstance(t){return SharedCostListInstance.get(t)}SharedCostListInstance._version=t;SharedCostListInstance._solution={accountSid:e,countryCode:i};SharedCostListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/SharedCost.json`;SharedCostListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SharedCostListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SharedCostListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SharedCostListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SharedCostListInstance.toJSON=function toJSON(){return this._solution};SharedCostListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SharedCostListInstance};f=function SharedCostPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SharedCostInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SharedCostList:h,SharedCostPage:f,SharedCostInstance:p}},66499:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function TollFreeList(t,e,i){function TollFreeListInstance(t){return TollFreeListInstance.get(t)}TollFreeListInstance._version=t;TollFreeListInstance._solution={accountSid:e,countryCode:i};TollFreeListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/TollFree.json`;TollFreeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TollFreeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TollFreeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TollFreeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TollFreeListInstance.toJSON=function toJSON(){return this._solution};TollFreeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TollFreeListInstance};f=function TollFreePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TollFreeInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TollFreeList:h,TollFreePage:f,TollFreeInstance:p}},29353:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function VoipList(t,e,i){function VoipListInstance(t){return VoipListInstance.get(t)}VoipListInstance._version=t;VoipListInstance._solution={accountSid:e,countryCode:i};VoipListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/Voip.json`;VoipListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};VoipListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};VoipListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VoipListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VoipListInstance.toJSON=function toJSON(){return this._solution};VoipListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return VoipListInstance};f=function VoipPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function VoipInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={VoipList:h,VoipPage:f,VoipInstance:p}},54086:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function BalanceList(t,e){function BalanceListInstance(t){return BalanceListInstance.get(t)}BalanceListInstance._version=t;BalanceListInstance._solution={accountSid:e};BalanceListInstance._uri=`/Accounts/${e}/Balance.json`;BalanceListInstance.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.accountSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};BalanceListInstance.toJSON=function toJSON(){return this._solution};BalanceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BalanceListInstance};u=function BalancePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.accountSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function BalanceInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.balance=e.balance;this.currency=e.currency;this._context=undefined;this._solution={accountSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BalanceList:a,BalancePage:u,BalanceInstance:h}},1606:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(74502).EventList;var c=i(49781).FeedbackList;var a=i(27616).FeedbackSummaryList;var u=i(62974).NotificationList;var h=i(60938);var f=i(47427).PaymentList;var p=i(40728).RecordingList;var d=i(80513);var l=i(6372);var v=i(72142);var m;var _;var g;var y;m=function CallList(t,e){function CallListInstance(t){return CallListInstance.get(t)}CallListInstance._version=t;CallListInstance._solution={accountSid:e};CallListInstance._uri=`/Accounts/${e}/Calls.json`;CallListInstance._feedbackSummaries=undefined;CallListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.from)){throw new Error('Required parameter "opts.from" missing.')}var i=n.defer();var s=v.of({To:o.get(t,"to"),From:o.get(t,"from"),Url:o.get(t,"url"),Twiml:o.get(t,"twiml"),ApplicationSid:o.get(t,"applicationSid"),Method:o.get(t,"method"),FallbackUrl:o.get(t,"fallbackUrl"),FallbackMethod:o.get(t,"fallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackEvent:l.map(o.get(t,"statusCallbackEvent"),function(t){return t}),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),SendDigits:o.get(t,"sendDigits"),Timeout:o.get(t,"timeout"),Record:l.bool(o.get(t,"record")),RecordingChannels:o.get(t,"recordingChannels"),RecordingStatusCallback:o.get(t,"recordingStatusCallback"),RecordingStatusCallbackMethod:o.get(t,"recordingStatusCallbackMethod"),SipAuthUsername:o.get(t,"sipAuthUsername"),SipAuthPassword:o.get(t,"sipAuthPassword"),MachineDetection:o.get(t,"machineDetection"),MachineDetectionTimeout:o.get(t,"machineDetectionTimeout"),RecordingStatusCallbackEvent:l.map(o.get(t,"recordingStatusCallbackEvent"),function(t){return t}),Trim:o.get(t,"trim"),CallerId:o.get(t,"callerId"),MachineDetectionSpeechThreshold:o.get(t,"machineDetectionSpeechThreshold"),MachineDetectionSpeechEndThreshold:o.get(t,"machineDetectionSpeechEndThreshold"),MachineDetectionSilenceTimeout:o.get(t,"machineDetectionSilenceTimeout"),AsyncAmd:o.get(t,"asyncAmd"),AsyncAmdStatusCallback:o.get(t,"asyncAmdStatusCallback"),AsyncAmdStatusCallbackMethod:o.get(t,"asyncAmdStatusCallbackMethod"),Byoc:o.get(t,"byoc"),CallReason:o.get(t,"callReason"),RecordingTrack:o.get(t,"recordingTrack")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new g(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CallListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CallListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CallListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=v.of({To:o.get(t,"to"),From:o.get(t,"from"),ParentCallSid:o.get(t,"parentCallSid"),Status:o.get(t,"status"),"StartTime<":l.iso8601DateTime(o.get(t,"startTimeBefore")),StartTime:l.iso8601DateTime(o.get(t,"startTime")),"StartTime>":l.iso8601DateTime(o.get(t,"startTimeAfter")),"EndTime<":l.iso8601DateTime(o.get(t,"endTimeBefore")),EndTime:l.iso8601DateTime(o.get(t,"endTime")),"EndTime>":l.iso8601DateTime(o.get(t,"endTimeAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new _(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CallListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new _(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CallListInstance.get=function get(t){return new y(this._version,this._solution.accountSid,t)};Object.defineProperty(CallListInstance,"feedbackSummaries",{get:function feedbackSummaries(){if(!this._feedbackSummaries){this._feedbackSummaries=new a(this._version,this._solution.accountSid)}return this._feedbackSummaries}});CallListInstance.toJSON=function toJSON(){return this._solution};CallListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CallListInstance};_=function CallPage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(_.prototype,h.prototype);_.prototype.constructor=_;_.prototype.getInstance=function getInstance(t){return new g(this._version,t,this._solution.accountSid)};_.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};g=function CallInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.dateCreated=d.rfc2822DateTime(e.date_created);this.dateUpdated=d.rfc2822DateTime(e.date_updated);this.parentCallSid=e.parent_call_sid;this.accountSid=e.account_sid;this.to=e.to;this.toFormatted=e.to_formatted;this.from=e.from;this.fromFormatted=e.from_formatted;this.phoneNumberSid=e.phone_number_sid;this.status=e.status;this.startTime=d.rfc2822DateTime(e.start_time);this.endTime=d.rfc2822DateTime(e.end_time);this.duration=e.duration;this.price=e.price;this.priceUnit=e.price_unit;this.direction=e.direction;this.answeredBy=e.answered_by;this.annotation=e.annotation;this.apiVersion=e.api_version;this.forwardedFrom=e.forwarded_from;this.groupSid=e.group_sid;this.callerName=e.caller_name;this.queueTime=e.queue_time;this.trunkSid=e.trunk_sid;this.uri=e.uri;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(g.prototype,"_proxy",{get:function(){if(!this._context){this._context=new y(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});g.prototype.remove=function remove(t){return this._proxy.remove(t)};g.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};g.prototype.update=function update(t,e){return this._proxy.update(t,e)};g.prototype.recordings=function recordings(){return this._proxy.recordings};g.prototype.notifications=function notifications(){return this._proxy.notifications};g.prototype.feedback=function feedback(){return this._proxy.feedback};g.prototype.events=function events(){return this._proxy.events};g.prototype.payments=function payments(){return this._proxy.payments};g.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};g.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};y=function CallContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Calls/${i}.json`;this._recordings=undefined;this._notifications=undefined;this._feedback=undefined;this._events=undefined;this._payments=undefined};y.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};y.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new g(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};y.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=v.of({Url:o.get(t,"url"),Method:o.get(t,"method"),Status:o.get(t,"status"),FallbackUrl:o.get(t,"fallbackUrl"),FallbackMethod:o.get(t,"fallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),Twiml:o.get(t,"twiml")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new g(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(y.prototype,"recordings",{get:function(){if(!this._recordings){this._recordings=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._recordings}});Object.defineProperty(y.prototype,"notifications",{get:function(){if(!this._notifications){this._notifications=new u(this._version,this._solution.accountSid,this._solution.sid)}return this._notifications}});Object.defineProperty(y.prototype,"feedback",{get:function(){if(!this._feedback){this._feedback=new c(this._version,this._solution.accountSid,this._solution.sid)}return this._feedback}});Object.defineProperty(y.prototype,"events",{get:function(){if(!this._events){this._events=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._events}});Object.defineProperty(y.prototype,"payments",{get:function(){if(!this._payments){this._payments=new f(this._version,this._solution.accountSid,this._solution.sid)}return this._payments}});y.prototype.toJSON=function toJSON(){return this._solution};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CallList:m,CallPage:_,CallInstance:g,CallContext:y}},74502:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function EventList(t,e,i){function EventListInstance(t){return EventListInstance.get(t)}EventListInstance._version=t;EventListInstance._solution={accountSid:e,callSid:i};EventListInstance._uri=`/Accounts/${e}/Calls/${i}/Events.json`;EventListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EventListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EventListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.toJSON=function toJSON(){return this._solution};EventListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EventListInstance};u=function EventPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.accountSid,this._solution.callSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function EventInstance(t,e,i,n){this._version=t;this.request=e.request;this.response=e.response;this._context=undefined;this._solution={accountSid:i,callSid:n}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EventList:a,EventPage:u,EventInstance:h}},49781:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function FeedbackList(t,e,i){function FeedbackListInstance(t){return FeedbackListInstance.get(t)}FeedbackListInstance._version=t;FeedbackListInstance._solution={accountSid:e,callSid:i};FeedbackListInstance.get=function get(){return new d(this._version,this._solution.accountSid,this._solution.callSid)};FeedbackListInstance.toJSON=function toJSON(){return this._solution};FeedbackListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FeedbackListInstance};f=function FeedbackPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.callSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FeedbackInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.issues=e.issues;this.qualityScore=c.integer(e.quality_score);this.sid=e.sid;this._context=undefined;this._solution={accountSid:i,callSid:n}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.callSid)}return this._context}});p.prototype.create=function create(t,e){return this._proxy.create(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FeedbackContext(t,e,i){this._version=t;this._solution={accountSid:e,callSid:i};this._uri=`/Accounts/${e}/Calls/${i}/Feedback.json`};d.prototype.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.qualityScore)){throw new Error('Required parameter "opts.qualityScore" missing.')}var i=n.defer();var s=u.of({QualityScore:o.get(t,"qualityScore"),Issue:a.map(o.get(t,"issue"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.qualityScore)){throw new Error('Required parameter "opts.qualityScore" missing.')}var i=n.defer();var s=u.of({QualityScore:o.get(t,"qualityScore"),Issue:a.map(o.get(t,"issue"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FeedbackList:h,FeedbackPage:f,FeedbackInstance:p,FeedbackContext:d}},27616:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function FeedbackSummaryList(t,e){function FeedbackSummaryListInstance(t){return FeedbackSummaryListInstance.get(t)}FeedbackSummaryListInstance._version=t;FeedbackSummaryListInstance._solution={accountSid:e};FeedbackSummaryListInstance._uri=`/Accounts/${e}/Calls/FeedbackSummary.json`;FeedbackSummaryListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.startDate)){throw new Error('Required parameter "opts.startDate" missing.')}if(o.isUndefined(t.endDate)){throw new Error('Required parameter "opts.endDate" missing.')}var i=n.defer();var s=u.of({StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FeedbackSummaryListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};FeedbackSummaryListInstance.toJSON=function toJSON(){return this._solution};FeedbackSummaryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FeedbackSummaryListInstance};f=function FeedbackSummaryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FeedbackSummaryInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.callCount=c.integer(e.call_count);this.callFeedbackCount=c.integer(e.call_feedback_count);this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.endDate=c.iso8601DateTime(e.end_date);this.includeSubaccounts=e.include_subaccounts;this.issues=e.issues;this.qualityScoreAverage=c.decimal(e.quality_score_average);this.qualityScoreMedian=c.decimal(e.quality_score_median);this.qualityScoreStandardDeviation=c.decimal(e.quality_score_standard_deviation);this.sid=e.sid;this.startDate=c.iso8601DateTime(e.start_date);this.status=e.status;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FeedbackSummaryContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Calls/FeedbackSummary/${i}.json`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FeedbackSummaryList:h,FeedbackSummaryPage:f,FeedbackSummaryInstance:p,FeedbackSummaryContext:d}},62974:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function NotificationList(t,e,i){function NotificationListInstance(t){return NotificationListInstance.get(t)}NotificationListInstance._version=t;NotificationListInstance._solution={accountSid:e,callSid:i};NotificationListInstance._uri=`/Accounts/${e}/Calls/${i}/Notifications.json`;NotificationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NotificationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NotificationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Log:o.get(t,"log"),"MessageDate<":a.iso8601Date(o.get(t,"messageDateBefore")),MessageDate:a.iso8601Date(o.get(t,"messageDate")),"MessageDate>":a.iso8601Date(o.get(t,"messageDateAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NotificationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NotificationListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.callSid,t)};NotificationListInstance.toJSON=function toJSON(){return this._solution};NotificationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NotificationListInstance};f=function NotificationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.callSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function NotificationInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callSid=e.call_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.errorCode=e.error_code;this.log=e.log;this.messageDate=c.rfc2822DateTime(e.message_date);this.messageText=e.message_text;this.moreInfo=e.more_info;this.requestMethod=e.request_method;this.requestUrl=e.request_url;this.requestVariables=e.request_variables;this.responseBody=e.response_body;this.responseHeaders=e.response_headers;this.sid=e.sid;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,callSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.callSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function NotificationContext(t,e,i,n){this._version=t;this._solution={accountSid:e,callSid:i,sid:n};this._uri=`/Accounts/${e}/Calls/${i}/Notifications/${n}.json`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NotificationList:h,NotificationPage:f,NotificationInstance:p,NotificationContext:d}},47427:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function PaymentList(t,e,i){function PaymentListInstance(t){return PaymentListInstance.get(t)}PaymentListInstance._version=t;PaymentListInstance._solution={accountSid:e,callSid:i};PaymentListInstance._uri=`/Accounts/${e}/Calls/${i}/Payments.json`;PaymentListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.idempotencyKey)){throw new Error('Required parameter "opts.idempotencyKey" missing.')}if(o.isUndefined(t.statusCallback)){throw new Error('Required parameter "opts.statusCallback" missing.')}var i=n.defer();var s=u.of({IdempotencyKey:o.get(t,"idempotencyKey"),StatusCallback:o.get(t,"statusCallback"),BankAccountType:o.get(t,"bankAccountType"),ChargeAmount:o.get(t,"chargeAmount"),Currency:o.get(t,"currency"),Description:o.get(t,"description"),Input:o.get(t,"input"),MinPostalCodeLength:o.get(t,"minPostalCodeLength"),Parameter:a.object(o.get(t,"parameter")),PaymentConnector:o.get(t,"paymentConnector"),PaymentMethod:o.get(t,"paymentMethod"),PostalCode:a.bool(o.get(t,"postalCode")),SecurityCode:a.bool(o.get(t,"securityCode")),Timeout:o.get(t,"timeout"),TokenType:o.get(t,"tokenType"),ValidCardTypes:o.get(t,"validCardTypes")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PaymentListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.callSid,t)};PaymentListInstance.toJSON=function toJSON(){return this._solution};PaymentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PaymentListInstance};f=function PaymentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.callSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PaymentInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.callSid=e.call_sid;this.sid=e.sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,callSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.callSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function PaymentContext(t,e,i,n){this._version=t;this._solution={accountSid:e,callSid:i,sid:n};this._uri=`/Accounts/${e}/Calls/${i}/Payments/${n}.json`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.idempotencyKey)){throw new Error('Required parameter "opts.idempotencyKey" missing.')}if(o.isUndefined(t.statusCallback)){throw new Error('Required parameter "opts.statusCallback" missing.')}var i=n.defer();var s=u.of({IdempotencyKey:o.get(t,"idempotencyKey"),StatusCallback:o.get(t,"statusCallback"),Capture:o.get(t,"capture"),Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PaymentList:h,PaymentPage:f,PaymentInstance:p,PaymentContext:d}},40728:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RecordingList(t,e,i){function RecordingListInstance(t){return RecordingListInstance.get(t)}RecordingListInstance._version=t;RecordingListInstance._solution={accountSid:e,callSid:i};RecordingListInstance._uri=`/Accounts/${e}/Calls/${i}/Recordings.json`;RecordingListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RecordingStatusCallbackEvent:a.map(o.get(t,"recordingStatusCallbackEvent"),function(t){return t}),RecordingStatusCallback:o.get(t,"recordingStatusCallback"),RecordingStatusCallbackMethod:o.get(t,"recordingStatusCallbackMethod"),Trim:o.get(t,"trim"),RecordingChannels:o.get(t,"recordingChannels"),RecordingTrack:o.get(t,"recordingTrack")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RecordingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RecordingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"DateCreated<":a.iso8601Date(o.get(t,"dateCreatedBefore")),DateCreated:a.iso8601Date(o.get(t,"dateCreated")),"DateCreated>":a.iso8601Date(o.get(t,"dateCreatedAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.callSid,t)};RecordingListInstance.toJSON=function toJSON(){return this._solution};RecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingListInstance};f=function RecordingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.callSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RecordingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callSid=e.call_sid;this.conferenceSid=e.conference_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.startTime=c.rfc2822DateTime(e.start_time);this.duration=e.duration;this.sid=e.sid;this.price=c.decimal(e.price);this.uri=e.uri;this.encryptionDetails=e.encryption_details;this.priceUnit=e.price_unit;this.status=e.status;this.channels=c.integer(e.channels);this.source=e.source;this.errorCode=c.integer(e.error_code);this.track=e.track;this._context=undefined;this._solution={accountSid:i,callSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.callSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RecordingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,callSid:i,sid:n};this._uri=`/Accounts/${e}/Calls/${i}/Recordings/${n}.json`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=u.of({Status:o.get(t,"status"),PauseBehavior:o.get(t,"pauseBehavior")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingList:h,RecordingPage:f,RecordingInstance:p,RecordingContext:d}},41322:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(99793).ParticipantList;var a=i(53471).RecordingList;var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function ConferenceList(t,e){function ConferenceListInstance(t){return ConferenceListInstance.get(t)}ConferenceListInstance._version=t;ConferenceListInstance._solution={accountSid:e};ConferenceListInstance._uri=`/Accounts/${e}/Conferences.json`;ConferenceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConferenceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConferenceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({"DateCreated<":h.iso8601Date(o.get(t,"dateCreatedBefore")),DateCreated:h.iso8601Date(o.get(t,"dateCreated")),"DateCreated>":h.iso8601Date(o.get(t,"dateCreatedAfter")),"DateUpdated<":h.iso8601Date(o.get(t,"dateUpdatedBefore")),DateUpdated:h.iso8601Date(o.get(t,"dateUpdated")),"DateUpdated>":h.iso8601Date(o.get(t,"dateUpdatedAfter")),FriendlyName:o.get(t,"friendlyName"),Status:o.get(t,"status"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConferenceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConferenceListInstance.get=function get(t){return new v(this._version,this._solution.accountSid,t)};ConferenceListInstance.toJSON=function toJSON(){return this._solution};ConferenceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConferenceListInstance};d=function ConferencePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,r.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.accountSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ConferenceInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=u.rfc2822DateTime(e.date_created);this.dateUpdated=u.rfc2822DateTime(e.date_updated);this.apiVersion=e.api_version;this.friendlyName=e.friendly_name;this.region=e.region;this.sid=e.sid;this.status=e.status;this.uri=e.uri;this.subresourceUris=e.subresource_uris;this.reasonConferenceEnded=e.reason_conference_ended;this.callSidEndingConference=e.call_sid_ending_conference;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.participants=function participants(){return this._proxy.participants};l.prototype.recordings=function recordings(){return this._proxy.recordings};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ConferenceContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Conferences/${i}.json`;this._participants=undefined;this._recordings=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({Status:o.get(t,"status"),AnnounceUrl:o.get(t,"announceUrl"),AnnounceMethod:o.get(t,"announceMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"participants",{get:function(){if(!this._participants){this._participants=new c(this._version,this._solution.accountSid,this._solution.sid)}return this._participants}});Object.defineProperty(v.prototype,"recordings",{get:function(){if(!this._recordings){this._recordings=new a(this._version,this._solution.accountSid,this._solution.sid)}return this._recordings}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConferenceList:p,ConferencePage:d,ConferenceInstance:l,ConferenceContext:v}},99793:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ParticipantList(t,e,i){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={accountSid:e,conferenceSid:i};ParticipantListInstance._uri=`/Accounts/${e}/Conferences/${i}/Participants.json`;ParticipantListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.from)){throw new Error('Required parameter "opts.from" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}var i=n.defer();var s=u.of({From:o.get(t,"from"),To:o.get(t,"to"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),StatusCallbackEvent:a.map(o.get(t,"statusCallbackEvent"),function(t){return t}),Label:o.get(t,"label"),Timeout:o.get(t,"timeout"),Record:a.bool(o.get(t,"record")),Muted:a.bool(o.get(t,"muted")),Beep:o.get(t,"beep"),StartConferenceOnEnter:a.bool(o.get(t,"startConferenceOnEnter")),EndConferenceOnExit:a.bool(o.get(t,"endConferenceOnExit")),WaitUrl:o.get(t,"waitUrl"),WaitMethod:o.get(t,"waitMethod"),EarlyMedia:a.bool(o.get(t,"earlyMedia")),MaxParticipants:o.get(t,"maxParticipants"),ConferenceRecord:o.get(t,"conferenceRecord"),ConferenceTrim:o.get(t,"conferenceTrim"),ConferenceStatusCallback:o.get(t,"conferenceStatusCallback"),ConferenceStatusCallbackMethod:o.get(t,"conferenceStatusCallbackMethod"),ConferenceStatusCallbackEvent:a.map(o.get(t,"conferenceStatusCallbackEvent"),function(t){return t}),RecordingChannels:o.get(t,"recordingChannels"),RecordingStatusCallback:o.get(t,"recordingStatusCallback"),RecordingStatusCallbackMethod:o.get(t,"recordingStatusCallbackMethod"),SipAuthUsername:o.get(t,"sipAuthUsername"),SipAuthPassword:o.get(t,"sipAuthPassword"),Region:o.get(t,"region"),ConferenceRecordingStatusCallback:o.get(t,"conferenceRecordingStatusCallback"),ConferenceRecordingStatusCallbackMethod:o.get(t,"conferenceRecordingStatusCallbackMethod"),RecordingStatusCallbackEvent:a.map(o.get(t,"recordingStatusCallbackEvent"),function(t){return t}),ConferenceRecordingStatusCallbackEvent:a.map(o.get(t,"conferenceRecordingStatusCallbackEvent"),function(t){return t}),Coaching:a.bool(o.get(t,"coaching")),CallSidToCoach:o.get(t,"callSidToCoach"),JitterBufferSize:o.get(t,"jitterBufferSize"),Byoc:o.get(t,"byoc"),CallerId:o.get(t,"callerId"),CallReason:o.get(t,"callReason"),RecordingTrack:o.get(t,"recordingTrack")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Muted:a.bool(o.get(t,"muted")),Hold:a.bool(o.get(t,"hold")),Coaching:a.bool(o.get(t,"coaching")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.conferenceSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};f=function ParticipantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ParticipantInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.callSid=e.call_sid;this.label=e.label;this.callSidToCoach=e.call_sid_to_coach;this.coaching=e.coaching;this.conferenceSid=e.conference_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.endConferenceOnExit=e.end_conference_on_exit;this.muted=e.muted;this.hold=e.hold;this.startConferenceOnEnter=e.start_conference_on_enter;this.status=e.status;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,conferenceSid:n,callSid:o||this.callSid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.conferenceSid,this._solution.callSid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ParticipantContext(t,e,i,n){this._version=t;this._solution={accountSid:e,conferenceSid:i,callSid:n};this._uri=`/Accounts/${e}/Conferences/${i}/Participants/${n}.json`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid,this._solution.callSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Muted:a.bool(o.get(t,"muted")),Hold:a.bool(o.get(t,"hold")),HoldUrl:o.get(t,"holdUrl"),HoldMethod:o.get(t,"holdMethod"),AnnounceUrl:o.get(t,"announceUrl"),AnnounceMethod:o.get(t,"announceMethod"),WaitUrl:o.get(t,"waitUrl"),WaitMethod:o.get(t,"waitMethod"),BeepOnExit:a.bool(o.get(t,"beepOnExit")),EndConferenceOnExit:a.bool(o.get(t,"endConferenceOnExit")),Coaching:a.bool(o.get(t,"coaching")),CallSidToCoach:o.get(t,"callSidToCoach")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:h,ParticipantPage:f,ParticipantInstance:p,ParticipantContext:d}},53471:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RecordingList(t,e,i){function RecordingListInstance(t){return RecordingListInstance.get(t)}RecordingListInstance._version=t;RecordingListInstance._solution={accountSid:e,conferenceSid:i};RecordingListInstance._uri=`/Accounts/${e}/Conferences/${i}/Recordings.json`;RecordingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RecordingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RecordingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"DateCreated<":a.iso8601Date(o.get(t,"dateCreatedBefore")),DateCreated:a.iso8601Date(o.get(t,"dateCreated")),"DateCreated>":a.iso8601Date(o.get(t,"dateCreatedAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.conferenceSid,t)};RecordingListInstance.toJSON=function toJSON(){return this._solution};RecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingListInstance};f=function RecordingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RecordingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callSid=e.call_sid;this.conferenceSid=e.conference_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.startTime=c.rfc2822DateTime(e.start_time);this.duration=e.duration;this.sid=e.sid;this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.status=e.status;this.channels=c.integer(e.channels);this.source=e.source;this.errorCode=c.integer(e.error_code);this.encryptionDetails=e.encryption_details;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,conferenceSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.conferenceSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RecordingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,conferenceSid:i,sid:n};this._uri=`/Accounts/${e}/Conferences/${i}/Recordings/${n}.json`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=u.of({Status:o.get(t,"status"),PauseBehavior:o.get(t,"pauseBehavior")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingList:h,RecordingPage:f,RecordingInstance:p,RecordingContext:d}},48104:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function ConnectAppList(t,e){function ConnectAppListInstance(t){return ConnectAppListInstance.get(t)}ConnectAppListInstance._version=t;ConnectAppListInstance._solution={accountSid:e};ConnectAppListInstance._uri=`/Accounts/${e}/ConnectApps.json`;ConnectAppListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConnectAppListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConnectAppListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectAppListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectAppListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};ConnectAppListInstance.toJSON=function toJSON(){return this._solution};ConnectAppListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConnectAppListInstance};h=function ConnectAppPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ConnectAppInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.authorizeRedirectUrl=e.authorize_redirect_url;this.companyName=e.company_name;this.deauthorizeCallbackMethod=e.deauthorize_callback_method;this.deauthorizeCallbackUrl=e.deauthorize_callback_url;this.description=e.description;this.friendlyName=e.friendly_name;this.homepageUrl=e.homepage_url;this.permissions=e.permissions;this.sid=e.sid;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConnectAppContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/ConnectApps/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({AuthorizeRedirectUrl:o.get(t,"authorizeRedirectUrl"),CompanyName:o.get(t,"companyName"),DeauthorizeCallbackMethod:o.get(t,"deauthorizeCallbackMethod"),DeauthorizeCallbackUrl:o.get(t,"deauthorizeCallbackUrl"),Description:o.get(t,"description"),FriendlyName:o.get(t,"friendlyName"),HomepageUrl:o.get(t,"homepageUrl"),Permissions:c.map(o.get(t,"permissions"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConnectAppList:u,ConnectAppPage:h,ConnectAppInstance:f,ConnectAppContext:p}},73350:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(83805).AssignedAddOnList;var c=i(42867).LocalList;var a=i(6179).MobileList;var u=i(60938);var h=i(8039).TollFreeList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function IncomingPhoneNumberList(t,e){function IncomingPhoneNumberListInstance(t){return IncomingPhoneNumberListInstance.get(t)}IncomingPhoneNumberListInstance._version=t;IncomingPhoneNumberListInstance._solution={accountSid:e};IncomingPhoneNumberListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers.json`;IncomingPhoneNumberListInstance._local=undefined;IncomingPhoneNumberListInstance._mobile=undefined;IncomingPhoneNumberListInstance._tollFree=undefined;IncomingPhoneNumberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IncomingPhoneNumberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IncomingPhoneNumberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({Beta:p.bool(o.get(t,"beta")),FriendlyName:o.get(t,"friendlyName"),PhoneNumber:o.get(t,"phoneNumber"),Origin:o.get(t,"origin"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IncomingPhoneNumberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IncomingPhoneNumberListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PhoneNumber:o.get(t,"phoneNumber"),AreaCode:o.get(t,"areaCode"),ApiVersion:o.get(t,"apiVersion"),FriendlyName:o.get(t,"friendlyName"),SmsApplicationSid:o.get(t,"smsApplicationSid"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceApplicationSid:o.get(t,"voiceApplicationSid"),VoiceCallerIdLookup:p.bool(o.get(t,"voiceCallerIdLookup")),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),EmergencyStatus:o.get(t,"emergencyStatus"),EmergencyAddressSid:o.get(t,"emergencyAddressSid"),TrunkSid:o.get(t,"trunkSid"),IdentitySid:o.get(t,"identitySid"),AddressSid:o.get(t,"addressSid"),VoiceReceiveMode:o.get(t,"voiceReceiveMode"),BundleSid:o.get(t,"bundleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IncomingPhoneNumberListInstance.get=function get(t){return new _(this._version,this._solution.accountSid,t)};Object.defineProperty(IncomingPhoneNumberListInstance,"local",{get:function local(){if(!this._local){this._local=new c(this._version,this._solution.accountSid)}return this._local}});Object.defineProperty(IncomingPhoneNumberListInstance,"mobile",{get:function mobile(){if(!this._mobile){this._mobile=new a(this._version,this._solution.accountSid)}return this._mobile}});Object.defineProperty(IncomingPhoneNumberListInstance,"tollFree",{get:function tollFree(){if(!this._tollFree){this._tollFree=new h(this._version,this._solution.accountSid)}return this._tollFree}});IncomingPhoneNumberListInstance.toJSON=function toJSON(){return this._solution};IncomingPhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IncomingPhoneNumberListInstance};v=function IncomingPhoneNumberPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,u.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t,this._solution.accountSid)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function IncomingPhoneNumberInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.addressSid=e.address_sid;this.addressRequirements=e.address_requirements;this.apiVersion=e.api_version;this.beta=e.beta;this.capabilities=e.capabilities;this.dateCreated=f.rfc2822DateTime(e.date_created);this.dateUpdated=f.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.identitySid=e.identity_sid;this.phoneNumber=e.phone_number;this.origin=e.origin;this.sid=e.sid;this.smsApplicationSid=e.sms_application_sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.trunkSid=e.trunk_sid;this.uri=e.uri;this.voiceReceiveMode=e.voice_receive_mode;this.voiceApplicationSid=e.voice_application_sid;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.emergencyStatus=e.emergency_status;this.emergencyAddressSid=e.emergency_address_sid;this.bundleSid=e.bundle_sid;this.status=e.status;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.assignedAddOns=function assignedAddOns(){return this._proxy.assignedAddOns};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function IncomingPhoneNumberContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/IncomingPhoneNumbers/${i}.json`;this._assignedAddOns=undefined};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({AccountSid:o.get(t,"accountSid"),ApiVersion:o.get(t,"apiVersion"),FriendlyName:o.get(t,"friendlyName"),SmsApplicationSid:o.get(t,"smsApplicationSid"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceApplicationSid:o.get(t,"voiceApplicationSid"),VoiceCallerIdLookup:p.bool(o.get(t,"voiceCallerIdLookup")),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),EmergencyStatus:o.get(t,"emergencyStatus"),EmergencyAddressSid:o.get(t,"emergencyAddressSid"),TrunkSid:o.get(t,"trunkSid"),VoiceReceiveMode:o.get(t,"voiceReceiveMode"),IdentitySid:o.get(t,"identitySid"),AddressSid:o.get(t,"addressSid"),BundleSid:o.get(t,"bundleSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(_.prototype,"assignedAddOns",{get:function(){if(!this._assignedAddOns){this._assignedAddOns=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._assignedAddOns}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IncomingPhoneNumberList:l,IncomingPhoneNumberPage:v,IncomingPhoneNumberInstance:m,IncomingPhoneNumberContext:_}},83805:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(39716).AssignedAddOnExtensionList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function AssignedAddOnList(t,e,i){function AssignedAddOnListInstance(t){return AssignedAddOnListInstance.get(t)}AssignedAddOnListInstance._version=t;AssignedAddOnListInstance._solution={accountSid:e,resourceSid:i};AssignedAddOnListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers/${i}/AssignedAddOns.json`;AssignedAddOnListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssignedAddOnListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssignedAddOnListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssignedAddOnListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssignedAddOnListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.installedAddOnSid)){throw new Error('Required parameter "opts.installedAddOnSid" missing.')}var i=n.defer();var s=u.of({InstalledAddOnSid:o.get(t,"installedAddOnSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.resourceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssignedAddOnListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.resourceSid,t)};AssignedAddOnListInstance.toJSON=function toJSON(){return this._solution};AssignedAddOnListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssignedAddOnListInstance};f=function AssignedAddOnPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.resourceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AssignedAddOnInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.resourceSid=e.resource_sid;this.friendlyName=e.friendly_name;this.description=e.description;this.configuration=e.configuration;this.uniqueName=e.unique_name;this.dateCreated=a.rfc2822DateTime(e.date_created);this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.uri=e.uri;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,resourceSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.resourceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.extensions=function extensions(){return this._proxy.extensions};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AssignedAddOnContext(t,e,i,n){this._version=t;this._solution={accountSid:e,resourceSid:i,sid:n};this._uri=`/Accounts/${e}/IncomingPhoneNumbers/${i}/AssignedAddOns/${n}.json`;this._extensions=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.resourceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"extensions",{get:function(){if(!this._extensions){this._extensions=new r(this._version,this._solution.accountSid,this._solution.resourceSid,this._solution.sid)}return this._extensions}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssignedAddOnList:h,AssignedAddOnPage:f,AssignedAddOnInstance:p,AssignedAddOnContext:d}},39716:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function AssignedAddOnExtensionList(t,e,i,r){function AssignedAddOnExtensionListInstance(t){return AssignedAddOnExtensionListInstance.get(t)}AssignedAddOnExtensionListInstance._version=t;AssignedAddOnExtensionListInstance._solution={accountSid:e,resourceSid:i,assignedAddOnSid:r};AssignedAddOnExtensionListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers/${i}/AssignedAddOns/${r}/Extensions.json`;AssignedAddOnExtensionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssignedAddOnExtensionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssignedAddOnExtensionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssignedAddOnExtensionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssignedAddOnExtensionListInstance.get=function get(t){return new f(this._version,this._solution.accountSid,this._solution.resourceSid,this._solution.assignedAddOnSid,t)};AssignedAddOnExtensionListInstance.toJSON=function toJSON(){return this._solution};AssignedAddOnExtensionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssignedAddOnExtensionListInstance};u=function AssignedAddOnExtensionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.accountSid,this._solution.resourceSid,this._solution.assignedAddOnSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function AssignedAddOnExtensionInstance(t,e,i,n,o,s){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.resourceSid=e.resource_sid;this.assignedAddOnSid=e.assigned_add_on_sid;this.friendlyName=e.friendly_name;this.productName=e.product_name;this.uniqueName=e.unique_name;this.uri=e.uri;this.enabled=e.enabled;this._context=undefined;this._solution={accountSid:i,resourceSid:n,assignedAddOnSid:o,sid:s||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.accountSid,this._solution.resourceSid,this._solution.assignedAddOnSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AssignedAddOnExtensionContext(t,e,i,n,o){this._version=t;this._solution={accountSid:e,resourceSid:i,assignedAddOnSid:n,sid:o};this._uri=`/Accounts/${e}/IncomingPhoneNumbers/${i}/AssignedAddOns/${n}/Extensions/${o}.json`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.accountSid,this._solution.resourceSid,this._solution.assignedAddOnSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssignedAddOnExtensionList:a,AssignedAddOnExtensionPage:u,AssignedAddOnExtensionInstance:h,AssignedAddOnExtensionContext:f}},42867:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function LocalList(t,e){function LocalListInstance(t){return LocalListInstance.get(t)}LocalListInstance._version=t;LocalListInstance._solution={accountSid:e};LocalListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers/Local.json`;LocalListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};LocalListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};LocalListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Beta:a.bool(o.get(t,"beta")),FriendlyName:o.get(t,"friendlyName"),PhoneNumber:o.get(t,"phoneNumber"),Origin:o.get(t,"origin"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LocalListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LocalListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumber)){throw new Error('Required parameter "opts.phoneNumber" missing.')}var i=n.defer();var s=u.of({PhoneNumber:o.get(t,"phoneNumber"),ApiVersion:o.get(t,"apiVersion"),FriendlyName:o.get(t,"friendlyName"),SmsApplicationSid:o.get(t,"smsApplicationSid"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceApplicationSid:o.get(t,"voiceApplicationSid"),VoiceCallerIdLookup:a.bool(o.get(t,"voiceCallerIdLookup")),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),IdentitySid:o.get(t,"identitySid"),AddressSid:o.get(t,"addressSid"),EmergencyStatus:o.get(t,"emergencyStatus"),EmergencyAddressSid:o.get(t,"emergencyAddressSid"),TrunkSid:o.get(t,"trunkSid"),VoiceReceiveMode:o.get(t,"voiceReceiveMode"),BundleSid:o.get(t,"bundleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LocalListInstance.toJSON=function toJSON(){return this._solution};LocalListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return LocalListInstance};f=function LocalPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function LocalInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.addressSid=e.address_sid;this.addressRequirements=e.address_requirements;this.apiVersion=e.api_version;this.beta=e.beta;this.capabilities=e.capabilities;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.identitySid=e.identity_sid;this.phoneNumber=e.phone_number;this.origin=e.origin;this.sid=e.sid;this.smsApplicationSid=e.sms_application_sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.trunkSid=e.trunk_sid;this.uri=e.uri;this.voiceReceiveMode=e.voice_receive_mode;this.voiceApplicationSid=e.voice_application_sid;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.emergencyStatus=e.emergency_status;this.emergencyAddressSid=e.emergency_address_sid;this.bundleSid=e.bundle_sid;this.status=e.status;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={LocalList:h,LocalPage:f,LocalInstance:p}},6179:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function MobileList(t,e){function MobileListInstance(t){return MobileListInstance.get(t)}MobileListInstance._version=t;MobileListInstance._solution={accountSid:e};MobileListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers/Mobile.json`;MobileListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MobileListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MobileListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Beta:a.bool(o.get(t,"beta")),FriendlyName:o.get(t,"friendlyName"),PhoneNumber:o.get(t,"phoneNumber"),Origin:o.get(t,"origin"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MobileListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MobileListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumber)){throw new Error('Required parameter "opts.phoneNumber" missing.')}var i=n.defer();var s=u.of({PhoneNumber:o.get(t,"phoneNumber"),ApiVersion:o.get(t,"apiVersion"),FriendlyName:o.get(t,"friendlyName"),SmsApplicationSid:o.get(t,"smsApplicationSid"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceApplicationSid:o.get(t,"voiceApplicationSid"),VoiceCallerIdLookup:a.bool(o.get(t,"voiceCallerIdLookup")),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),IdentitySid:o.get(t,"identitySid"),AddressSid:o.get(t,"addressSid"),EmergencyStatus:o.get(t,"emergencyStatus"),EmergencyAddressSid:o.get(t,"emergencyAddressSid"),TrunkSid:o.get(t,"trunkSid"),VoiceReceiveMode:o.get(t,"voiceReceiveMode"),BundleSid:o.get(t,"bundleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MobileListInstance.toJSON=function toJSON(){return this._solution};MobileListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MobileListInstance};f=function MobilePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MobileInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.addressSid=e.address_sid;this.addressRequirements=e.address_requirements;this.apiVersion=e.api_version;this.beta=e.beta;this.capabilities=e.capabilities;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.identitySid=e.identity_sid;this.phoneNumber=e.phone_number;this.origin=e.origin;this.sid=e.sid;this.smsApplicationSid=e.sms_application_sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.trunkSid=e.trunk_sid;this.uri=e.uri;this.voiceReceiveMode=e.voice_receive_mode;this.voiceApplicationSid=e.voice_application_sid;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.emergencyStatus=e.emergency_status;this.emergencyAddressSid=e.emergency_address_sid;this.bundleSid=e.bundle_sid;this.status=e.status;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MobileList:h,MobilePage:f,MobileInstance:p}},8039:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function TollFreeList(t,e){function TollFreeListInstance(t){return TollFreeListInstance.get(t)}TollFreeListInstance._version=t;TollFreeListInstance._solution={accountSid:e};TollFreeListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers/TollFree.json`;TollFreeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TollFreeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TollFreeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Beta:a.bool(o.get(t,"beta")),FriendlyName:o.get(t,"friendlyName"),PhoneNumber:o.get(t,"phoneNumber"),Origin:o.get(t,"origin"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TollFreeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TollFreeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumber)){throw new Error('Required parameter "opts.phoneNumber" missing.')}var i=n.defer();var s=u.of({PhoneNumber:o.get(t,"phoneNumber"),ApiVersion:o.get(t,"apiVersion"),FriendlyName:o.get(t,"friendlyName"),SmsApplicationSid:o.get(t,"smsApplicationSid"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceApplicationSid:o.get(t,"voiceApplicationSid"),VoiceCallerIdLookup:a.bool(o.get(t,"voiceCallerIdLookup")),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),IdentitySid:o.get(t,"identitySid"),AddressSid:o.get(t,"addressSid"),EmergencyStatus:o.get(t,"emergencyStatus"),EmergencyAddressSid:o.get(t,"emergencyAddressSid"),TrunkSid:o.get(t,"trunkSid"),VoiceReceiveMode:o.get(t,"voiceReceiveMode"),BundleSid:o.get(t,"bundleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TollFreeListInstance.toJSON=function toJSON(){return this._solution};TollFreeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TollFreeListInstance};f=function TollFreePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TollFreeInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.addressSid=e.address_sid;this.addressRequirements=e.address_requirements;this.apiVersion=e.api_version;this.beta=e.beta;this.capabilities=e.capabilities;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.identitySid=e.identity_sid;this.phoneNumber=e.phone_number;this.origin=e.origin;this.sid=e.sid;this.smsApplicationSid=e.sms_application_sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.trunkSid=e.trunk_sid;this.uri=e.uri;this.voiceReceiveMode=e.voice_receive_mode;this.voiceApplicationSid=e.voice_application_sid;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.emergencyStatus=e.emergency_status;this.emergencyAddressSid=e.emergency_address_sid;this.bundleSid=e.bundle_sid;this.status=e.status;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TollFreeList:h,TollFreePage:f,TollFreeInstance:p}},36378:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function KeyList(t,e){function KeyListInstance(t){return KeyListInstance.get(t)}KeyListInstance._version=t;KeyListInstance._solution={accountSid:e};KeyListInstance._uri=`/Accounts/${e}/Keys.json`;KeyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};KeyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};KeyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};KeyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};KeyListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};KeyListInstance.toJSON=function toJSON(){return this._solution};KeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return KeyListInstance};h=function KeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function KeyInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function KeyContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Keys/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={KeyList:u,KeyPage:h,KeyInstance:f,KeyContext:p}},76433:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(56300).FeedbackList;var c=i(15532).MediaList;var a=i(60938);var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function MessageList(t,e){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={accountSid:e};MessageListInstance._uri=`/Accounts/${e}/Messages.json`;MessageListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}var i=n.defer();var s=f.of({To:o.get(t,"to"),From:o.get(t,"from"),MessagingServiceSid:o.get(t,"messagingServiceSid"),Body:o.get(t,"body"),MediaUrl:h.map(o.get(t,"mediaUrl"),function(t){return t}),StatusCallback:o.get(t,"statusCallback"),ApplicationSid:o.get(t,"applicationSid"),MaxPrice:o.get(t,"maxPrice"),ProvideFeedback:h.bool(o.get(t,"provideFeedback")),Attempt:o.get(t,"attempt"),ValidityPeriod:o.get(t,"validityPeriod"),ForceDelivery:h.bool(o.get(t,"forceDelivery")),ContentRetention:o.get(t,"contentRetention"),AddressRetention:o.get(t,"addressRetention"),SmartEncoded:h.bool(o.get(t,"smartEncoded")),PersistentAction:h.map(o.get(t,"persistentAction"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({To:o.get(t,"to"),From:o.get(t,"from"),"DateSent<":h.iso8601DateTime(o.get(t,"dateSentBefore")),DateSent:h.iso8601DateTime(o.get(t,"dateSent")),"DateSent>":h.iso8601DateTime(o.get(t,"dateSentAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new v(this._version,this._solution.accountSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};d=function MessagePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,a.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.accountSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function MessageInstance(t,e,i,n){this._version=t;this.body=e.body;this.numSegments=e.num_segments;this.direction=e.direction;this.from=e.from;this.to=e.to;this.dateUpdated=u.rfc2822DateTime(e.date_updated);this.price=e.price;this.errorMessage=e.error_message;this.uri=e.uri;this.accountSid=e.account_sid;this.numMedia=e.num_media;this.status=e.status;this.messagingServiceSid=e.messaging_service_sid;this.sid=e.sid;this.dateSent=u.rfc2822DateTime(e.date_sent);this.dateCreated=u.rfc2822DateTime(e.date_created);this.errorCode=u.integer(e.error_code);this.priceUnit=e.price_unit;this.apiVersion=e.api_version;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.media=function media(){return this._proxy.media};l.prototype.feedback=function feedback(){return this._proxy.feedback};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function MessageContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Messages/${i}.json`;this._media=undefined;this._feedback=undefined};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.body)){throw new Error('Required parameter "opts.body" missing.')}var i=n.defer();var s=f.of({Body:o.get(t,"body")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"media",{get:function(){if(!this._media){this._media=new c(this._version,this._solution.accountSid,this._solution.sid)}return this._media}});Object.defineProperty(v.prototype,"feedback",{get:function(){if(!this._feedback){this._feedback=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._feedback}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:p,MessagePage:d,MessageInstance:l,MessageContext:v}},56300:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function FeedbackList(t,e,i){function FeedbackListInstance(t){return FeedbackListInstance.get(t)}FeedbackListInstance._version=t;FeedbackListInstance._solution={accountSid:e,messageSid:i};FeedbackListInstance._uri=`/Accounts/${e}/Messages/${i}/Feedback.json`;FeedbackListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Outcome:o.get(t,"outcome")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FeedbackListInstance.toJSON=function toJSON(){return this._solution};FeedbackListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FeedbackListInstance};h=function FeedbackPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.messageSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FeedbackInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.messageSid=e.message_sid;this.outcome=e.outcome;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,messageSid:n}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FeedbackList:u,FeedbackPage:h,FeedbackInstance:f}},15532:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MediaList(t,e,i){function MediaListInstance(t){return MediaListInstance.get(t)}MediaListInstance._version=t;MediaListInstance._solution={accountSid:e,messageSid:i};MediaListInstance._uri=`/Accounts/${e}/Messages/${i}/Media.json`;MediaListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MediaListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MediaListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"DateCreated<":a.iso8601DateTime(o.get(t,"dateCreatedBefore")),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),"DateCreated>":a.iso8601DateTime(o.get(t,"dateCreatedAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MediaListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MediaListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.messageSid,t)};MediaListInstance.toJSON=function toJSON(){return this._solution};MediaListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MediaListInstance};f=function MediaPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.messageSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MediaInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.contentType=e.content_type;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.parentSid=e.parent_sid;this.sid=e.sid;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,messageSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.messageSid,this._solution.sid)}return this._context}});p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MediaContext(t,e,i,n){this._version=t;this._solution={accountSid:e,messageSid:i,sid:n};this._uri=`/Accounts/${e}/Messages/${i}/Media/${n}.json`};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.messageSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MediaList:h,MediaPage:f,MediaInstance:p,MediaContext:d}},52411:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function NewKeyList(t,e){function NewKeyListInstance(t){return NewKeyListInstance.get(t)}NewKeyListInstance._version=t;NewKeyListInstance._solution={accountSid:e};NewKeyListInstance._uri=`/Accounts/${e}/Keys.json`;NewKeyListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NewKeyListInstance.toJSON=function toJSON(){return this._solution};NewKeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NewKeyListInstance};h=function NewKeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NewKeyInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.secret=e.secret;this._context=undefined;this._solution={accountSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NewKeyList:u,NewKeyPage:h,NewKeyInstance:f}},63159:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function NewSigningKeyList(t,e){function NewSigningKeyListInstance(t){return NewSigningKeyListInstance.get(t)}NewSigningKeyListInstance._version=t;NewSigningKeyListInstance._solution={accountSid:e};NewSigningKeyListInstance._uri=`/Accounts/${e}/SigningKeys.json`;NewSigningKeyListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NewSigningKeyListInstance.toJSON=function toJSON(){return this._solution};NewSigningKeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NewSigningKeyListInstance};h=function NewSigningKeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NewSigningKeyInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.secret=e.secret;this._context=undefined;this._solution={accountSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NewSigningKeyList:u,NewSigningKeyPage:h,NewSigningKeyInstance:f}},47066:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function NotificationList(t,e){function NotificationListInstance(t){return NotificationListInstance.get(t)}NotificationListInstance._version=t;NotificationListInstance._solution={accountSid:e};NotificationListInstance._uri=`/Accounts/${e}/Notifications.json`;NotificationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NotificationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NotificationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Log:o.get(t,"log"),"MessageDate<":a.iso8601Date(o.get(t,"messageDateBefore")),MessageDate:a.iso8601Date(o.get(t,"messageDate")),"MessageDate>":a.iso8601Date(o.get(t,"messageDateAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NotificationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NotificationListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};NotificationListInstance.toJSON=function toJSON(){return this._solution};NotificationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NotificationListInstance};f=function NotificationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function NotificationInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callSid=e.call_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.errorCode=e.error_code;this.log=e.log;this.messageDate=c.rfc2822DateTime(e.message_date);this.messageText=e.message_text;this.moreInfo=e.more_info;this.requestMethod=e.request_method;this.requestUrl=e.request_url;this.requestVariables=e.request_variables;this.responseBody=e.response_body;this.responseHeaders=e.response_headers;this.sid=e.sid;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function NotificationContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Notifications/${i}.json`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NotificationList:h,NotificationPage:f,NotificationInstance:p,NotificationContext:d}},34642:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function OutgoingCallerIdList(t,e){function OutgoingCallerIdListInstance(t){return OutgoingCallerIdListInstance.get(t)}OutgoingCallerIdListInstance._version=t;OutgoingCallerIdListInstance._solution={accountSid:e};OutgoingCallerIdListInstance._uri=`/Accounts/${e}/OutgoingCallerIds.json`;OutgoingCallerIdListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};OutgoingCallerIdListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};OutgoingCallerIdListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PhoneNumber:o.get(t,"phoneNumber"),FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};OutgoingCallerIdListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};OutgoingCallerIdListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};OutgoingCallerIdListInstance.toJSON=function toJSON(){return this._solution};OutgoingCallerIdListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return OutgoingCallerIdListInstance};h=function OutgoingCallerIdPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function OutgoingCallerIdInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.accountSid=e.account_sid;this.phoneNumber=e.phone_number;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function OutgoingCallerIdContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/OutgoingCallerIds/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={OutgoingCallerIdList:u,OutgoingCallerIdPage:h,OutgoingCallerIdInstance:f,OutgoingCallerIdContext:p}},95601:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(62257).MemberList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function QueueList(t,e){function QueueListInstance(t){return QueueListInstance.get(t)}QueueListInstance._version=t;QueueListInstance._solution={accountSid:e};QueueListInstance._uri=`/Accounts/${e}/Queues.json`;QueueListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};QueueListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};QueueListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueueListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueueListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),MaxSize:o.get(t,"maxSize")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueueListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};QueueListInstance.toJSON=function toJSON(){return this._solution};QueueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return QueueListInstance};f=function QueuePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function QueueInstance(t,e,i,n){this._version=t;this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.currentSize=a.integer(e.current_size);this.friendlyName=e.friendly_name;this.uri=e.uri;this.accountSid=e.account_sid;this.averageWaitTime=a.integer(e.average_wait_time);this.sid=e.sid;this.dateCreated=a.rfc2822DateTime(e.date_created);this.maxSize=a.integer(e.max_size);this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.members=function members(){return this._proxy.members};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function QueueContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Queues/${i}.json`;this._members=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),MaxSize:o.get(t,"maxSize")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"members",{get:function(){if(!this._members){this._members=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._members}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={QueueList:h,QueuePage:f,QueueInstance:p,QueueContext:d}},62257:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function MemberList(t,e,i){function MemberListInstance(t){return MemberListInstance.get(t)}MemberListInstance._version=t;MemberListInstance._solution={accountSid:e,queueSid:i};MemberListInstance._uri=`/Accounts/${e}/Queues/${i}/Members.json`;MemberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MemberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MemberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.queueSid,t)};MemberListInstance.toJSON=function toJSON(){return this._solution};MemberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MemberListInstance};h=function MemberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.queueSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function MemberInstance(t,e,i,n,o){this._version=t;this.callSid=e.call_sid;this.dateEnqueued=c.rfc2822DateTime(e.date_enqueued);this.position=c.integer(e.position);this.uri=e.uri;this.waitTime=c.integer(e.wait_time);this.queueSid=e.queue_sid;this._context=undefined;this._solution={accountSid:i,queueSid:n,callSid:o||this.callSid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.queueSid,this._solution.callSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MemberContext(t,e,i,n){this._version=t;this._solution={accountSid:e,queueSid:i,callSid:n};this._uri=`/Accounts/${e}/Queues/${i}/Members/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.queueSid,this._solution.callSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.url)){throw new Error('Required parameter "opts.url" missing.')}var i=n.defer();var s=a.of({Url:o.get(t,"url"),Method:o.get(t,"method")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.queueSid,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MemberList:u,MemberPage:h,MemberInstance:f,MemberContext:p}},28672:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(28130).AddOnResultList;var c=i(60938);var a=i(67425).TranscriptionList;var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function RecordingList(t,e){function RecordingListInstance(t){return RecordingListInstance.get(t)}RecordingListInstance._version=t;RecordingListInstance._solution={accountSid:e};RecordingListInstance._uri=`/Accounts/${e}/Recordings.json`;RecordingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RecordingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RecordingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({"DateCreated<":h.iso8601DateTime(o.get(t,"dateCreatedBefore")),DateCreated:h.iso8601DateTime(o.get(t,"dateCreated")),"DateCreated>":h.iso8601DateTime(o.get(t,"dateCreatedAfter")),CallSid:o.get(t,"callSid"),ConferenceSid:o.get(t,"conferenceSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.get=function get(t){return new v(this._version,this._solution.accountSid,t)};RecordingListInstance.toJSON=function toJSON(){return this._solution};RecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingListInstance};d=function RecordingPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,c.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.accountSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function RecordingInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callSid=e.call_sid;this.conferenceSid=e.conference_sid;this.dateCreated=u.rfc2822DateTime(e.date_created);this.dateUpdated=u.rfc2822DateTime(e.date_updated);this.startTime=u.rfc2822DateTime(e.start_time);this.duration=e.duration;this.sid=e.sid;this.price=e.price;this.priceUnit=e.price_unit;this.status=e.status;this.channels=u.integer(e.channels);this.source=e.source;this.errorCode=u.integer(e.error_code);this.uri=e.uri;this.encryptionDetails=e.encryption_details;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.transcriptions=function transcriptions(){return this._proxy.transcriptions};l.prototype.addOnResults=function addOnResults(){return this._proxy.addOnResults};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function RecordingContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Recordings/${i}.json`;this._transcriptions=undefined;this._addOnResults=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(v.prototype,"transcriptions",{get:function(){if(!this._transcriptions){this._transcriptions=new a(this._version,this._solution.accountSid,this._solution.sid)}return this._transcriptions}});Object.defineProperty(v.prototype,"addOnResults",{get:function(){if(!this._addOnResults){this._addOnResults=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._addOnResults}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingList:p,RecordingPage:d,RecordingInstance:l,RecordingContext:v}},28130:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(31026).PayloadList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function AddOnResultList(t,e,i){function AddOnResultListInstance(t){return AddOnResultListInstance.get(t)}AddOnResultListInstance._version=t;AddOnResultListInstance._solution={accountSid:e,referenceSid:i};AddOnResultListInstance._uri=`/Accounts/${e}/Recordings/${i}/AddOnResults.json`;AddOnResultListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AddOnResultListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AddOnResultListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AddOnResultListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AddOnResultListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.referenceSid,t)};AddOnResultListInstance.toJSON=function toJSON(){return this._solution};AddOnResultListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AddOnResultListInstance};f=function AddOnResultPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.referenceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AddOnResultInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.status=e.status;this.addOnSid=e.add_on_sid;this.addOnConfigurationSid=e.add_on_configuration_sid;this.dateCreated=a.rfc2822DateTime(e.date_created);this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.dateCompleted=a.rfc2822DateTime(e.date_completed);this.referenceSid=e.reference_sid;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,referenceSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.referenceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.payloads=function payloads(){return this._proxy.payloads};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AddOnResultContext(t,e,i,n){this._version=t;this._solution={accountSid:e,referenceSid:i,sid:n};this._uri=`/Accounts/${e}/Recordings/${i}/AddOnResults/${n}.json`;this._payloads=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.referenceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"payloads",{get:function(){if(!this._payloads){this._payloads=new c(this._version,this._solution.accountSid,this._solution.referenceSid,this._solution.sid)}return this._payloads}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AddOnResultList:h,AddOnResultPage:f,AddOnResultInstance:p,AddOnResultContext:d}},31026:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function PayloadList(t,e,i,r){function PayloadListInstance(t){return PayloadListInstance.get(t)}PayloadListInstance._version=t;PayloadListInstance._solution={accountSid:e,referenceSid:i,addOnResultSid:r};PayloadListInstance._uri=`/Accounts/${e}/Recordings/${i}/AddOnResults/${r}/Payloads.json`;PayloadListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PayloadListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PayloadListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PayloadListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PayloadListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.referenceSid,this._solution.addOnResultSid,t)};PayloadListInstance.toJSON=function toJSON(){return this._solution};PayloadListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PayloadListInstance};h=function PayloadPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.referenceSid,this._solution.addOnResultSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PayloadInstance(t,e,i,n,o,s){this._version=t;this.sid=e.sid;this.addOnResultSid=e.add_on_result_sid;this.accountSid=e.account_sid;this.label=e.label;this.addOnSid=e.add_on_sid;this.addOnConfigurationSid=e.add_on_configuration_sid;this.contentType=e.content_type;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.referenceSid=e.reference_sid;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,referenceSid:n,addOnResultSid:o,sid:s||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.referenceSid,this._solution.addOnResultSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PayloadContext(t,e,i,n,o){this._version=t;this._solution={accountSid:e,referenceSid:i,addOnResultSid:n,sid:o};this._uri=`/Accounts/${e}/Recordings/${i}/AddOnResults/${n}/Payloads/${o}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.referenceSid,this._solution.addOnResultSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PayloadList:u,PayloadPage:h,PayloadInstance:f,PayloadContext:p}},67425:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TranscriptionList(t,e,i){function TranscriptionListInstance(t){return TranscriptionListInstance.get(t)}TranscriptionListInstance._version=t;TranscriptionListInstance._solution={accountSid:e,recordingSid:i};TranscriptionListInstance._uri=`/Accounts/${e}/Recordings/${i}/Transcriptions.json`;TranscriptionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TranscriptionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TranscriptionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TranscriptionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TranscriptionListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.recordingSid,t)};TranscriptionListInstance.toJSON=function toJSON(){return this._solution};TranscriptionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TranscriptionListInstance};h=function TranscriptionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.recordingSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TranscriptionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.duration=e.duration;this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.recordingSid=e.recording_sid;this.sid=e.sid;this.status=e.status;this.transcriptionText=e.transcription_text;this.type=e.type;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,recordingSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.recordingSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TranscriptionContext(t,e,i,n){this._version=t;this._solution={accountSid:e,recordingSid:i,sid:n};this._uri=`/Accounts/${e}/Recordings/${i}/Transcriptions/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.recordingSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TranscriptionList:u,TranscriptionPage:h,TranscriptionInstance:f,TranscriptionContext:p}},72435:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ShortCodeList(t,e){function ShortCodeListInstance(t){return ShortCodeListInstance.get(t)}ShortCodeListInstance._version=t;ShortCodeListInstance._solution={accountSid:e};ShortCodeListInstance._uri=`/Accounts/${e}/SMS/ShortCodes.json`;ShortCodeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ShortCodeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ShortCodeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),ShortCode:o.get(t,"shortCode"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};ShortCodeListInstance.toJSON=function toJSON(){return this._solution};ShortCodeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ShortCodeListInstance};h=function ShortCodePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ShortCodeInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.shortCode=e.short_code;this.sid=e.sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ShortCodeContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/SMS/ShortCodes/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),ApiVersion:o.get(t,"apiVersion"),SmsUrl:o.get(t,"smsUrl"),SmsMethod:o.get(t,"smsMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ShortCodeList:u,ShortCodePage:h,ShortCodeInstance:f,ShortCodeContext:p}},40489:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SigningKeyList(t,e){function SigningKeyListInstance(t){return SigningKeyListInstance.get(t)}SigningKeyListInstance._version=t;SigningKeyListInstance._solution={accountSid:e};SigningKeyListInstance._uri=`/Accounts/${e}/SigningKeys.json`;SigningKeyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SigningKeyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SigningKeyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SigningKeyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SigningKeyListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};SigningKeyListInstance.toJSON=function toJSON(){return this._solution};SigningKeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SigningKeyListInstance};h=function SigningKeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SigningKeyInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SigningKeyContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/SigningKeys/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SigningKeyList:u,SigningKeyPage:h,SigningKeyInstance:f,SigningKeyContext:p}},93613:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(99178).CredentialListList;var r=i(72198).DomainList;var c=i(5319).IpAccessControlListList;var a;a=function SipList(t,e){function SipListInstance(t){return SipListInstance.get(t)}SipListInstance._version=t;SipListInstance._solution={accountSid:e};SipListInstance._domains=undefined;SipListInstance._regions=undefined;SipListInstance._ipAccessControlLists=undefined;SipListInstance._credentialLists=undefined;Object.defineProperty(SipListInstance,"domains",{get:function domains(){if(!this._domains){this._domains=new r(this._version,this._solution.accountSid)}return this._domains}});Object.defineProperty(SipListInstance,"ipAccessControlLists",{get:function ipAccessControlLists(){if(!this._ipAccessControlLists){this._ipAccessControlLists=new c(this._version,this._solution.accountSid)}return this._ipAccessControlLists}});Object.defineProperty(SipListInstance,"credentialLists",{get:function credentialLists(){if(!this._credentialLists){this._credentialLists=new s(this._version,this._solution.accountSid)}return this._credentialLists}});SipListInstance.toJSON=function toJSON(){return this._solution};SipListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return SipListInstance};t.exports={SipList:a}},99178:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(61107).CredentialList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function CredentialListList(t,e){function CredentialListListInstance(t){return CredentialListListInstance.get(t)}CredentialListListInstance._version=t;CredentialListListInstance._solution={accountSid:e};CredentialListListInstance._uri=`/Accounts/${e}/SIP/CredentialLists.json`;CredentialListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};CredentialListListInstance.toJSON=function toJSON(){return this._solution};CredentialListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListListInstance};f=function CredentialListPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialListInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=a.rfc2822DateTime(e.date_created);this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.subresourceUris=e.subresource_uris;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.credentials=function credentials(){return this._proxy.credentials};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialListContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/SIP/CredentialLists/${i}.json`;this._credentials=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"credentials",{get:function(){if(!this._credentials){this._credentials=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._credentials}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialListList:h,CredentialListPage:f,CredentialListInstance:p,CredentialListContext:d}},61107:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CredentialList(t,e,i){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={accountSid:e,credentialListSid:i};CredentialListInstance._uri=`/Accounts/${e}/SIP/CredentialLists/${i}/Credentials.json`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.username)){throw new Error('Required parameter "opts.username" missing.')}if(o.isUndefined(t.password)){throw new Error('Required parameter "opts.password" missing.')}var i=n.defer();var s=a.of({Username:o.get(t,"username"),Password:o.get(t,"password")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.credentialListSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.credentialListSid,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};h=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.credentialListSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CredentialInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.credentialListSid=e.credential_list_sid;this.username=e.username;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,credentialListSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.credentialListSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialContext(t,e,i,n){this._version=t;this._solution={accountSid:e,credentialListSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/CredentialLists/${i}/Credentials/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.credentialListSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Password:o.get(t,"password")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.credentialListSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:u,CredentialPage:h,CredentialInstance:f,CredentialContext:p}},72198:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(81039).AuthTypesList;var c=i(29456).CredentialListMappingList;var a=i(99642).IpAccessControlListMappingList;var u=i(60938);var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function DomainList(t,e){function DomainListInstance(t){return DomainListInstance.get(t)}DomainListInstance._version=t;DomainListInstance._solution={accountSid:e};DomainListInstance._uri=`/Accounts/${e}/SIP/Domains.json`;DomainListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DomainListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DomainListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DomainListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DomainListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.domainName)){throw new Error('Required parameter "opts.domainName" missing.')}var i=n.defer();var s=p.of({DomainName:o.get(t,"domainName"),FriendlyName:o.get(t,"friendlyName"),VoiceUrl:o.get(t,"voiceUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceStatusCallbackUrl:o.get(t,"voiceStatusCallbackUrl"),VoiceStatusCallbackMethod:o.get(t,"voiceStatusCallbackMethod"),SipRegistration:f.bool(o.get(t,"sipRegistration")),EmergencyCallingEnabled:f.bool(o.get(t,"emergencyCallingEnabled")),Secure:f.bool(o.get(t,"secure")),ByocTrunkSid:o.get(t,"byocTrunkSid"),EmergencyCallerSid:o.get(t,"emergencyCallerSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DomainListInstance.get=function get(t){return new m(this._version,this._solution.accountSid,t)};DomainListInstance.toJSON=function toJSON(){return this._solution};DomainListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DomainListInstance};l=function DomainPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,u.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.accountSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function DomainInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.authType=e.auth_type;this.dateCreated=h.rfc2822DateTime(e.date_created);this.dateUpdated=h.rfc2822DateTime(e.date_updated);this.domainName=e.domain_name;this.friendlyName=e.friendly_name;this.sid=e.sid;this.uri=e.uri;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceStatusCallbackMethod=e.voice_status_callback_method;this.voiceStatusCallbackUrl=e.voice_status_callback_url;this.voiceUrl=e.voice_url;this.subresourceUris=e.subresource_uris;this.sipRegistration=e.sip_registration;this.emergencyCallingEnabled=e.emergency_calling_enabled;this.secure=e.secure;this.byocTrunkSid=e.byoc_trunk_sid;this.emergencyCallerSid=e.emergency_caller_sid;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.ipAccessControlListMappings=function ipAccessControlListMappings(){return this._proxy.ipAccessControlListMappings};v.prototype.credentialListMappings=function credentialListMappings(){return this._proxy.credentialListMappings};v.prototype.auth=function auth(){return this._proxy.auth};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function DomainContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/SIP/Domains/${i}.json`;this._ipAccessControlListMappings=undefined;this._credentialListMappings=undefined;this._auth=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceStatusCallbackMethod:o.get(t,"voiceStatusCallbackMethod"),VoiceStatusCallbackUrl:o.get(t,"voiceStatusCallbackUrl"),VoiceUrl:o.get(t,"voiceUrl"),SipRegistration:f.bool(o.get(t,"sipRegistration")),DomainName:o.get(t,"domainName"),EmergencyCallingEnabled:f.bool(o.get(t,"emergencyCallingEnabled")),Secure:f.bool(o.get(t,"secure")),ByocTrunkSid:o.get(t,"byocTrunkSid"),EmergencyCallerSid:o.get(t,"emergencyCallerSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"ipAccessControlListMappings",{get:function(){if(!this._ipAccessControlListMappings){this._ipAccessControlListMappings=new a(this._version,this._solution.accountSid,this._solution.sid)}return this._ipAccessControlListMappings}});Object.defineProperty(m.prototype,"credentialListMappings",{get:function(){if(!this._credentialListMappings){this._credentialListMappings=new c(this._version,this._solution.accountSid,this._solution.sid)}return this._credentialListMappings}});Object.defineProperty(m.prototype,"auth",{get:function(){if(!this._auth){this._auth=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._auth}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DomainList:d,DomainPage:l,DomainInstance:v,DomainContext:m}},81039:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(53042).AuthTypeCallsList;var r=i(64360).AuthTypeRegistrationsList;var c;c=function AuthTypesList(t,e,i){function AuthTypesListInstance(t){return AuthTypesListInstance.get(t)}AuthTypesListInstance._version=t;AuthTypesListInstance._solution={accountSid:e,domainSid:i};AuthTypesListInstance._calls=undefined;AuthTypesListInstance._registrations=undefined;Object.defineProperty(AuthTypesListInstance,"calls",{get:function calls(){if(!this._calls){this._calls=new s(this._version,this._solution.accountSid,this._solution.domainSid)}return this._calls}});Object.defineProperty(AuthTypesListInstance,"registrations",{get:function registrations(){if(!this._registrations){this._registrations=new r(this._version,this._solution.accountSid,this._solution.domainSid)}return this._registrations}});AuthTypesListInstance.toJSON=function toJSON(){return this._solution};AuthTypesListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return AuthTypesListInstance};t.exports={AuthTypesList:c}},53042:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(81060).AuthCallsCredentialListMappingList;var r=i(61668).AuthCallsIpAccessControlListMappingList;var c;c=function AuthTypeCallsList(t,e,i){function AuthTypeCallsListInstance(t){return AuthTypeCallsListInstance.get(t)}AuthTypeCallsListInstance._version=t;AuthTypeCallsListInstance._solution={accountSid:e,domainSid:i};AuthTypeCallsListInstance._credentialListMappings=undefined;AuthTypeCallsListInstance._ipAccessControlListMappings=undefined;Object.defineProperty(AuthTypeCallsListInstance,"credentialListMappings",{get:function credentialListMappings(){if(!this._credentialListMappings){this._credentialListMappings=new s(this._version,this._solution.accountSid,this._solution.domainSid)}return this._credentialListMappings}});Object.defineProperty(AuthTypeCallsListInstance,"ipAccessControlListMappings",{get:function ipAccessControlListMappings(){if(!this._ipAccessControlListMappings){this._ipAccessControlListMappings=new r(this._version,this._solution.accountSid,this._solution.domainSid)}return this._ipAccessControlListMappings}});AuthTypeCallsListInstance.toJSON=function toJSON(){return this._solution};AuthTypeCallsListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return AuthTypeCallsListInstance};t.exports={AuthTypeCallsList:c}},81060:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AuthCallsCredentialListMappingList(t,e,i){function AuthCallsCredentialListMappingListInstance(t){return AuthCallsCredentialListMappingListInstance.get(t)}AuthCallsCredentialListMappingListInstance._version=t;AuthCallsCredentialListMappingListInstance._solution={accountSid:e,domainSid:i};AuthCallsCredentialListMappingListInstance._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Calls/CredentialListMappings.json`;AuthCallsCredentialListMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.credentialListSid)){throw new Error('Required parameter "opts.credentialListSid" missing.')}var i=n.defer();var s=a.of({CredentialListSid:o.get(t,"credentialListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsCredentialListMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AuthCallsCredentialListMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AuthCallsCredentialListMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsCredentialListMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsCredentialListMappingListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.domainSid,t)};AuthCallsCredentialListMappingListInstance.toJSON=function toJSON(){return this._solution};AuthCallsCredentialListMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthCallsCredentialListMappingListInstance};h=function AuthCallsCredentialListMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.domainSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AuthCallsCredentialListMappingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this._context=undefined;this._solution={accountSid:i,domainSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.domainSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AuthCallsCredentialListMappingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,domainSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Calls/CredentialListMappings/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthCallsCredentialListMappingList:u,AuthCallsCredentialListMappingPage:h,AuthCallsCredentialListMappingInstance:f,AuthCallsCredentialListMappingContext:p}},61668:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AuthCallsIpAccessControlListMappingList(t,e,i){function AuthCallsIpAccessControlListMappingListInstance(t){return AuthCallsIpAccessControlListMappingListInstance.get(t)}AuthCallsIpAccessControlListMappingListInstance._version=t;AuthCallsIpAccessControlListMappingListInstance._solution={accountSid:e,domainSid:i};AuthCallsIpAccessControlListMappingListInstance._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Calls/IpAccessControlListMappings.json`;AuthCallsIpAccessControlListMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.ipAccessControlListSid)){throw new Error('Required parameter "opts.ipAccessControlListSid" missing.')}var i=n.defer();var s=a.of({IpAccessControlListSid:o.get(t,"ipAccessControlListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsIpAccessControlListMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AuthCallsIpAccessControlListMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AuthCallsIpAccessControlListMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsIpAccessControlListMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsIpAccessControlListMappingListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.domainSid,t)};AuthCallsIpAccessControlListMappingListInstance.toJSON=function toJSON(){return this._solution};AuthCallsIpAccessControlListMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthCallsIpAccessControlListMappingListInstance};h=function AuthCallsIpAccessControlListMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.domainSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AuthCallsIpAccessControlListMappingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this._context=undefined;this._solution={accountSid:i,domainSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.domainSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AuthCallsIpAccessControlListMappingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,domainSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Calls/IpAccessControlListMappings/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthCallsIpAccessControlListMappingList:u,AuthCallsIpAccessControlListMappingPage:h,AuthCallsIpAccessControlListMappingInstance:f,AuthCallsIpAccessControlListMappingContext:p}},64360:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(71061).AuthRegistrationsCredentialListMappingList;var r;r=function AuthTypeRegistrationsList(t,e,i){function AuthTypeRegistrationsListInstance(t){return AuthTypeRegistrationsListInstance.get(t)}AuthTypeRegistrationsListInstance._version=t;AuthTypeRegistrationsListInstance._solution={accountSid:e,domainSid:i};AuthTypeRegistrationsListInstance._credentialListMappings=undefined;Object.defineProperty(AuthTypeRegistrationsListInstance,"credentialListMappings",{get:function credentialListMappings(){if(!this._credentialListMappings){this._credentialListMappings=new s(this._version,this._solution.accountSid,this._solution.domainSid)}return this._credentialListMappings}});AuthTypeRegistrationsListInstance.toJSON=function toJSON(){return this._solution};AuthTypeRegistrationsListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return AuthTypeRegistrationsListInstance};t.exports={AuthTypeRegistrationsList:r}},71061:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AuthRegistrationsCredentialListMappingList(t,e,i){function AuthRegistrationsCredentialListMappingListInstance(t){return AuthRegistrationsCredentialListMappingListInstance.get(t)}AuthRegistrationsCredentialListMappingListInstance._version=t;AuthRegistrationsCredentialListMappingListInstance._solution={accountSid:e,domainSid:i};AuthRegistrationsCredentialListMappingListInstance._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Registrations/CredentialListMappings.json`;AuthRegistrationsCredentialListMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.credentialListSid)){throw new Error('Required parameter "opts.credentialListSid" missing.')}var i=n.defer();var s=a.of({CredentialListSid:o.get(t,"credentialListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthRegistrationsCredentialListMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AuthRegistrationsCredentialListMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AuthRegistrationsCredentialListMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthRegistrationsCredentialListMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthRegistrationsCredentialListMappingListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.domainSid,t)};AuthRegistrationsCredentialListMappingListInstance.toJSON=function toJSON(){return this._solution};AuthRegistrationsCredentialListMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthRegistrationsCredentialListMappingListInstance};h=function AuthRegistrationsCredentialListMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.domainSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AuthRegistrationsCredentialListMappingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this._context=undefined;this._solution={accountSid:i,domainSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.domainSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AuthRegistrationsCredentialListMappingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,domainSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Registrations/CredentialListMappings/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthRegistrationsCredentialListMappingList:u,AuthRegistrationsCredentialListMappingPage:h,AuthRegistrationsCredentialListMappingInstance:f,AuthRegistrationsCredentialListMappingContext:p}},29456:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CredentialListMappingList(t,e,i){function CredentialListMappingListInstance(t){return CredentialListMappingListInstance.get(t)}CredentialListMappingListInstance._version=t;CredentialListMappingListInstance._solution={accountSid:e,domainSid:i};CredentialListMappingListInstance._uri=`/Accounts/${e}/SIP/Domains/${i}/CredentialListMappings.json`;CredentialListMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.credentialListSid)){throw new Error('Required parameter "opts.credentialListSid" missing.')}var i=n.defer();var s=a.of({CredentialListSid:o.get(t,"credentialListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListMappingListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.domainSid,t)};CredentialListMappingListInstance.toJSON=function toJSON(){return this._solution};CredentialListMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListMappingListInstance};h=function CredentialListMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.domainSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CredentialListMappingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.uri=e.uri;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,domainSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.domainSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialListMappingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,domainSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/Domains/${i}/CredentialListMappings/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialListMappingList:u,CredentialListMappingPage:h,CredentialListMappingInstance:f,CredentialListMappingContext:p}},99642:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function IpAccessControlListMappingList(t,e,i){function IpAccessControlListMappingListInstance(t){return IpAccessControlListMappingListInstance.get(t)}IpAccessControlListMappingListInstance._version=t;IpAccessControlListMappingListInstance._solution={accountSid:e,domainSid:i};IpAccessControlListMappingListInstance._uri=`/Accounts/${e}/SIP/Domains/${i}/IpAccessControlListMappings.json`;IpAccessControlListMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.ipAccessControlListSid)){throw new Error('Required parameter "opts.ipAccessControlListSid" missing.')}var i=n.defer();var s=a.of({IpAccessControlListSid:o.get(t,"ipAccessControlListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IpAccessControlListMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IpAccessControlListMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListMappingListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.domainSid,t)};IpAccessControlListMappingListInstance.toJSON=function toJSON(){return this._solution};IpAccessControlListMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IpAccessControlListMappingListInstance};h=function IpAccessControlListMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.domainSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function IpAccessControlListMappingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.uri=e.uri;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,domainSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.domainSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function IpAccessControlListMappingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,domainSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/Domains/${i}/IpAccessControlListMappings/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IpAccessControlListMappingList:u,IpAccessControlListMappingPage:h,IpAccessControlListMappingInstance:f,IpAccessControlListMappingContext:p}},5319:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(78465).IpAddressList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function IpAccessControlListList(t,e){function IpAccessControlListListInstance(t){return IpAccessControlListListInstance.get(t)}IpAccessControlListListInstance._version=t;IpAccessControlListListInstance._solution={accountSid:e};IpAccessControlListListInstance._uri=`/Accounts/${e}/SIP/IpAccessControlLists.json`;IpAccessControlListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IpAccessControlListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IpAccessControlListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};IpAccessControlListListInstance.toJSON=function toJSON(){return this._solution};IpAccessControlListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IpAccessControlListListInstance};f=function IpAccessControlListPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function IpAccessControlListInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=a.rfc2822DateTime(e.date_created);this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.ipAddresses=function ipAddresses(){return this._proxy.ipAddresses};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function IpAccessControlListContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/SIP/IpAccessControlLists/${i}.json`;this._ipAddresses=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"ipAddresses",{get:function(){if(!this._ipAddresses){this._ipAddresses=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._ipAddresses}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IpAccessControlListList:h,IpAccessControlListPage:f,IpAccessControlListInstance:p,IpAccessControlListContext:d}},78465:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function IpAddressList(t,e,i){function IpAddressListInstance(t){return IpAddressListInstance.get(t)}IpAddressListInstance._version=t;IpAddressListInstance._solution={accountSid:e,ipAccessControlListSid:i};IpAddressListInstance._uri=`/Accounts/${e}/SIP/IpAccessControlLists/${i}/IpAddresses.json`;IpAddressListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IpAddressListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IpAddressListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAddressListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAddressListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.ipAddress)){throw new Error('Required parameter "opts.ipAddress" missing.')}var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),IpAddress:o.get(t,"ipAddress"),CidrPrefixLength:o.get(t,"cidrPrefixLength")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.ipAccessControlListSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAddressListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.ipAccessControlListSid,t)};IpAddressListInstance.toJSON=function toJSON(){return this._solution};IpAddressListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IpAddressListInstance};h=function IpAddressPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.ipAccessControlListSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function IpAddressInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.ipAddress=e.ip_address;this.cidrPrefixLength=c.integer(e.cidr_prefix_length);this.ipAccessControlListSid=e.ip_access_control_list_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,ipAccessControlListSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.ipAccessControlListSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function IpAddressContext(t,e,i,n){this._version=t;this._solution={accountSid:e,ipAccessControlListSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/IpAccessControlLists/${i}/IpAddresses/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.ipAccessControlListSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({IpAddress:o.get(t,"ipAddress"),FriendlyName:o.get(t,"friendlyName"),CidrPrefixLength:o.get(t,"cidrPrefixLength")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.ipAccessControlListSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IpAddressList:u,IpAddressPage:h,IpAddressInstance:f,IpAddressContext:p}},87639:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function TokenList(t,e){function TokenListInstance(t){return TokenListInstance.get(t)}TokenListInstance._version=t;TokenListInstance._solution={accountSid:e};TokenListInstance._uri=`/Accounts/${e}/Tokens.json`;TokenListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Ttl:o.get(t,"ttl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TokenListInstance.toJSON=function toJSON(){return this._solution};TokenListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TokenListInstance};h=function TokenPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TokenInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.iceServers=e.ice_servers;this.password=e.password;this.ttl=e.ttl;this.username=e.username;this._context=undefined;this._solution={accountSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TokenList:u,TokenPage:h,TokenInstance:f}},84673:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TranscriptionList(t,e){function TranscriptionListInstance(t){return TranscriptionListInstance.get(t)}TranscriptionListInstance._version=t;TranscriptionListInstance._solution={accountSid:e};TranscriptionListInstance._uri=`/Accounts/${e}/Transcriptions.json`;TranscriptionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TranscriptionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TranscriptionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TranscriptionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TranscriptionListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};TranscriptionListInstance.toJSON=function toJSON(){return this._solution};TranscriptionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TranscriptionListInstance};h=function TranscriptionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TranscriptionInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.duration=e.duration;this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.recordingSid=e.recording_sid;this.sid=e.sid;this.status=e.status;this.transcriptionText=e.transcription_text;this.type=e.type;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TranscriptionContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Transcriptions/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TranscriptionList:u,TranscriptionPage:h,TranscriptionInstance:f,TranscriptionContext:p}},22812:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(35284).RecordList;var r=i(36431).TriggerList;var c;c=function UsageList(t,e){function UsageListInstance(t){return UsageListInstance.get(t)}UsageListInstance._version=t;UsageListInstance._solution={accountSid:e};UsageListInstance._records=undefined;UsageListInstance._triggers=undefined;Object.defineProperty(UsageListInstance,"records",{get:function records(){if(!this._records){this._records=new s(this._version,this._solution.accountSid)}return this._records}});Object.defineProperty(UsageListInstance,"triggers",{get:function triggers(){if(!this._triggers){this._triggers=new r(this._version,this._solution.accountSid)}return this._triggers}});UsageListInstance.toJSON=function toJSON(){return this._solution};UsageListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return UsageListInstance};t.exports={UsageList:c}},35284:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(31425).AllTimeList;var c=i(82870).DailyList;var a=i(94550).LastMonthList;var u=i(95054).MonthlyList;var h=i(60938);var f=i(5046).ThisMonthList;var p=i(68529).TodayList;var d=i(7563).YearlyList;var l=i(11821).YesterdayList;var v=i(80513);var m=i(6372);var _=i(72142);var g;var y;var S;g=function RecordList(t,e){function RecordListInstance(t){return RecordListInstance.get(t)}RecordListInstance._version=t;RecordListInstance._solution={accountSid:e};RecordListInstance._uri=`/Accounts/${e}/Usage/Records.json`;RecordListInstance._allTime=undefined;RecordListInstance._daily=undefined;RecordListInstance._lastMonth=undefined;RecordListInstance._monthly=undefined;RecordListInstance._thisMonth=undefined;RecordListInstance._today=undefined;RecordListInstance._yearly=undefined;RecordListInstance._yesterday=undefined;RecordListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RecordListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RecordListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({Category:o.get(t,"category"),StartDate:m.iso8601Date(o.get(t,"startDate")),EndDate:m.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:m.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(RecordListInstance,"allTime",{get:function allTime(){if(!this._allTime){this._allTime=new r(this._version,this._solution.accountSid)}return this._allTime}});Object.defineProperty(RecordListInstance,"daily",{get:function daily(){if(!this._daily){this._daily=new c(this._version,this._solution.accountSid)}return this._daily}});Object.defineProperty(RecordListInstance,"lastMonth",{get:function lastMonth(){if(!this._lastMonth){this._lastMonth=new a(this._version,this._solution.accountSid)}return this._lastMonth}});Object.defineProperty(RecordListInstance,"monthly",{get:function monthly(){if(!this._monthly){this._monthly=new u(this._version,this._solution.accountSid)}return this._monthly}});Object.defineProperty(RecordListInstance,"thisMonth",{get:function thisMonth(){if(!this._thisMonth){this._thisMonth=new f(this._version,this._solution.accountSid)}return this._thisMonth}});Object.defineProperty(RecordListInstance,"today",{get:function today(){if(!this._today){this._today=new p(this._version,this._solution.accountSid)}return this._today}});Object.defineProperty(RecordListInstance,"yearly",{get:function yearly(){if(!this._yearly){this._yearly=new d(this._version,this._solution.accountSid)}return this._yearly}});Object.defineProperty(RecordListInstance,"yesterday",{get:function yesterday(){if(!this._yesterday){this._yesterday=new l(this._version,this._solution.accountSid)}return this._yesterday}});RecordListInstance.toJSON=function toJSON(){return this._solution};RecordListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordListInstance};y=function RecordPage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(y.prototype,h.prototype);y.prototype.constructor=y;y.prototype.getInstance=function getInstance(t){return new S(this._version,t,this._solution.accountSid)};y.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};S=function RecordInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=v.iso8601Date(e.end_date);this.price=v.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=v.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};S.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};S.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordList:g,RecordPage:y,RecordInstance:S}},31425:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function AllTimeList(t,e){function AllTimeListInstance(t){return AllTimeListInstance.get(t)}AllTimeListInstance._version=t;AllTimeListInstance._solution={accountSid:e};AllTimeListInstance._uri=`/Accounts/${e}/Usage/Records/AllTime.json`;AllTimeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AllTimeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AllTimeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AllTimeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AllTimeListInstance.toJSON=function toJSON(){return this._solution};AllTimeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AllTimeListInstance};f=function AllTimePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AllTimeInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AllTimeList:h,AllTimePage:f,AllTimeInstance:p}},82870:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function DailyList(t,e){function DailyListInstance(t){return DailyListInstance.get(t)}DailyListInstance._version=t;DailyListInstance._solution={accountSid:e};DailyListInstance._uri=`/Accounts/${e}/Usage/Records/Daily.json`;DailyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DailyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DailyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DailyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DailyListInstance.toJSON=function toJSON(){return this._solution};DailyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DailyListInstance};f=function DailyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DailyInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DailyList:h,DailyPage:f,DailyInstance:p}},94550:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function LastMonthList(t,e){function LastMonthListInstance(t){return LastMonthListInstance.get(t)}LastMonthListInstance._version=t;LastMonthListInstance._solution={accountSid:e};LastMonthListInstance._uri=`/Accounts/${e}/Usage/Records/LastMonth.json`;LastMonthListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};LastMonthListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};LastMonthListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LastMonthListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LastMonthListInstance.toJSON=function toJSON(){return this._solution};LastMonthListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return LastMonthListInstance};f=function LastMonthPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function LastMonthInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={LastMonthList:h,LastMonthPage:f,LastMonthInstance:p}},95054:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function MonthlyList(t,e){function MonthlyListInstance(t){return MonthlyListInstance.get(t)}MonthlyListInstance._version=t;MonthlyListInstance._solution={accountSid:e};MonthlyListInstance._uri=`/Accounts/${e}/Usage/Records/Monthly.json`;MonthlyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MonthlyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MonthlyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MonthlyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MonthlyListInstance.toJSON=function toJSON(){return this._solution};MonthlyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MonthlyListInstance};f=function MonthlyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MonthlyInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MonthlyList:h,MonthlyPage:f,MonthlyInstance:p}},5046:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function ThisMonthList(t,e){function ThisMonthListInstance(t){return ThisMonthListInstance.get(t)}ThisMonthListInstance._version=t;ThisMonthListInstance._solution={accountSid:e};ThisMonthListInstance._uri=`/Accounts/${e}/Usage/Records/ThisMonth.json`;ThisMonthListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ThisMonthListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ThisMonthListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ThisMonthListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ThisMonthListInstance.toJSON=function toJSON(){return this._solution};ThisMonthListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ThisMonthListInstance};f=function ThisMonthPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ThisMonthInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ThisMonthList:h,ThisMonthPage:f,ThisMonthInstance:p}},68529:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function TodayList(t,e){function TodayListInstance(t){return TodayListInstance.get(t)}TodayListInstance._version=t;TodayListInstance._solution={accountSid:e};TodayListInstance._uri=`/Accounts/${e}/Usage/Records/Today.json`;TodayListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TodayListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TodayListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TodayListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TodayListInstance.toJSON=function toJSON(){return this._solution};TodayListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TodayListInstance};f=function TodayPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TodayInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TodayList:h,TodayPage:f,TodayInstance:p}},7563:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function YearlyList(t,e){function YearlyListInstance(t){return YearlyListInstance.get(t)}YearlyListInstance._version=t;YearlyListInstance._solution={accountSid:e};YearlyListInstance._uri=`/Accounts/${e}/Usage/Records/Yearly.json`;YearlyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};YearlyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};YearlyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};YearlyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};YearlyListInstance.toJSON=function toJSON(){return this._solution};YearlyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return YearlyListInstance};f=function YearlyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function YearlyInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={YearlyList:h,YearlyPage:f,YearlyInstance:p}},11821:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function YesterdayList(t,e){function YesterdayListInstance(t){return YesterdayListInstance.get(t)}YesterdayListInstance._version=t;YesterdayListInstance._solution={accountSid:e};YesterdayListInstance._uri=`/Accounts/${e}/Usage/Records/Yesterday.json`;YesterdayListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};YesterdayListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};YesterdayListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};YesterdayListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};YesterdayListInstance.toJSON=function toJSON(){return this._solution};YesterdayListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return YesterdayListInstance};f=function YesterdayPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function YesterdayInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={YesterdayList:h,YesterdayPage:f,YesterdayInstance:p}},36431:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TriggerList(t,e){function TriggerListInstance(t){return TriggerListInstance.get(t)}TriggerListInstance._version=t;TriggerListInstance._solution={accountSid:e};TriggerListInstance._uri=`/Accounts/${e}/Usage/Triggers.json`;TriggerListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.callbackUrl)){throw new Error('Required parameter "opts.callbackUrl" missing.')}if(o.isUndefined(t.triggerValue)){throw new Error('Required parameter "opts.triggerValue" missing.')}if(o.isUndefined(t.usageCategory)){throw new Error('Required parameter "opts.usageCategory" missing.')}var i=n.defer();var s=a.of({CallbackUrl:o.get(t,"callbackUrl"),TriggerValue:o.get(t,"triggerValue"),UsageCategory:o.get(t,"usageCategory"),CallbackMethod:o.get(t,"callbackMethod"),FriendlyName:o.get(t,"friendlyName"),Recurring:o.get(t,"recurring"),TriggerBy:o.get(t,"triggerBy")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TriggerListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TriggerListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TriggerListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Recurring:o.get(t,"recurring"),TriggerBy:o.get(t,"triggerBy"),UsageCategory:o.get(t,"usageCategory"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TriggerListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TriggerListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};TriggerListInstance.toJSON=function toJSON(){return this._solution};TriggerListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TriggerListInstance};h=function TriggerPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TriggerInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callbackMethod=e.callback_method;this.callbackUrl=e.callback_url;this.currentValue=e.current_value;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateFired=c.rfc2822DateTime(e.date_fired);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.recurring=e.recurring;this.sid=e.sid;this.triggerBy=e.trigger_by;this.triggerValue=e.trigger_value;this.uri=e.uri;this.usageCategory=e.usage_category;this.usageRecordUri=e.usage_record_uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TriggerContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Usage/Triggers/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TriggerList:u,TriggerPage:h,TriggerInstance:f,TriggerContext:p}},86218:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function ValidationRequestList(t,e){function ValidationRequestListInstance(t){return ValidationRequestListInstance.get(t)}ValidationRequestListInstance._version=t;ValidationRequestListInstance._solution={accountSid:e};ValidationRequestListInstance._uri=`/Accounts/${e}/OutgoingCallerIds.json`;ValidationRequestListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumber)){throw new Error('Required parameter "opts.phoneNumber" missing.')}var i=n.defer();var s=c.of({PhoneNumber:o.get(t,"phoneNumber"),FriendlyName:o.get(t,"friendlyName"),CallDelay:o.get(t,"callDelay"),Extension:o.get(t,"extension"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ValidationRequestListInstance.toJSON=function toJSON(){return this._solution};ValidationRequestListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ValidationRequestListInstance};u=function ValidationRequestPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.accountSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ValidationRequestInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.callSid=e.call_sid;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.validationCode=e.validation_code;this._context=undefined;this._solution={accountSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ValidationRequestList:a,ValidationRequestPage:u,ValidationRequestInstance:h}},6522:(t,e,i)=>{"use strict";var n=i(90250);var o=i(86432).AssistantList;var s=i(68679).RestoreAssistantList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._assistants=undefined;this._restoreAssistant=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"assistants",{get:function(){this._assistants=this._assistants||new o(this);return this._assistants}});Object.defineProperty(V1.prototype,"restoreAssistant",{get:function(){this._restoreAssistant=this._restoreAssistant||new s(this);return this._restoreAssistant}});t.exports=V1},86432:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(72436).DefaultsList;var c=i(12256).DialogueList;var a=i(802).FieldTypeList;var u=i(18876).ModelBuildList;var h=i(60938);var f=i(26163).QueryList;var p=i(7122).StyleSheetList;var d=i(57106).TaskList;var l=i(27171).WebhookList;var v=i(80513);var m=i(6372);var _=i(72142);var g;var y;var S;var b;g=function AssistantList(t){function AssistantListInstance(t){return AssistantListInstance.get(t)}AssistantListInstance._version=t;AssistantListInstance._solution={};AssistantListInstance._uri=`/Assistants`;AssistantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssistantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssistantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({FriendlyName:o.get(t,"friendlyName"),LogQueries:m.bool(o.get(t,"logQueries")),UniqueName:o.get(t,"uniqueName"),CallbackUrl:o.get(t,"callbackUrl"),CallbackEvents:o.get(t,"callbackEvents"),StyleSheet:m.object(o.get(t,"styleSheet")),Defaults:m.object(o.get(t,"defaults"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new S(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.get=function get(t){return new b(this._version,t)};AssistantListInstance.toJSON=function toJSON(){return this._solution};AssistantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssistantListInstance};y=function AssistantPage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(y.prototype,h.prototype);y.prototype.constructor=y;y.prototype.getInstance=function getInstance(t){return new S(this._version,t)};y.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};S=function AssistantInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.dateCreated=v.iso8601DateTime(e.date_created);this.dateUpdated=v.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.latestModelBuildSid=e.latest_model_build_sid;this.links=e.links;this.logQueries=e.log_queries;this.developmentStage=e.development_stage;this.needsModelBuild=e.needs_model_build;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this.callbackUrl=e.callback_url;this.callbackEvents=e.callback_events;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(S.prototype,"_proxy",{get:function(){if(!this._context){this._context=new b(this._version,this._solution.sid)}return this._context}});S.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};S.prototype.update=function update(t,e){return this._proxy.update(t,e)};S.prototype.remove=function remove(t){return this._proxy.remove(t)};S.prototype.fieldTypes=function fieldTypes(){return this._proxy.fieldTypes};S.prototype.tasks=function tasks(){return this._proxy.tasks};S.prototype.modelBuilds=function modelBuilds(){return this._proxy.modelBuilds};S.prototype.queries=function queries(){return this._proxy.queries};S.prototype.styleSheet=function styleSheet(){return this._proxy.styleSheet};S.prototype.defaults=function defaults(){return this._proxy.defaults};S.prototype.dialogues=function dialogues(){return this._proxy.dialogues};S.prototype.webhooks=function webhooks(){return this._proxy.webhooks};S.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};S.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};b=function AssistantContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Assistants/${e}`;this._fieldTypes=undefined;this._tasks=undefined;this._modelBuilds=undefined;this._queries=undefined;this._styleSheet=undefined;this._defaults=undefined;this._dialogues=undefined;this._webhooks=undefined};b.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new S(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};b.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({FriendlyName:o.get(t,"friendlyName"),LogQueries:m.bool(o.get(t,"logQueries")),UniqueName:o.get(t,"uniqueName"),CallbackUrl:o.get(t,"callbackUrl"),CallbackEvents:o.get(t,"callbackEvents"),StyleSheet:m.object(o.get(t,"styleSheet")),Defaults:m.object(o.get(t,"defaults")),DevelopmentStage:o.get(t,"developmentStage")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new S(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};b.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(b.prototype,"fieldTypes",{get:function(){if(!this._fieldTypes){this._fieldTypes=new a(this._version,this._solution.sid)}return this._fieldTypes}});Object.defineProperty(b.prototype,"tasks",{get:function(){if(!this._tasks){this._tasks=new d(this._version,this._solution.sid)}return this._tasks}});Object.defineProperty(b.prototype,"modelBuilds",{get:function(){if(!this._modelBuilds){this._modelBuilds=new u(this._version,this._solution.sid)}return this._modelBuilds}});Object.defineProperty(b.prototype,"queries",{get:function(){if(!this._queries){this._queries=new f(this._version,this._solution.sid)}return this._queries}});Object.defineProperty(b.prototype,"styleSheet",{get:function(){if(!this._styleSheet){this._styleSheet=new p(this._version,this._solution.sid)}return this._styleSheet}});Object.defineProperty(b.prototype,"defaults",{get:function(){if(!this._defaults){this._defaults=new r(this._version,this._solution.sid)}return this._defaults}});Object.defineProperty(b.prototype,"dialogues",{get:function(){if(!this._dialogues){this._dialogues=new c(this._version,this._solution.sid)}return this._dialogues}});Object.defineProperty(b.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new l(this._version,this._solution.sid)}return this._webhooks}});b.prototype.toJSON=function toJSON(){return this._solution};b.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssistantList:g,AssistantPage:y,AssistantInstance:S,AssistantContext:b}},72436:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function DefaultsList(t,e){function DefaultsListInstance(t){return DefaultsListInstance.get(t)}DefaultsListInstance._version=t;DefaultsListInstance._solution={assistantSid:e};DefaultsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid)};DefaultsListInstance.toJSON=function toJSON(){return this._solution};DefaultsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DefaultsListInstance};h=function DefaultsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DefaultsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DefaultsContext(t,e){this._version=t;this._solution={assistantSid:e};this._uri=`/Assistants/${e}/Defaults`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Defaults:c.object(o.get(t,"defaults"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DefaultsList:u,DefaultsPage:h,DefaultsInstance:f,DefaultsContext:p}},12256:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function DialogueList(t,e){function DialogueListInstance(t){return DialogueListInstance.get(t)}DialogueListInstance._version=t;DialogueListInstance._solution={assistantSid:e};DialogueListInstance.get=function get(t){return new f(this._version,this._solution.assistantSid,t)};DialogueListInstance.toJSON=function toJSON(){return this._solution};DialogueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DialogueListInstance};u=function DialoguePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.assistantSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function DialogueInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.data=e.data;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DialogueContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Dialogues/${i}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DialogueList:a,DialoguePage:u,DialogueInstance:h,DialogueContext:f}},802:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(1927).FieldValueList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function FieldTypeList(t,e){function FieldTypeListInstance(t){return FieldTypeListInstance.get(t)}FieldTypeListInstance._version=t;FieldTypeListInstance._solution={assistantSid:e};FieldTypeListInstance._uri=`/Assistants/${e}/FieldTypes`;FieldTypeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldTypeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldTypeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.get=function get(t){return new d(this._version,this._solution.assistantSid,t)};FieldTypeListInstance.toJSON=function toJSON(){return this._solution};FieldTypeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldTypeListInstance};f=function FieldTypePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.assistantSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldTypeInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.links=e.links;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fieldValues=function fieldValues(){return this._proxy.fieldValues};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FieldTypeContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/FieldTypes/${i}`;this._fieldValues=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"fieldValues",{get:function(){if(!this._fieldValues){this._fieldValues=new r(this._version,this._solution.assistantSid,this._solution.sid)}return this._fieldValues}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldTypeList:h,FieldTypePage:f,FieldTypeInstance:p,FieldTypeContext:d}},1927:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FieldValueList(t,e,i){function FieldValueListInstance(t){return FieldValueListInstance.get(t)}FieldValueListInstance._version=t;FieldValueListInstance._solution={assistantSid:e,fieldTypeSid:i};FieldValueListInstance._uri=`/Assistants/${e}/FieldTypes/${i}/FieldValues`;FieldValueListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldValueListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldValueListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.value)){throw new Error('Required parameter "opts.value" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),Value:o.get(t,"value"),SynonymOf:o.get(t,"synonymOf")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.fieldTypeSid,t)};FieldValueListInstance.toJSON=function toJSON(){return this._solution};FieldValueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldValueListInstance};h=function FieldValuePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FieldValueInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.fieldTypeSid=e.field_type_sid;this.language=e.language;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.value=e.value;this.url=e.url;this.synonymOf=e.synonym_of;this._context=undefined;this._solution={assistantSid:i,fieldTypeSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldValueContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,fieldTypeSid:i,sid:n};this._uri=`/Assistants/${e}/FieldTypes/${i}/FieldValues/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldValueList:u,FieldValuePage:h,FieldValueInstance:f,FieldValueContext:p}},18876:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ModelBuildList(t,e){function ModelBuildListInstance(t){return ModelBuildListInstance.get(t)}ModelBuildListInstance._version=t;ModelBuildListInstance._solution={assistantSid:e};ModelBuildListInstance._uri=`/Assistants/${e}/ModelBuilds`;ModelBuildListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ModelBuildListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ModelBuildListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({StatusCallback:o.get(t,"statusCallback"),UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,t)};ModelBuildListInstance.toJSON=function toJSON(){return this._solution};ModelBuildListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ModelBuildListInstance};h=function ModelBuildPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ModelBuildInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.assistantSid=e.assistant_sid;this.sid=e.sid;this.status=e.status;this.uniqueName=e.unique_name;this.url=e.url;this.buildDuration=c.integer(e.build_duration);this.errorCode=c.integer(e.error_code);this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ModelBuildContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/ModelBuilds/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ModelBuildList:u,ModelBuildPage:h,ModelBuildInstance:f,ModelBuildContext:p}},26163:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function QueryList(t,e){function QueryListInstance(t){return QueryListInstance.get(t)}QueryListInstance._version=t;QueryListInstance._solution={assistantSid:e};QueryListInstance._uri=`/Assistants/${e}/Queries`;QueryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};QueryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};QueryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),ModelBuild:o.get(t,"modelBuild"),Status:o.get(t,"status"),DialogueSid:o.get(t,"dialogueSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.query)){throw new Error('Required parameter "opts.query" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),Query:o.get(t,"query"),Tasks:o.get(t,"tasks"),ModelBuild:o.get(t,"modelBuild")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,t)};QueryListInstance.toJSON=function toJSON(){return this._solution};QueryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return QueryListInstance};h=function QueryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function QueryInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.results=e.results;this.language=e.language;this.modelBuildSid=e.model_build_sid;this.query=e.query;this.sampleSid=e.sample_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.status=e.status;this.url=e.url;this.sourceChannel=e.source_channel;this.dialogueSid=e.dialogue_sid;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function QueryContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Queries/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({SampleSid:o.get(t,"sampleSid"),Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={QueryList:u,QueryPage:h,QueryInstance:f,QueryContext:p}},7122:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function StyleSheetList(t,e){function StyleSheetListInstance(t){return StyleSheetListInstance.get(t)}StyleSheetListInstance._version=t;StyleSheetListInstance._solution={assistantSid:e};StyleSheetListInstance.get=function get(){return new p(this._version,this._solution.assistantSid)};StyleSheetListInstance.toJSON=function toJSON(){return this._solution};StyleSheetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return StyleSheetListInstance};h=function StyleSheetPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function StyleSheetInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function StyleSheetContext(t,e){this._version=t;this._solution={assistantSid:e};this._uri=`/Assistants/${e}/StyleSheet`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({StyleSheet:c.object(o.get(t,"styleSheet"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={StyleSheetList:u,StyleSheetPage:h,StyleSheetInstance:f,StyleSheetContext:p}},57106:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(58890).FieldList;var c=i(60938);var a=i(75161).SampleList;var u=i(93076).TaskActionsList;var h=i(5664).TaskStatisticsList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function TaskList(t,e){function TaskListInstance(t){return TaskListInstance.get(t)}TaskListInstance._version=t;TaskListInstance._solution={assistantSid:e};TaskListInstance._uri=`/Assistants/${e}/Tasks`;TaskListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=d.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),Actions:p.object(o.get(t,"actions")),ActionsUrl:o.get(t,"actionsUrl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.get=function get(t){return new _(this._version,this._solution.assistantSid,t)};TaskListInstance.toJSON=function toJSON(){return this._solution};TaskListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskListInstance};v=function TaskPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,c.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t,this._solution.assistantSid)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function TaskInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.links=e.links;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.actionsUrl=e.actions_url;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.fields=function fields(){return this._proxy.fields};m.prototype.samples=function samples(){return this._proxy.samples};m.prototype.taskActions=function taskActions(){return this._proxy.taskActions};m.prototype.statistics=function statistics(){return this._proxy.statistics};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function TaskContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Tasks/${i}`;this._fields=undefined;this._samples=undefined;this._taskActions=undefined;this._statistics=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Actions:p.object(o.get(t,"actions")),ActionsUrl:o.get(t,"actionsUrl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(_.prototype,"fields",{get:function(){if(!this._fields){this._fields=new r(this._version,this._solution.assistantSid,this._solution.sid)}return this._fields}});Object.defineProperty(_.prototype,"samples",{get:function(){if(!this._samples){this._samples=new a(this._version,this._solution.assistantSid,this._solution.sid)}return this._samples}});Object.defineProperty(_.prototype,"taskActions",{get:function(){if(!this._taskActions){this._taskActions=new u(this._version,this._solution.assistantSid,this._solution.sid)}return this._taskActions}});Object.defineProperty(_.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new h(this._version,this._solution.assistantSid,this._solution.sid)}return this._statistics}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskList:l,TaskPage:v,TaskInstance:m,TaskContext:_}},58890:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FieldList(t,e,i){function FieldListInstance(t){return FieldListInstance.get(t)}FieldListInstance._version=t;FieldListInstance._solution={assistantSid:e,taskSid:i};FieldListInstance._uri=`/Assistants/${e}/Tasks/${i}/Fields`;FieldListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.fieldType)){throw new Error('Required parameter "opts.fieldType" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=a.of({FieldType:o.get(t,"fieldType"),UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.taskSid,t)};FieldListInstance.toJSON=function toJSON(){return this._solution};FieldListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldListInstance};h=function FieldPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FieldInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.fieldType=e.field_type;this.taskSid=e.task_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,taskSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,taskSid:i,sid:n};this._uri=`/Assistants/${e}/Tasks/${i}/Fields/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldList:u,FieldPage:h,FieldInstance:f,FieldContext:p}},75161:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SampleList(t,e,i){function SampleListInstance(t){return SampleListInstance.get(t)}SampleListInstance._version=t;SampleListInstance._solution={assistantSid:e,taskSid:i};SampleListInstance._uri=`/Assistants/${e}/Tasks/${i}/Samples`;SampleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SampleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SampleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.taggedText)){throw new Error('Required parameter "opts.taggedText" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),TaggedText:o.get(t,"taggedText"),SourceChannel:o.get(t,"sourceChannel")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.taskSid,t)};SampleListInstance.toJSON=function toJSON(){return this._solution};SampleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SampleListInstance};h=function SamplePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SampleInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.taskSid=e.task_sid;this.language=e.language;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.taggedText=e.tagged_text;this.url=e.url;this.sourceChannel=e.source_channel;this._context=undefined;this._solution={assistantSid:i,taskSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SampleContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,taskSid:i,sid:n};this._uri=`/Assistants/${e}/Tasks/${i}/Samples/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),TaggedText:o.get(t,"taggedText"),SourceChannel:o.get(t,"sourceChannel")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SampleList:u,SamplePage:h,SampleInstance:f,SampleContext:p}},93076:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function TaskActionsList(t,e,i){function TaskActionsListInstance(t){return TaskActionsListInstance.get(t)}TaskActionsListInstance._version=t;TaskActionsListInstance._solution={assistantSid:e,taskSid:i};TaskActionsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid,this._solution.taskSid)};TaskActionsListInstance.toJSON=function toJSON(){return this._solution};TaskActionsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskActionsListInstance};h=function TaskActionsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskActionsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.taskSid=e.task_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i,taskSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskActionsContext(t,e,i){this._version=t;this._solution={assistantSid:e,taskSid:i};this._uri=`/Assistants/${e}/Tasks/${i}/Actions`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Actions:c.object(o.get(t,"actions"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskActionsList:u,TaskActionsPage:h,TaskActionsInstance:f,TaskActionsContext:p}},5664:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TaskStatisticsList(t,e,i){function TaskStatisticsListInstance(t){return TaskStatisticsListInstance.get(t)}TaskStatisticsListInstance._version=t;TaskStatisticsListInstance._solution={assistantSid:e,taskSid:i};TaskStatisticsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid,this._solution.taskSid)};TaskStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskStatisticsListInstance};h=function TaskStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.taskSid=e.task_sid;this.samplesCount=c.integer(e.samples_count);this.fieldsCount=c.integer(e.fields_count);this.url=e.url;this._context=undefined;this._solution={assistantSid:i,taskSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskStatisticsContext(t,e,i){this._version=t;this._solution={assistantSid:e,taskSid:i};this._uri=`/Assistants/${e}/Tasks/${i}/Statistics`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskStatisticsList:u,TaskStatisticsPage:h,TaskStatisticsInstance:f,TaskStatisticsContext:p}},27171:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function WebhookList(t,e){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={assistantSid:e};WebhookListInstance._uri=`/Assistants/${e}/Webhooks`;WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}if(o.isUndefined(t.events)){throw new Error('Required parameter "opts.events" missing.')}if(o.isUndefined(t.webhookUrl)){throw new Error('Required parameter "opts.webhookUrl" missing.')}var i=n.defer();var s=a.of({UniqueName:o.get(t,"uniqueName"),Events:o.get(t,"events"),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};h=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WebhookInstance(t,e,i,n){this._version=t;this.url=e.url;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.events=e.events;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Webhooks/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({UniqueName:o.get(t,"uniqueName"),Events:o.get(t,"events"),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:u,WebhookPage:h,WebhookInstance:f,WebhookContext:p}},68679:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function RestoreAssistantList(t){function RestoreAssistantListInstance(t){return RestoreAssistantListInstance.get(t)}RestoreAssistantListInstance._version=t;RestoreAssistantListInstance._solution={};RestoreAssistantListInstance._uri=`/Assistants/Restore`;RestoreAssistantListInstance.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.assistant)){throw new Error('Required parameter "opts.assistant" missing.')}var i=n.defer();var s=a.of({Assistant:o.get(t,"assistant")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RestoreAssistantListInstance.toJSON=function toJSON(){return this._solution};RestoreAssistantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RestoreAssistantListInstance};h=function RestoreAssistantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function RestoreAssistantInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.uniqueName=e.unique_name;this.friendlyName=e.friendly_name;this.needsModelBuild=e.needs_model_build;this.latestModelBuildSid=e.latest_model_build_sid;this.logQueries=e.log_queries;this.developmentStage=e.development_stage;this.callbackUrl=e.callback_url;this.callbackEvents=e.callback_events;this._context=undefined;this._solution={}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RestoreAssistantList:u,RestoreAssistantPage:h,RestoreAssistantInstance:f}},51999:(t,e,i)=>{"use strict";var n=i(90250);var o=i(21256).ExportConfigurationList;var s=i(45832).ExportList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._exports=undefined;this._exportConfiguration=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"exports",{get:function(){this._exports=this._exports||new s(this);return this._exports}});Object.defineProperty(V1.prototype,"exportConfiguration",{get:function(){this._exportConfiguration=this._exportConfiguration||new o(this);return this._exportConfiguration}});t.exports=V1},45832:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(30521).DayList;var c=i(64555).ExportCustomJobList;var a=i(62753).JobList;var u=i(60938);var h=i(72142);var f;var p;var d;var l;f=function ExportList(t){function ExportListInstance(t){return ExportListInstance.get(t)}ExportListInstance._version=t;ExportListInstance._solution={};ExportListInstance._jobs=undefined;ExportListInstance.get=function get(t){return new l(this._version,t)};Object.defineProperty(ExportListInstance,"jobs",{get:function jobs(){if(!this._jobs){this._jobs=new a(this._version)}return this._jobs}});ExportListInstance.toJSON=function toJSON(){return this._solution};ExportListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportListInstance};p=function ExportPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,u.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ExportInstance(t,e,i){this._version=t;this.resourceType=e.resource_type;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={resourceType:i||this.resourceType}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.resourceType)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.days=function days(){return this._proxy.days};d.prototype.exportCustomJobs=function exportCustomJobs(){return this._proxy.exportCustomJobs};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ExportContext(t,e){this._version=t;this._solution={resourceType:e};this._uri=`/Exports/${e}`;this._days=undefined;this._exportCustomJobs=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.resourceType))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"days",{get:function(){if(!this._days){this._days=new r(this._version,this._solution.resourceType)}return this._days}});Object.defineProperty(l.prototype,"exportCustomJobs",{get:function(){if(!this._exportCustomJobs){this._exportCustomJobs=new c(this._version,this._solution.resourceType)}return this._exportCustomJobs}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportList:f,ExportPage:p,ExportInstance:d,ExportContext:l}},30521:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DayList(t,e){function DayListInstance(t){return DayListInstance.get(t)}DayListInstance._version=t;DayListInstance._solution={resourceType:e};DayListInstance._uri=`/Exports/${e}/Days`;DayListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DayListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DayListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DayListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DayListInstance.get=function get(t){return new p(this._version,this._solution.resourceType,t)};DayListInstance.toJSON=function toJSON(){return this._solution};DayListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DayListInstance};h=function DayPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.resourceType)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DayInstance(t,e,i,n){this._version=t;this.redirectTo=e.redirect_to;this.day=e.day;this.size=c.integer(e.size);this.createDate=e.create_date;this.friendlyName=e.friendly_name;this.resourceType=e.resource_type;this._context=undefined;this._solution={resourceType:i,day:n||this.day}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.resourceType,this._solution.day)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DayContext(t,e,i){this._version=t;this._solution={resourceType:e,day:i};this._uri=`/Exports/${e}/Days/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.resourceType,this._solution.day))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DayList:u,DayPage:h,DayInstance:f,DayContext:p}},64555:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function ExportCustomJobList(t,e){function ExportCustomJobListInstance(t){return ExportCustomJobListInstance.get(t)}ExportCustomJobListInstance._version=t;ExportCustomJobListInstance._solution={resourceType:e};ExportCustomJobListInstance._uri=`/Exports/${e}/Jobs`;ExportCustomJobListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExportCustomJobListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExportCustomJobListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.startDay)){throw new Error('Required parameter "opts.startDay" missing.')}if(o.isUndefined(t.endDay)){throw new Error('Required parameter "opts.endDay" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=c.of({StartDay:o.get(t,"startDay"),EndDay:o.get(t,"endDay"),FriendlyName:o.get(t,"friendlyName"),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),Email:o.get(t,"email")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.toJSON=function toJSON(){return this._solution};ExportCustomJobListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportCustomJobListInstance};u=function ExportCustomJobPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.resourceType)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExportCustomJobInstance(t,e,i){this._version=t;this.friendlyName=e.friendly_name;this.resourceType=e.resource_type;this.startDay=e.start_day;this.endDay=e.end_day;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.email=e.email;this.jobSid=e.job_sid;this.details=e.details;this._context=undefined;this._solution={resourceType:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportCustomJobList:a,ExportCustomJobPage:u,ExportCustomJobInstance:h}},62753:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function JobList(t){function JobListInstance(t){return JobListInstance.get(t)}JobListInstance._version=t;JobListInstance._solution={};JobListInstance.get=function get(t){return new f(this._version,t)};JobListInstance.toJSON=function toJSON(){return this._solution};JobListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return JobListInstance};u=function JobPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function JobInstance(t,e,i){this._version=t;this.resourceType=e.resource_type;this.friendlyName=e.friendly_name;this.details=e.details;this.startDay=e.start_day;this.endDay=e.end_day;this.jobSid=e.job_sid;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.email=e.email;this.url=e.url;this._context=undefined;this._solution={jobSid:i||this.jobSid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.jobSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.remove=function remove(t){return this._proxy.remove(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function JobContext(t,e){this._version=t;this._solution={jobSid:e};this._uri=`/Exports/Jobs/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.jobSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={JobList:a,JobPage:u,JobInstance:h,JobContext:f}},21256:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function ExportConfigurationList(t){function ExportConfigurationListInstance(t){return ExportConfigurationListInstance.get(t)}ExportConfigurationListInstance._version=t;ExportConfigurationListInstance._solution={};ExportConfigurationListInstance.get=function get(t){return new p(this._version,t)};ExportConfigurationListInstance.toJSON=function toJSON(){return this._solution};ExportConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportConfigurationListInstance};h=function ExportConfigurationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExportConfigurationInstance(t,e,i){this._version=t;this.enabled=e.enabled;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.resourceType=e.resource_type;this.url=e.url;this._context=undefined;this._solution={resourceType:i||this.resourceType}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.resourceType)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ExportConfigurationContext(t,e){this._version=t;this._solution={resourceType:e};this._uri=`/Exports/${e}/Configuration`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.resourceType))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Enabled:c.bool(o.get(t,"enabled")),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.resourceType))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportConfigurationList:u,ExportConfigurationPage:h,ExportConfigurationInstance:f,ExportConfigurationContext:p}},21772:(t,e,i)=>{"use strict";var n=i(90250);var o=i(6421).CredentialList;var s=i(41460).ServiceList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._credentials=undefined;this._services=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"credentials",{get:function(){this._credentials=this._credentials||new o(this);return this._credentials}});Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V1},65979:(t,e,i)=>{"use strict";var n=i(90250);var o=i(15538).CredentialList;var s=i(50326).ServiceList;var r=i(64351);function V2(t){r.prototype.constructor.call(this,t,"v2");this._credentials=undefined;this._services=undefined}n.extend(V2.prototype,r.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"credentials",{get:function(){this._credentials=this._credentials||new o(this);return this._credentials}});Object.defineProperty(V2.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V2},6421:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},41460:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(15715).ChannelList;var c=i(60938);var a=i(92186).RoleList;var u=i(54100).UserList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new m(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};l=function ServicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.defaultServiceRoleSid=e.default_service_role_sid;this.defaultChannelRoleSid=e.default_channel_role_sid;this.defaultChannelCreatorRoleSid=e.default_channel_creator_role_sid;this.readStatusEnabled=e.read_status_enabled;this.reachabilityEnabled=e.reachability_enabled;this.typingIndicatorTimeout=h.integer(e.typing_indicator_timeout);this.consumptionReportInterval=h.integer(e.consumption_report_interval);this.limits=e.limits;this.webhooks=e.webhooks;this.preWebhookUrl=e.pre_webhook_url;this.postWebhookUrl=e.post_webhook_url;this.webhookMethod=e.webhook_method;this.webhookFilters=e.webhook_filters;this.notifications=e.notifications;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.channels=function channels(){return this._proxy.channels};v.prototype.roles=function roles(){return this._proxy.roles};v.prototype.users=function users(){return this._proxy.users};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._channels=undefined;this._roles=undefined;this._users=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),DefaultServiceRoleSid:o.get(t,"defaultServiceRoleSid"),DefaultChannelRoleSid:o.get(t,"defaultChannelRoleSid"),DefaultChannelCreatorRoleSid:o.get(t,"defaultChannelCreatorRoleSid"),ReadStatusEnabled:f.bool(o.get(t,"readStatusEnabled")),ReachabilityEnabled:f.bool(o.get(t,"reachabilityEnabled")),TypingIndicatorTimeout:o.get(t,"typingIndicatorTimeout"),ConsumptionReportInterval:o.get(t,"consumptionReportInterval"),"Notifications.NewMessage.Enabled":f.bool(o.get(t,"notifications.newMessage.enabled")),"Notifications.NewMessage.Template":o.get(t,"notifications.newMessage.template"),"Notifications.AddedToChannel.Enabled":f.bool(o.get(t,"notifications.addedToChannel.enabled")),"Notifications.AddedToChannel.Template":o.get(t,"notifications.addedToChannel.template"),"Notifications.RemovedFromChannel.Enabled":f.bool(o.get(t,"notifications.removedFromChannel.enabled")),"Notifications.RemovedFromChannel.Template":o.get(t,"notifications.removedFromChannel.template"),"Notifications.InvitedToChannel.Enabled":f.bool(o.get(t,"notifications.invitedToChannel.enabled")),"Notifications.InvitedToChannel.Template":o.get(t,"notifications.invitedToChannel.template"),PreWebhookUrl:o.get(t,"preWebhookUrl"),PostWebhookUrl:o.get(t,"postWebhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),WebhookFilters:f.map(o.get(t,"webhookFilters"),function(t){return t}),"Webhooks.OnMessageSend.Url":o.get(t,"webhooks.onMessageSend.url"),"Webhooks.OnMessageSend.Method":o.get(t,"webhooks.onMessageSend.method"),"Webhooks.OnMessageUpdate.Url":o.get(t,"webhooks.onMessageUpdate.url"),"Webhooks.OnMessageUpdate.Method":o.get(t,"webhooks.onMessageUpdate.method"),"Webhooks.OnMessageRemove.Url":o.get(t,"webhooks.onMessageRemove.url"),"Webhooks.OnMessageRemove.Method":o.get(t,"webhooks.onMessageRemove.method"),"Webhooks.OnChannelAdd.Url":o.get(t,"webhooks.onChannelAdd.url"),"Webhooks.OnChannelAdd.Method":o.get(t,"webhooks.onChannelAdd.method"),"Webhooks.OnChannelDestroy.Url":o.get(t,"webhooks.onChannelDestroy.url"),"Webhooks.OnChannelDestroy.Method":o.get(t,"webhooks.onChannelDestroy.method"),"Webhooks.OnChannelUpdate.Url":o.get(t,"webhooks.onChannelUpdate.url"),"Webhooks.OnChannelUpdate.Method":o.get(t,"webhooks.onChannelUpdate.method"),"Webhooks.OnMemberAdd.Url":o.get(t,"webhooks.onMemberAdd.url"),"Webhooks.OnMemberAdd.Method":o.get(t,"webhooks.onMemberAdd.method"),"Webhooks.OnMemberRemove.Url":o.get(t,"webhooks.onMemberRemove.url"),"Webhooks.OnMemberRemove.Method":o.get(t,"webhooks.onMemberRemove.method"),"Webhooks.OnMessageSent.Url":o.get(t,"webhooks.onMessageSent.url"),"Webhooks.OnMessageSent.Method":o.get(t,"webhooks.onMessageSent.method"),"Webhooks.OnMessageUpdated.Url":o.get(t,"webhooks.onMessageUpdated.url"),"Webhooks.OnMessageUpdated.Method":o.get(t,"webhooks.onMessageUpdated.method"),"Webhooks.OnMessageRemoved.Url":o.get(t,"webhooks.onMessageRemoved.url"),"Webhooks.OnMessageRemoved.Method":o.get(t,"webhooks.onMessageRemoved.method"),"Webhooks.OnChannelAdded.Url":o.get(t,"webhooks.onChannelAdded.url"),"Webhooks.OnChannelAdded.Method":o.get(t,"webhooks.onChannelAdded.method"),"Webhooks.OnChannelDestroyed.Url":o.get(t,"webhooks.onChannelDestroyed.url"),"Webhooks.OnChannelDestroyed.Method":o.get(t,"webhooks.onChannelDestroyed.method"),"Webhooks.OnChannelUpdated.Url":o.get(t,"webhooks.onChannelUpdated.url"),"Webhooks.OnChannelUpdated.Method":o.get(t,"webhooks.onChannelUpdated.method"),"Webhooks.OnMemberAdded.Url":o.get(t,"webhooks.onMemberAdded.url"),"Webhooks.OnMemberAdded.Method":o.get(t,"webhooks.onMemberAdded.method"),"Webhooks.OnMemberRemoved.Url":o.get(t,"webhooks.onMemberRemoved.url"),"Webhooks.OnMemberRemoved.Method":o.get(t,"webhooks.onMemberRemoved.method"),"Limits.ChannelMembers":o.get(t,"limits.channelMembers"),"Limits.UserChannels":o.get(t,"limits.userChannels")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"channels",{get:function(){if(!this._channels){this._channels=new r(this._version,this._solution.sid)}return this._channels}});Object.defineProperty(m.prototype,"roles",{get:function(){if(!this._roles){this._roles=new a(this._version,this._solution.sid)}return this._roles}});Object.defineProperty(m.prototype,"users",{get:function(){if(!this._users){this._users=new u(this._version,this._solution.sid)}return this._users}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:d,ServicePage:l,ServiceInstance:v,ServiceContext:m}},15715:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(17512).InviteList;var c=i(95993).MemberList;var a=i(80444).MessageList;var u=i(60938);var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ChannelList(t,e){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={serviceSid:e};ChannelListInstance._uri=`/Services/${e}/Channels`;ChannelListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),Type:o.get(t,"type")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({Type:f.map(o.get(t,"type"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.get=function get(t){return new m(this._version,this._solution.serviceSid,t)};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};l=function ChannelPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,u.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.serviceSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ChannelInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.type=e.type;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this.membersCount=h.integer(e.members_count);this.messagesCount=h.integer(e.messages_count);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.members=function members(){return this._proxy.members};v.prototype.messages=function messages(){return this._proxy.messages};v.prototype.invites=function invites(){return this._proxy.invites};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ChannelContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Channels/${i}`;this._members=undefined;this._messages=undefined;this._invites=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"members",{get:function(){if(!this._members){this._members=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._members}});Object.defineProperty(m.prototype,"messages",{get:function(){if(!this._messages){this._messages=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._messages}});Object.defineProperty(m.prototype,"invites",{get:function(){if(!this._invites){this._invites=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._invites}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:d,ChannelPage:l,ChannelInstance:v,ChannelContext:m}},17512:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function InviteList(t,e,i){function InviteListInstance(t){return InviteListInstance.get(t)}InviteListInstance._version=t;InviteListInstance._solution={serviceSid:e,channelSid:i};InviteListInstance._uri=`/Services/${e}/Channels/${i}/Invites`;InviteListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InviteListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InviteListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};InviteListInstance.toJSON=function toJSON(){return this._solution};InviteListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InviteListInstance};f=function InvitePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InviteInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.createdBy=e.created_by;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function InviteContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Invites/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InviteList:h,InvitePage:f,InviteInstance:p,InviteContext:d}},95993:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MemberList(t,e,i){function MemberListInstance(t){return MemberListInstance.get(t)}MemberListInstance._version=t;MemberListInstance._solution={serviceSid:e,channelSid:i};MemberListInstance._uri=`/Services/${e}/Channels/${i}/Members`;MemberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MemberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MemberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MemberListInstance.toJSON=function toJSON(){return this._solution};MemberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MemberListInstance};f=function MemberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MemberInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.lastConsumptionTimestamp=c.iso8601DateTime(e.last_consumption_timestamp);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MemberContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Members/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MemberList:h,MemberPage:f,MemberInstance:p,MemberContext:d}},80444:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function MessageList(t,e,i){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={serviceSid:e,channelSid:i};MessageListInstance._uri=`/Services/${e}/Channels/${i}/Messages`;MessageListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.body)){throw new Error('Required parameter "opts.body" missing.')}var i=n.defer();var s=a.of({Body:o.get(t,"body"),From:o.get(t,"from"),Attributes:o.get(t,"attributes")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Order:o.get(t,"order"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};h=function MessagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.channelSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function MessageInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.attributes=e.attributes;this.serviceSid=e.service_sid;this.to=e.to;this.channelSid=e.channel_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.wasEdited=e.was_edited;this.from=e.from;this.body=e.body;this.index=c.integer(e.index);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessageContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Messages/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Body:o.get(t,"body"),Attributes:o.get(t,"attributes")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:u,MessagePage:h,MessageInstance:f,MessageContext:p}},92186:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t,e){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={serviceSid:e};RoleListInstance._uri=`/Services/${e}/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Roles/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},54100:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(55659).UserChannelList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function UserList(t,e){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={serviceSid:e};UserListInstance._uri=`/Services/${e}/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};f=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.attributes=e.attributes;this.friendlyName=e.friendly_name;this.roleSid=e.role_sid;this.identity=e.identity;this.isOnline=e.is_online;this.isNotifiable=e.is_notifiable;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.joinedChannelsCount=a.integer(e.joined_channels_count);this.links=e.links;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.userChannels=function userChannels(){return this._proxy.userChannels};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Users/${i}`;this._userChannels=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"userChannels",{get:function(){if(!this._userChannels){this._userChannels=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._userChannels}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:h,UserPage:f,UserInstance:p,UserContext:d}},55659:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function UserChannelList(t,e,i){function UserChannelListInstance(t){return UserChannelListInstance.get(t)}UserChannelListInstance._version=t;UserChannelListInstance._solution={serviceSid:e,userSid:i};UserChannelListInstance._uri=`/Services/${e}/Users/${i}/Channels`;UserChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.toJSON=function toJSON(){return this._solution};UserChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserChannelListInstance};h=function UserChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.userSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UserChannelInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.memberSid=e.member_sid;this.status=e.status;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.unreadMessagesCount=c.integer(e.unread_messages_count);this.links=e.links;this._context=undefined;this._solution={serviceSid:i,userSid:n}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserChannelList:u,UserChannelPage:h,UserChannelInstance:f}},15538:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},50326:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(20318).BindingList;var c=i(54286).ChannelList;var a=i(60938);var u=i(38583).RoleList;var h=i(28308).UserList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new _(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};v=function ServicePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,a.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.defaultServiceRoleSid=e.default_service_role_sid;this.defaultChannelRoleSid=e.default_channel_role_sid;this.defaultChannelCreatorRoleSid=e.default_channel_creator_role_sid;this.readStatusEnabled=e.read_status_enabled;this.reachabilityEnabled=e.reachability_enabled;this.typingIndicatorTimeout=f.integer(e.typing_indicator_timeout);this.consumptionReportInterval=f.integer(e.consumption_report_interval);this.limits=e.limits;this.preWebhookUrl=e.pre_webhook_url;this.postWebhookUrl=e.post_webhook_url;this.webhookMethod=e.webhook_method;this.webhookFilters=e.webhook_filters;this.preWebhookRetryCount=f.integer(e.pre_webhook_retry_count);this.postWebhookRetryCount=f.integer(e.post_webhook_retry_count);this.notifications=e.notifications;this.media=e.media;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.channels=function channels(){return this._proxy.channels};m.prototype.roles=function roles(){return this._proxy.roles};m.prototype.users=function users(){return this._proxy.users};m.prototype.bindings=function bindings(){return this._proxy.bindings};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._channels=undefined;this._roles=undefined;this._users=undefined;this._bindings=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),DefaultServiceRoleSid:o.get(t,"defaultServiceRoleSid"),DefaultChannelRoleSid:o.get(t,"defaultChannelRoleSid"),DefaultChannelCreatorRoleSid:o.get(t,"defaultChannelCreatorRoleSid"),ReadStatusEnabled:p.bool(o.get(t,"readStatusEnabled")),ReachabilityEnabled:p.bool(o.get(t,"reachabilityEnabled")),TypingIndicatorTimeout:o.get(t,"typingIndicatorTimeout"),ConsumptionReportInterval:o.get(t,"consumptionReportInterval"),"Notifications.NewMessage.Enabled":p.bool(o.get(t,"notifications.newMessage.enabled")),"Notifications.NewMessage.Template":o.get(t,"notifications.newMessage.template"),"Notifications.NewMessage.Sound":o.get(t,"notifications.newMessage.sound"),"Notifications.NewMessage.BadgeCountEnabled":p.bool(o.get(t,"notifications.newMessage.badgeCountEnabled")),"Notifications.AddedToChannel.Enabled":p.bool(o.get(t,"notifications.addedToChannel.enabled")),"Notifications.AddedToChannel.Template":o.get(t,"notifications.addedToChannel.template"),"Notifications.AddedToChannel.Sound":o.get(t,"notifications.addedToChannel.sound"),"Notifications.RemovedFromChannel.Enabled":p.bool(o.get(t,"notifications.removedFromChannel.enabled")),"Notifications.RemovedFromChannel.Template":o.get(t,"notifications.removedFromChannel.template"),"Notifications.RemovedFromChannel.Sound":o.get(t,"notifications.removedFromChannel.sound"),"Notifications.InvitedToChannel.Enabled":p.bool(o.get(t,"notifications.invitedToChannel.enabled")),"Notifications.InvitedToChannel.Template":o.get(t,"notifications.invitedToChannel.template"),"Notifications.InvitedToChannel.Sound":o.get(t,"notifications.invitedToChannel.sound"),PreWebhookUrl:o.get(t,"preWebhookUrl"),PostWebhookUrl:o.get(t,"postWebhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),WebhookFilters:p.map(o.get(t,"webhookFilters"),function(t){return t}),"Limits.ChannelMembers":o.get(t,"limits.channelMembers"),"Limits.UserChannels":o.get(t,"limits.userChannels"),"Media.CompatibilityMessage":o.get(t,"media.compatibilityMessage"),PreWebhookRetryCount:o.get(t,"preWebhookRetryCount"),PostWebhookRetryCount:o.get(t,"postWebhookRetryCount"),"Notifications.LogEnabled":p.bool(o.get(t,"notifications.logEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"channels",{get:function(){if(!this._channels){this._channels=new c(this._version,this._solution.sid)}return this._channels}});Object.defineProperty(_.prototype,"roles",{get:function(){if(!this._roles){this._roles=new u(this._version,this._solution.sid)}return this._roles}});Object.defineProperty(_.prototype,"users",{get:function(){if(!this._users){this._users=new h(this._version,this._solution.sid)}return this._users}});Object.defineProperty(_.prototype,"bindings",{get:function(){if(!this._bindings){this._bindings=new r(this._version,this._solution.sid)}return this._bindings}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:l,ServicePage:v,ServiceInstance:m,ServiceContext:_}},20318:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function BindingList(t,e){function BindingListInstance(t){return BindingListInstance.get(t)}BindingListInstance._version=t;BindingListInstance._solution={serviceSid:e};BindingListInstance._uri=`/Services/${e}/Bindings`;BindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({BindingType:a.map(o.get(t,"bindingType"),function(t){return t}),Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};BindingListInstance.toJSON=function toJSON(){return this._solution};BindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BindingListInstance};f=function BindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BindingInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.endpoint=e.endpoint;this.identity=e.identity;this.credentialSid=e.credential_sid;this.bindingType=e.binding_type;this.messageTypes=e.message_types;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BindingContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Bindings/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BindingList:h,BindingPage:f,BindingInstance:p,BindingContext:d}},54286:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(11107).InviteList;var c=i(71925).MemberList;var a=i(62885).MessageList;var u=i(60938);var h=i(33569).WebhookList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ChannelList(t,e){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={serviceSid:e};ChannelListInstance._uri=`/Services/${e}/Channels`;ChannelListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),Type:o.get(t,"type"),DateCreated:p.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:p.iso8601DateTime(o.get(t,"dateUpdated")),CreatedBy:o.get(t,"createdBy")});var r=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({Type:p.map(o.get(t,"type"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.get=function get(t){return new _(this._version,this._solution.serviceSid,t)};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};v=function ChannelPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,u.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t,this._solution.serviceSid)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ChannelInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.type=e.type;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this.membersCount=f.integer(e.members_count);this.messagesCount=f.integer(e.messages_count);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.members=function members(){return this._proxy.members};m.prototype.messages=function messages(){return this._proxy.messages};m.prototype.invites=function invites(){return this._proxy.invites};m.prototype.webhooks=function webhooks(){return this._proxy.webhooks};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ChannelContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Channels/${i}`;this._members=undefined;this._messages=undefined;this._invites=undefined;this._webhooks=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),DateCreated:p.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:p.iso8601DateTime(o.get(t,"dateUpdated")),CreatedBy:o.get(t,"createdBy")});var r=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"members",{get:function(){if(!this._members){this._members=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._members}});Object.defineProperty(_.prototype,"messages",{get:function(){if(!this._messages){this._messages=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._messages}});Object.defineProperty(_.prototype,"invites",{get:function(){if(!this._invites){this._invites=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._invites}});Object.defineProperty(_.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new h(this._version,this._solution.serviceSid,this._solution.sid)}return this._webhooks}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:l,ChannelPage:v,ChannelInstance:m,ChannelContext:_}},11107:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function InviteList(t,e,i){function InviteListInstance(t){return InviteListInstance.get(t)}InviteListInstance._version=t;InviteListInstance._solution={serviceSid:e,channelSid:i};InviteListInstance._uri=`/Services/${e}/Channels/${i}/Invites`;InviteListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InviteListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InviteListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};InviteListInstance.toJSON=function toJSON(){return this._solution};InviteListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InviteListInstance};f=function InvitePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InviteInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.createdBy=e.created_by;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function InviteContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Invites/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InviteList:h,InvitePage:f,InviteInstance:p,InviteContext:d}},71925:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MemberList(t,e,i){function MemberListInstance(t){return MemberListInstance.get(t)}MemberListInstance._version=t;MemberListInstance._solution={serviceSid:e,channelSid:i};MemberListInstance._uri=`/Services/${e}/Channels/${i}/Members`;MemberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp")),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MemberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MemberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MemberListInstance.toJSON=function toJSON(){return this._solution};MemberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MemberListInstance};f=function MemberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MemberInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.lastConsumptionTimestamp=c.iso8601DateTime(e.last_consumption_timestamp);this.url=e.url;this.attributes=e.attributes;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MemberContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Members/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp")),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MemberList:h,MemberPage:f,MemberInstance:p,MemberContext:d}},62885:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MessageList(t,e,i){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={serviceSid:e,channelSid:i};MessageListInstance._uri=`/Services/${e}/Channels/${i}/Messages`;MessageListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({From:o.get(t,"from"),Attributes:o.get(t,"attributes"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),LastUpdatedBy:o.get(t,"lastUpdatedBy"),Body:o.get(t,"body"),MediaSid:o.get(t,"mediaSid")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};f=function MessagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessageInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.attributes=e.attributes;this.serviceSid=e.service_sid;this.to=e.to;this.channelSid=e.channel_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.lastUpdatedBy=e.last_updated_by;this.wasEdited=e.was_edited;this.from=e.from;this.body=e.body;this.index=c.integer(e.index);this.type=e.type;this.media=e.media;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MessageContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Messages/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Body:o.get(t,"body"),Attributes:o.get(t,"attributes"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),LastUpdatedBy:o.get(t,"lastUpdatedBy"),From:o.get(t,"from")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:h,MessagePage:f,MessageInstance:p,MessageContext:d}},33569:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WebhookList(t,e,i){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={serviceSid:e,channelSid:i};WebhookListInstance._uri=`/Services/${e}/Channels/${i}/Webhooks`;WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.RetryCount":o.get(t,"configuration.retryCount")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};f=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.type=e.type;this.url=e.url;this.configuration=e.configuration;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WebhookContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Webhooks/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.RetryCount":o.get(t,"configuration.retryCount")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:h,WebhookPage:f,WebhookInstance:p,WebhookContext:d}},38583:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t,e){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={serviceSid:e};RoleListInstance._uri=`/Services/${e}/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Roles/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},28308:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(63282).UserBindingList;var a=i(17296).UserChannelList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function UserList(t,e){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={serviceSid:e};UserListInstance._uri=`/Services/${e}/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=h.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};p=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.attributes=e.attributes;this.friendlyName=e.friendly_name;this.roleSid=e.role_sid;this.identity=e.identity;this.isOnline=e.is_online;this.isNotifiable=e.is_notifiable;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.joinedChannelsCount=u.integer(e.joined_channels_count);this.links=e.links;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.userChannels=function userChannels(){return this._proxy.userChannels};d.prototype.userBindings=function userBindings(){return this._proxy.userBindings};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function UserContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Users/${i}`;this._userChannels=undefined;this._userBindings=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"userChannels",{get:function(){if(!this._userChannels){this._userChannels=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._userChannels}});Object.defineProperty(l.prototype,"userBindings",{get:function(){if(!this._userBindings){this._userBindings=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._userBindings}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:f,UserPage:p,UserInstance:d,UserContext:l}},63282:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function UserBindingList(t,e,i){function UserBindingListInstance(t){return UserBindingListInstance.get(t)}UserBindingListInstance._version=t;UserBindingListInstance._solution={serviceSid:e,userSid:i};UserBindingListInstance._uri=`/Services/${e}/Users/${i}/Bindings`;UserBindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserBindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserBindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({BindingType:a.map(o.get(t,"bindingType"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserBindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserBindingListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.userSid,t)};UserBindingListInstance.toJSON=function toJSON(){return this._solution};UserBindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserBindingListInstance};f=function UserBindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.userSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserBindingInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.endpoint=e.endpoint;this.identity=e.identity;this.userSid=e.user_sid;this.credentialSid=e.credential_sid;this.bindingType=e.binding_type;this.messageTypes=e.message_types;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,userSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.userSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserBindingContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,userSid:i,sid:n};this._uri=`/Services/${e}/Users/${i}/Bindings/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserBindingList:h,UserBindingPage:f,UserBindingInstance:p,UserBindingContext:d}},17296:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function UserChannelList(t,e,i){function UserChannelListInstance(t){return UserChannelListInstance.get(t)}UserChannelListInstance._version=t;UserChannelListInstance._solution={serviceSid:e,userSid:i};UserChannelListInstance._uri=`/Services/${e}/Users/${i}/Channels`;UserChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.userSid,t)};UserChannelListInstance.toJSON=function toJSON(){return this._solution};UserChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserChannelListInstance};f=function UserChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.userSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserChannelInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.userSid=e.user_sid;this.memberSid=e.member_sid;this.status=e.status;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.unreadMessagesCount=c.integer(e.unread_messages_count);this.links=e.links;this.url=e.url;this.notificationLevel=e.notification_level;this._context=undefined;this._solution={serviceSid:i,userSid:n,channelSid:o||this.channelSid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserChannelContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,userSid:i,channelSid:n};this._uri=`/Services/${e}/Users/${i}/Channels/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({NotificationLevel:o.get(t,"notificationLevel"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserChannelList:h,UserChannelPage:f,UserChannelInstance:p,UserChannelContext:d}},12918:(t,e,i)=>{"use strict";var n=i(90250);var o=i(49172).ConfigurationList;var s=i(59005).ConversationList;var r=i(37808).CredentialList;var c=i(93878).RoleList;var a=i(76801).ServiceList;var u=i(49906).UserList;var h=i(64351);function V1(t){h.prototype.constructor.call(this,t,"v1");this._configuration=undefined;this._conversations=undefined;this._credentials=undefined;this._roles=undefined;this._services=undefined;this._users=undefined}n.extend(V1.prototype,h.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"configuration",{get:function(){this._configuration=this._configuration||new o(this);return this._configuration}});Object.defineProperty(V1.prototype,"conversations",{get:function(){this._conversations=this._conversations||new s(this);return this._conversations}});Object.defineProperty(V1.prototype,"credentials",{get:function(){this._credentials=this._credentials||new r(this);return this._credentials}});Object.defineProperty(V1.prototype,"roles",{get:function(){this._roles=this._roles||new c(this);return this._roles}});Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new a(this);return this._services}});Object.defineProperty(V1.prototype,"users",{get:function(){this._users=this._users||new u(this);return this._users}});t.exports=V1},49172:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(87760).WebhookList;var a=i(72142);var u;var h;var f;var p;u=function ConfigurationList(t){function ConfigurationListInstance(t){return ConfigurationListInstance.get(t)}ConfigurationListInstance._version=t;ConfigurationListInstance._solution={};ConfigurationListInstance._webhooks=undefined;ConfigurationListInstance.get=function get(){return new p(this._version)};Object.defineProperty(ConfigurationListInstance,"webhooks",{get:function webhooks(){if(!this._webhooks){this._webhooks=new c(this._version)}return this._webhooks}});ConfigurationListInstance.toJSON=function toJSON(){return this._solution};ConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConfigurationListInstance};h=function ConfigurationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ConfigurationInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.defaultChatServiceSid=e.default_chat_service_sid;this.defaultMessagingServiceSid=e.default_messaging_service_sid;this.defaultInactiveTimer=e.default_inactive_timer;this.defaultClosedTimer=e.default_closed_timer;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConfigurationContext(t){this._version=t;this._solution={};this._uri=`/Configuration`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({DefaultChatServiceSid:o.get(t,"defaultChatServiceSid"),DefaultMessagingServiceSid:o.get(t,"defaultMessagingServiceSid"),DefaultInactiveTimer:o.get(t,"defaultInactiveTimer"),DefaultClosedTimer:o.get(t,"defaultClosedTimer")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConfigurationList:u,ConfigurationPage:h,ConfigurationInstance:f,ConfigurationContext:p}},87760:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function WebhookList(t){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={};WebhookListInstance.get=function get(){return new p(this._version)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};h=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WebhookInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.method=e.method;this.filters=e.filters;this.preWebhookUrl=e.pre_webhook_url;this.postWebhookUrl=e.post_webhook_url;this.target=e.target;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookContext(t){this._version=t;this._solution={};this._uri=`/Configuration/Webhooks`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Method:o.get(t,"method"),Filters:c.map(o.get(t,"filters"),function(t){return t}),PreWebhookUrl:o.get(t,"preWebhookUrl"),PostWebhookUrl:o.get(t,"postWebhookUrl"),Target:o.get(t,"target")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:u,WebhookPage:h,WebhookInstance:f,WebhookContext:p}},59005:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(21059).MessageList;var c=i(60938);var a=i(96614).ParticipantList;var u=i(82681).WebhookList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ConversationList(t){function ConversationListInstance(t){return ConversationListInstance.get(t)}ConversationListInstance._version=t;ConversationListInstance._solution={};ConversationListInstance._uri=`/Conversations`;ConversationListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),DateCreated:f.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:f.iso8601DateTime(o.get(t,"dateUpdated")),MessagingServiceSid:o.get(t,"messagingServiceSid"),Attributes:o.get(t,"attributes"),State:o.get(t,"state"),"Timers.Inactive":o.get(t,"timers.inactive"),"Timers.Closed":o.get(t,"timers.closed")});var r=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConversationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConversationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.get=function get(t){return new m(this._version,t)};ConversationListInstance.toJSON=function toJSON(){return this._solution};ConversationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConversationListInstance};l=function ConversationPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ConversationInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.messagingServiceSid=e.messaging_service_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.state=e.state;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.timers=e.timers;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.participants=function participants(){return this._proxy.participants};v.prototype.messages=function messages(){return this._proxy.messages};v.prototype.webhooks=function webhooks(){return this._proxy.webhooks};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ConversationContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Conversations/${e}`;this._participants=undefined;this._messages=undefined;this._webhooks=undefined};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),DateCreated:f.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:f.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),MessagingServiceSid:o.get(t,"messagingServiceSid"),State:o.get(t,"state"),"Timers.Inactive":o.get(t,"timers.inactive"),"Timers.Closed":o.get(t,"timers.closed"),UniqueName:o.get(t,"uniqueName")});var r=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"participants",{get:function(){if(!this._participants){this._participants=new a(this._version,this._solution.sid)}return this._participants}});Object.defineProperty(m.prototype,"messages",{get:function(){if(!this._messages){this._messages=new r(this._version,this._solution.sid)}return this._messages}});Object.defineProperty(m.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new u(this._version,this._solution.sid)}return this._webhooks}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConversationList:d,ConversationPage:l,ConversationInstance:v,ConversationContext:m}},21059:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(56284).DeliveryReceiptList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function MessageList(t,e){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={conversationSid:e};MessageListInstance._uri=`/Conversations/${e}/Messages`;MessageListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Author:o.get(t,"author"),Body:o.get(t,"body"),DateCreated:u.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:u.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),MediaSid:o.get(t,"mediaSid")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new l(this._version,this._solution.conversationSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};p=function MessagePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.conversationSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MessageInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.conversationSid=e.conversation_sid;this.sid=e.sid;this.index=a.integer(e.index);this.author=e.author;this.body=e.body;this.media=e.media;this.attributes=e.attributes;this.participantSid=e.participant_sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.delivery=e.delivery;this.links=e.links;this._context=undefined;this._solution={conversationSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.conversationSid,this._solution.sid)}return this._context}});d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.deliveryReceipts=function deliveryReceipts(){return this._proxy.deliveryReceipts};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function MessageContext(t,e,i){this._version=t;this._solution={conversationSid:e,sid:i};this._uri=`/Conversations/${e}/Messages/${i}`;this._deliveryReceipts=undefined};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Author:o.get(t,"author"),Body:o.get(t,"body"),DateCreated:u.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:u.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"deliveryReceipts",{get:function(){if(!this._deliveryReceipts){this._deliveryReceipts=new r(this._version,this._solution.conversationSid,this._solution.sid)}return this._deliveryReceipts}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:f,MessagePage:p,MessageInstance:d,MessageContext:l}},56284:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DeliveryReceiptList(t,e,i){function DeliveryReceiptListInstance(t){return DeliveryReceiptListInstance.get(t)}DeliveryReceiptListInstance._version=t;DeliveryReceiptListInstance._solution={conversationSid:e,messageSid:i};DeliveryReceiptListInstance._uri=`/Conversations/${e}/Messages/${i}/Receipts`;DeliveryReceiptListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DeliveryReceiptListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DeliveryReceiptListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeliveryReceiptListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeliveryReceiptListInstance.get=function get(t){return new p(this._version,this._solution.conversationSid,this._solution.messageSid,t)};DeliveryReceiptListInstance.toJSON=function toJSON(){return this._solution};DeliveryReceiptListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeliveryReceiptListInstance};h=function DeliveryReceiptPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.conversationSid,this._solution.messageSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DeliveryReceiptInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.conversationSid=e.conversation_sid;this.sid=e.sid;this.messageSid=e.message_sid;this.channelMessageSid=e.channel_message_sid;this.participantSid=e.participant_sid;this.status=e.status;this.errorCode=c.integer(e.error_code);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={conversationSid:i,messageSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.conversationSid,this._solution.messageSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeliveryReceiptContext(t,e,i,n){this._version=t;this._solution={conversationSid:e,messageSid:i,sid:n};this._uri=`/Conversations/${e}/Messages/${i}/Receipts/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.conversationSid,this._solution.messageSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeliveryReceiptList:u,DeliveryReceiptPage:h,DeliveryReceiptInstance:f,DeliveryReceiptContext:p}},96614:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ParticipantList(t,e){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={conversationSid:e};ParticipantListInstance._uri=`/Conversations/${e}/Participants`;ParticipantListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),"MessagingBinding.Address":o.get(t,"messagingBinding.address"),"MessagingBinding.ProxyAddress":o.get(t,"messagingBinding.proxyAddress"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),"MessagingBinding.ProjectedAddress":o.get(t,"messagingBinding.projectedAddress"),RoleSid:o.get(t,"roleSid")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new d(this._version,this._solution.conversationSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};f=function ParticipantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.conversationSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ParticipantInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.conversationSid=e.conversation_sid;this.sid=e.sid;this.identity=e.identity;this.attributes=e.attributes;this.messagingBinding=e.messaging_binding;this.roleSid=e.role_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={conversationSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.conversationSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ParticipantContext(t,e,i){this._version=t;this._solution={conversationSid:e,sid:i};this._uri=`/Conversations/${e}/Participants/${i}`};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid"),"MessagingBinding.ProxyAddress":o.get(t,"messagingBinding.proxyAddress"),"MessagingBinding.ProjectedAddress":o.get(t,"messagingBinding.projectedAddress"),Identity:o.get(t,"identity")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:h,ParticipantPage:f,ParticipantInstance:p,ParticipantContext:d}},82681:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WebhookList(t,e){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={conversationSid:e};WebhookListInstance._uri=`/Conversations/${e}/Webhooks`;WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.target)){throw new Error('Required parameter "opts.target" missing.')}var i=n.defer();var s=u.of({Target:o.get(t,"target"),"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.ReplayAfter":o.get(t,"configuration.replayAfter")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new d(this._version,this._solution.conversationSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};f=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.conversationSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.conversationSid=e.conversation_sid;this.target=e.target;this.url=e.url;this.configuration=e.configuration;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={conversationSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.conversationSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WebhookContext(t,e,i){this._version=t;this._solution={conversationSid:e,sid:i};this._uri=`/Conversations/${e}/Webhooks/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:h,WebhookPage:f,WebhookInstance:p,WebhookContext:d}},37808:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},93878:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={};RoleListInstance._uri=`/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Roles/${e}`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},76801:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(89718).BindingList;var c=i(13306).ConfigurationList;var a=i(1042).ConversationList;var u=i(60938);var h=i(92467).RoleList;var f=i(87141).UserList;var p=i(80513);var d=i(72142);var l;var v;var m;var _;l=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new _(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};v=function ServicePage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,u.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=p.iso8601DateTime(e.date_created);this.dateUpdated=p.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.sid)}return this._context}});m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.conversations=function conversations(){return this._proxy.conversations};m.prototype.bindings=function bindings(){return this._proxy.bindings};m.prototype.users=function users(){return this._proxy.users};m.prototype.roles=function roles(){return this._proxy.roles};m.prototype.configuration=function configuration(){return this._proxy.configuration};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._conversations=undefined;this._bindings=undefined;this._users=undefined;this._roles=undefined;this._configuration=undefined};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(_.prototype,"conversations",{get:function(){if(!this._conversations){this._conversations=new a(this._version,this._solution.sid)}return this._conversations}});Object.defineProperty(_.prototype,"bindings",{get:function(){if(!this._bindings){this._bindings=new r(this._version,this._solution.sid)}return this._bindings}});Object.defineProperty(_.prototype,"users",{get:function(){if(!this._users){this._users=new f(this._version,this._solution.sid)}return this._users}});Object.defineProperty(_.prototype,"roles",{get:function(){if(!this._roles){this._roles=new h(this._version,this._solution.sid)}return this._roles}});Object.defineProperty(_.prototype,"configuration",{get:function(){if(!this._configuration){this._configuration=new c(this._version,this._solution.sid)}return this._configuration}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:l,ServicePage:v,ServiceInstance:m,ServiceContext:_}},89718:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function BindingList(t,e){function BindingListInstance(t){return BindingListInstance.get(t)}BindingListInstance._version=t;BindingListInstance._solution={chatServiceSid:e};BindingListInstance._uri=`/Services/${e}/Bindings`;BindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({BindingType:a.map(o.get(t,"bindingType"),function(t){return t}),Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.get=function get(t){return new d(this._version,this._solution.chatServiceSid,t)};BindingListInstance.toJSON=function toJSON(){return this._solution};BindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BindingListInstance};f=function BindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.chatServiceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BindingInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.credentialSid=e.credential_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.endpoint=e.endpoint;this.identity=e.identity;this.bindingType=e.binding_type;this.messageTypes=e.message_types;this.url=e.url;this._context=undefined;this._solution={chatServiceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._context}});p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BindingContext(t,e,i){this._version=t;this._solution={chatServiceSid:e,sid:i};this._uri=`/Services/${e}/Bindings/${i}`};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BindingList:h,BindingPage:f,BindingInstance:p,BindingContext:d}},13306:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(94441).NotificationList;var c=i(60938);var a=i(72142);var u;var h;var f;var p;u=function ConfigurationList(t,e){function ConfigurationListInstance(t){return ConfigurationListInstance.get(t)}ConfigurationListInstance._version=t;ConfigurationListInstance._solution={chatServiceSid:e};ConfigurationListInstance._notifications=undefined;ConfigurationListInstance.get=function get(){return new p(this._version,this._solution.chatServiceSid)};Object.defineProperty(ConfigurationListInstance,"notifications",{get:function notifications(){if(!this._notifications){this._notifications=new r(this._version,this._solution.chatServiceSid)}return this._notifications}});ConfigurationListInstance.toJSON=function toJSON(){return this._solution};ConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConfigurationListInstance};h=function ConfigurationPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,c.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.chatServiceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ConfigurationInstance(t,e,i){this._version=t;this.chatServiceSid=e.chat_service_sid;this.defaultConversationCreatorRoleSid=e.default_conversation_creator_role_sid;this.defaultConversationRoleSid=e.default_conversation_role_sid;this.defaultChatServiceRoleSid=e.default_chat_service_role_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={chatServiceSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.chatServiceSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConfigurationContext(t,e){this._version=t;this._solution={chatServiceSid:e};this._uri=`/Services/${e}/Configuration`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.chatServiceSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({DefaultConversationCreatorRoleSid:o.get(t,"defaultConversationCreatorRoleSid"),DefaultConversationRoleSid:o.get(t,"defaultConversationRoleSid"),DefaultChatServiceRoleSid:o.get(t,"defaultChatServiceRoleSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.chatServiceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConfigurationList:u,ConfigurationPage:h,ConfigurationInstance:f,ConfigurationContext:p}},94441:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function NotificationList(t,e){function NotificationListInstance(t){return NotificationListInstance.get(t)}NotificationListInstance._version=t;NotificationListInstance._solution={chatServiceSid:e};NotificationListInstance.get=function get(){return new p(this._version,this._solution.chatServiceSid)};NotificationListInstance.toJSON=function toJSON(){return this._solution};NotificationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NotificationListInstance};h=function NotificationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.chatServiceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NotificationInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.newMessage=e.new_message;this.addedToConversation=e.added_to_conversation;this.removedFromConversation=e.removed_from_conversation;this.logEnabled=e.log_enabled;this.url=e.url;this._context=undefined;this._solution={chatServiceSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.chatServiceSid)}return this._context}});f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function NotificationContext(t,e){this._version=t;this._solution={chatServiceSid:e};this._uri=`/Services/${e}/Configuration/Notifications`};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({LogEnabled:c.bool(o.get(t,"logEnabled")),"NewMessage.Enabled":c.bool(o.get(t,"newMessage.enabled")),"NewMessage.Template":o.get(t,"newMessage.template"),"NewMessage.Sound":o.get(t,"newMessage.sound"),"NewMessage.BadgeCountEnabled":c.bool(o.get(t,"newMessage.badgeCountEnabled")),"AddedToConversation.Enabled":c.bool(o.get(t,"addedToConversation.enabled")),"AddedToConversation.Template":o.get(t,"addedToConversation.template"),"AddedToConversation.Sound":o.get(t,"addedToConversation.sound"),"RemovedFromConversation.Enabled":c.bool(o.get(t,"removedFromConversation.enabled")),"RemovedFromConversation.Template":o.get(t,"removedFromConversation.template"),"RemovedFromConversation.Sound":o.get(t,"removedFromConversation.sound")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.chatServiceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.chatServiceSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NotificationList:u,NotificationPage:h,NotificationInstance:f,NotificationContext:p}},1042:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(904).MessageList;var c=i(60938);var a=i(27459).ParticipantList;var u=i(73376).WebhookList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ConversationList(t,e){function ConversationListInstance(t){return ConversationListInstance.get(t)}ConversationListInstance._version=t;ConversationListInstance._solution={chatServiceSid:e};ConversationListInstance._uri=`/Services/${e}/Conversations`;ConversationListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),MessagingServiceSid:o.get(t,"messagingServiceSid"),DateCreated:f.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:f.iso8601DateTime(o.get(t,"dateUpdated")),State:o.get(t,"state"),"Timers.Inactive":o.get(t,"timers.inactive"),"Timers.Closed":o.get(t,"timers.closed")});var r=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new v(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConversationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConversationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.get=function get(t){return new m(this._version,this._solution.chatServiceSid,t)};ConversationListInstance.toJSON=function toJSON(){return this._solution};ConversationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConversationListInstance};l=function ConversationPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.chatServiceSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ConversationInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.messagingServiceSid=e.messaging_service_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.state=e.state;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.timers=e.timers;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={chatServiceSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._context}});v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.participants=function participants(){return this._proxy.participants};v.prototype.messages=function messages(){return this._proxy.messages};v.prototype.webhooks=function webhooks(){return this._proxy.webhooks};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ConversationContext(t,e,i){this._version=t;this._solution={chatServiceSid:e,sid:i};this._uri=`/Services/${e}/Conversations/${i}`;this._participants=undefined;this._messages=undefined;this._webhooks=undefined};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),DateCreated:f.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:f.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),MessagingServiceSid:o.get(t,"messagingServiceSid"),State:o.get(t,"state"),"Timers.Inactive":o.get(t,"timers.inactive"),"Timers.Closed":o.get(t,"timers.closed"),UniqueName:o.get(t,"uniqueName")});var r=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new v(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"participants",{get:function(){if(!this._participants){this._participants=new a(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._participants}});Object.defineProperty(m.prototype,"messages",{get:function(){if(!this._messages){this._messages=new r(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._messages}});Object.defineProperty(m.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new u(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._webhooks}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConversationList:d,ConversationPage:l,ConversationInstance:v,ConversationContext:m}},904:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(54210).DeliveryReceiptList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function MessageList(t,e,i){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={chatServiceSid:e,conversationSid:i};MessageListInstance._uri=`/Services/${e}/Conversations/${i}/Messages`;MessageListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Author:o.get(t,"author"),Body:o.get(t,"body"),DateCreated:u.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:u.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),MediaSid:o.get(t,"mediaSid")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new l(this._version,this._solution.chatServiceSid,this._solution.conversationSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};p=function MessagePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MessageInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.conversationSid=e.conversation_sid;this.sid=e.sid;this.index=a.integer(e.index);this.author=e.author;this.body=e.body;this.media=e.media;this.attributes=e.attributes;this.participantSid=e.participant_sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.delivery=e.delivery;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={chatServiceSid:i,conversationSid:n,sid:o||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid)}return this._context}});d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.deliveryReceipts=function deliveryReceipts(){return this._proxy.deliveryReceipts};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function MessageContext(t,e,i,n){this._version=t;this._solution={chatServiceSid:e,conversationSid:i,sid:n};this._uri=`/Services/${e}/Conversations/${i}/Messages/${n}`;this._deliveryReceipts=undefined};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Author:o.get(t,"author"),Body:o.get(t,"body"),DateCreated:u.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:u.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"deliveryReceipts",{get:function(){if(!this._deliveryReceipts){this._deliveryReceipts=new r(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid)}return this._deliveryReceipts}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:f,MessagePage:p,MessageInstance:d,MessageContext:l}},54210:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DeliveryReceiptList(t,e,i,r){function DeliveryReceiptListInstance(t){return DeliveryReceiptListInstance.get(t)}DeliveryReceiptListInstance._version=t;DeliveryReceiptListInstance._solution={chatServiceSid:e,conversationSid:i,messageSid:r};DeliveryReceiptListInstance._uri=`/Services/${e}/Conversations/${i}/Messages/${r}/Receipts`;DeliveryReceiptListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DeliveryReceiptListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DeliveryReceiptListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeliveryReceiptListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeliveryReceiptListInstance.get=function get(t){return new p(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.messageSid,t)};DeliveryReceiptListInstance.toJSON=function toJSON(){return this._solution};DeliveryReceiptListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeliveryReceiptListInstance};h=function DeliveryReceiptPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.messageSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DeliveryReceiptInstance(t,e,i,n,o,s){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.conversationSid=e.conversation_sid;this.messageSid=e.message_sid;this.sid=e.sid;this.channelMessageSid=e.channel_message_sid;this.participantSid=e.participant_sid;this.status=e.status;this.errorCode=c.integer(e.error_code);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={chatServiceSid:i,conversationSid:n,messageSid:o,sid:s||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.messageSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeliveryReceiptContext(t,e,i,n,o){this._version=t;this._solution={chatServiceSid:e,conversationSid:i,messageSid:n,sid:o};this._uri=`/Services/${e}/Conversations/${i}/Messages/${n}/Receipts/${o}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.messageSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeliveryReceiptList:u,DeliveryReceiptPage:h,DeliveryReceiptInstance:f,DeliveryReceiptContext:p}},27459:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ParticipantList(t,e,i){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={chatServiceSid:e,conversationSid:i};ParticipantListInstance._uri=`/Services/${e}/Conversations/${i}/Participants`;ParticipantListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),"MessagingBinding.Address":o.get(t,"messagingBinding.address"),"MessagingBinding.ProxyAddress":o.get(t,"messagingBinding.proxyAddress"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),"MessagingBinding.ProjectedAddress":o.get(t,"messagingBinding.projectedAddress"),RoleSid:o.get(t,"roleSid")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new d(this._version,this._solution.chatServiceSid,this._solution.conversationSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};f=function ParticipantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ParticipantInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.conversationSid=e.conversation_sid;this.sid=e.sid;this.identity=e.identity;this.attributes=e.attributes;this.messagingBinding=e.messaging_binding;this.roleSid=e.role_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={chatServiceSid:i,conversationSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ParticipantContext(t,e,i,n){this._version=t;this._solution={chatServiceSid:e,conversationSid:i,sid:n};this._uri=`/Services/${e}/Conversations/${i}/Participants/${n}`};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Identity:o.get(t,"identity"),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid"),"MessagingBinding.ProxyAddress":o.get(t,"messagingBinding.proxyAddress"),"MessagingBinding.ProjectedAddress":o.get(t,"messagingBinding.projectedAddress")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:h,ParticipantPage:f,ParticipantInstance:p,ParticipantContext:d}},73376:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WebhookList(t,e,i){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={chatServiceSid:e,conversationSid:i};WebhookListInstance._uri=`/Services/${e}/Conversations/${i}/Webhooks`;WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.target)){throw new Error('Required parameter "opts.target" missing.')}var i=n.defer();var s=u.of({Target:o.get(t,"target"),"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.ReplayAfter":o.get(t,"configuration.replayAfter")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new d(this._version,this._solution.chatServiceSid,this._solution.conversationSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};f=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.conversationSid=e.conversation_sid;this.target=e.target;this.url=e.url;this.configuration=e.configuration;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={chatServiceSid:i,conversationSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WebhookContext(t,e,i,n){this._version=t;this._solution={chatServiceSid:e,conversationSid:i,sid:n};this._uri=`/Services/${e}/Conversations/${i}/Webhooks/${n}`};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:h,WebhookPage:f,WebhookInstance:p,WebhookContext:d}},92467:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t,e){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={chatServiceSid:e};RoleListInstance._uri=`/Services/${e}/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,this._solution.chatServiceSid,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.chatServiceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={chatServiceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e,i){this._version=t;this._solution={chatServiceSid:e,sid:i};this._uri=`/Services/${e}/Roles/${i}`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},87141:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function UserList(t,e){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={chatServiceSid:e};UserListInstance._uri=`/Services/${e}/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=a.of({Identity:o.get(t,"identity"),FriendlyName:o.get(t,"friendlyName"),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid")});var r=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new f(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new p(this._version,this._solution.chatServiceSid,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};h=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.chatServiceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UserInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.roleSid=e.role_sid;this.identity=e.identity;this.friendlyName=e.friendly_name;this.attributes=e.attributes;this.isOnline=e.is_online;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={chatServiceSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._context}});f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserContext(t,e,i){this._version=t;this._solution={chatServiceSid:e,sid:i};this._uri=`/Services/${e}/Users/${i}`};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid")});var r=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new f(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:u,UserPage:h,UserInstance:f,UserContext:p}},49906:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function UserList(t){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={};UserListInstance._uri=`/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=a.of({Identity:o.get(t,"identity"),FriendlyName:o.get(t,"friendlyName"),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid")});var r=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new p(this._version,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};h=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UserInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.roleSid=e.role_sid;this.identity=e.identity;this.friendlyName=e.friendly_name;this.attributes=e.attributes;this.isOnline=e.is_online;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Users/${e}`};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid")});var r=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:u,UserPage:h,UserInstance:f,UserContext:p}},47767:(t,e,i)=>{"use strict";var n=i(90250);var o=i(4359).EventTypeList;var s=i(18983).SchemaList;var r=i(2434).SinkList;var c=i(97939).SubscriptionList;var a=i(64351);function V1(t){a.prototype.constructor.call(this,t,"v1");this._eventTypes=undefined;this._schemas=undefined;this._sinks=undefined;this._subscriptions=undefined}n.extend(V1.prototype,a.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"eventTypes",{get:function(){this._eventTypes=this._eventTypes||new o(this);return this._eventTypes}});Object.defineProperty(V1.prototype,"schemas",{get:function(){this._schemas=this._schemas||new s(this);return this._schemas}});Object.defineProperty(V1.prototype,"sinks",{get:function(){this._sinks=this._sinks||new r(this);return this._sinks}});Object.defineProperty(V1.prototype,"subscriptions",{get:function(){this._subscriptions=this._subscriptions||new c(this);return this._subscriptions}});t.exports=V1},4359:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function EventTypeList(t){function EventTypeListInstance(t){return EventTypeListInstance.get(t)}EventTypeListInstance._version=t;EventTypeListInstance._solution={};EventTypeListInstance._uri=`/Types`;EventTypeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EventTypeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EventTypeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventTypeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventTypeListInstance.get=function get(t){return new p(this._version,t)};EventTypeListInstance.toJSON=function toJSON(){return this._solution};EventTypeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EventTypeListInstance};h=function EventTypePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function EventTypeInstance(t,e,i){this._version=t;this.type=e.type;this.schemaId=e.schema_id;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.description=e.description;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={type:i||this.type}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.type)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function EventTypeContext(t,e){this._version=t;this._solution={type:e};this._uri=`/Types/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.type))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EventTypeList:u,EventTypePage:h,EventTypeInstance:f,EventTypeContext:p}},18983:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(54131).VersionList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function SchemaList(t){function SchemaListInstance(t){return SchemaListInstance.get(t)}SchemaListInstance._version=t;SchemaListInstance._solution={};SchemaListInstance.get=function get(t){return new d(this._version,t)};SchemaListInstance.toJSON=function toJSON(){return this._solution};SchemaListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SchemaListInstance};f=function SchemaPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SchemaInstance(t,e,i){this._version=t;this.id=e.id;this.url=e.url;this.links=e.links;this.lastCreated=a.iso8601DateTime(e.last_created);this.lastVersion=a.integer(e.last_version);this._context=undefined;this._solution={id:i||this.id}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.id)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.versions=function versions(){return this._proxy.versions};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SchemaContext(t,e){this._version=t;this._solution={id:e};this._uri=`/Schemas/${e}`;this._versions=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.id))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"versions",{get:function(){if(!this._versions){this._versions=new c(this._version,this._solution.id)}return this._versions}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SchemaList:h,SchemaPage:f,SchemaInstance:p,SchemaContext:d}},54131:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function VersionList(t,e){function VersionListInstance(t){return VersionListInstance.get(t)}VersionListInstance._version=t;VersionListInstance._solution={id:e};VersionListInstance._uri=`/Schemas/${e}/Versions`;VersionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};VersionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};VersionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VersionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VersionListInstance.get=function get(t){return new p(this._version,this._solution.id,t)};VersionListInstance.toJSON=function toJSON(){return this._solution};VersionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return VersionListInstance};h=function VersionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.id)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function VersionInstance(t,e,i,n){this._version=t;this.id=e.id;this.schemaVersion=c.integer(e.schema_version);this.dateCreated=c.iso8601DateTime(e.date_created);this.url=e.url;this.raw=e.raw;this._context=undefined;this._solution={id:i,schemaVersion:n||this.schemaVersion}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.id,this._solution.schemaVersion)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function VersionContext(t,e,i){this._version=t;this._solution={id:e,schemaVersion:i};this._uri=`/Schemas/${e}/Versions/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.id,this._solution.schemaVersion))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={VersionList:u,VersionPage:h,VersionInstance:f,VersionContext:p}},2434:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(89082).SinkTestList;var a=i(25105).SinkValidateList;var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function SinkList(t){function SinkListInstance(t){return SinkListInstance.get(t)}SinkListInstance._version=t;SinkListInstance._solution={};SinkListInstance._uri=`/Sinks`;SinkListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.description)){throw new Error('Required parameter "opts.description" missing.')}if(o.isUndefined(t.sinkConfiguration)){throw new Error('Required parameter "opts.sinkConfiguration" missing.')}if(o.isUndefined(t.sinkType)){throw new Error('Required parameter "opts.sinkType" missing.')}var i=n.defer();var s=f.of({Description:o.get(t,"description"),SinkConfiguration:h.object(o.get(t,"sinkConfiguration")),SinkType:o.get(t,"sinkType")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SinkListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SinkListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SinkListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SinkListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SinkListInstance.get=function get(t){return new v(this._version,t)};SinkListInstance.toJSON=function toJSON(){return this._solution};SinkListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SinkListInstance};d=function SinkPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,r.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SinkInstance(t,e,i){this._version=t;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.description=e.description;this.sid=e.sid;this.sinkConfiguration=e.sink_configuration;this.sinkType=e.sink_type;this.status=e.status;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.sinkTest=function sinkTest(){return this._proxy.sinkTest};l.prototype.sinkValidate=function sinkValidate(){return this._proxy.sinkValidate};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function SinkContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Sinks/${e}`;this._sinkTest=undefined;this._sinkValidate=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(v.prototype,"sinkTest",{get:function(){if(!this._sinkTest){this._sinkTest=new c(this._version,this._solution.sid)}return this._sinkTest}});Object.defineProperty(v.prototype,"sinkValidate",{get:function(){if(!this._sinkValidate){this._sinkValidate=new a(this._version,this._solution.sid)}return this._sinkValidate}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SinkList:p,SinkPage:d,SinkInstance:l,SinkContext:v}},89082:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function SinkTestList(t,e){function SinkTestListInstance(t){return SinkTestListInstance.get(t)}SinkTestListInstance._version=t;SinkTestListInstance._solution={sid:e};SinkTestListInstance._uri=`/Sinks/${e}/Test`;SinkTestListInstance.create=function create(t){var e=n.defer();var i=this._version.create({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new h(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};SinkTestListInstance.toJSON=function toJSON(){return this._solution};SinkTestListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SinkTestListInstance};u=function SinkTestPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.sid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function SinkTestInstance(t,e,i){this._version=t;this.result=e.result;this._context=undefined;this._solution={sid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SinkTestList:a,SinkTestPage:u,SinkTestInstance:h}},25105:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function SinkValidateList(t,e){function SinkValidateListInstance(t){return SinkValidateListInstance.get(t)}SinkValidateListInstance._version=t;SinkValidateListInstance._solution={sid:e};SinkValidateListInstance._uri=`/Sinks/${e}/Validate`;SinkValidateListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.testId)){throw new Error('Required parameter "opts.testId" missing.')}var i=n.defer();var s=c.of({TestId:o.get(t,"testId")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SinkValidateListInstance.toJSON=function toJSON(){return this._solution};SinkValidateListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SinkValidateListInstance};u=function SinkValidatePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.sid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function SinkValidateInstance(t,e,i){this._version=t;this.result=e.result;this._context=undefined;this._solution={sid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SinkValidateList:a,SinkValidatePage:u,SinkValidateInstance:h}},97939:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(2108).SubscribedEventList;var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function SubscriptionList(t){function SubscriptionListInstance(t){return SubscriptionListInstance.get(t)}SubscriptionListInstance._version=t;SubscriptionListInstance._solution={};SubscriptionListInstance._uri=`/Subscriptions`;SubscriptionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SubscriptionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SubscriptionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({SinkSid:o.get(t,"sinkSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscriptionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscriptionListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.description)){throw new Error('Required parameter "opts.description" missing.')}if(o.isUndefined(t.sinkSid)){throw new Error('Required parameter "opts.sinkSid" missing.')}if(o.isUndefined(t.types)){throw new Error('Required parameter "opts.types" missing.')}var i=n.defer();var s=h.of({Description:o.get(t,"description"),SinkSid:o.get(t,"sinkSid"),Types:u.map(o.get(t,"types"),function(t){return u.object(t)})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscriptionListInstance.get=function get(t){return new l(this._version,t)};SubscriptionListInstance.toJSON=function toJSON(){return this._solution};SubscriptionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SubscriptionListInstance};p=function SubscriptionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SubscriptionInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.description=e.description;this.sinkSid=e.sink_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.subscribedEvents=function subscribedEvents(){return this._proxy.subscribedEvents};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SubscriptionContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Subscriptions/${e}`;this._subscribedEvents=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Description:o.get(t,"description"),SinkSid:o.get(t,"sinkSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"subscribedEvents",{get:function(){if(!this._subscribedEvents){this._subscribedEvents=new c(this._version,this._solution.sid)}return this._subscribedEvents}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SubscriptionList:f,SubscriptionPage:p,SubscriptionInstance:d,SubscriptionContext:l}},2108:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function SubscribedEventList(t,e){function SubscribedEventListInstance(t){return SubscribedEventListInstance.get(t)}SubscribedEventListInstance._version=t;SubscribedEventListInstance._solution={subscriptionSid:e};SubscribedEventListInstance._uri=`/Subscriptions/${e}/SubscribedEvents`;SubscribedEventListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SubscribedEventListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SubscribedEventListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscribedEventListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscribedEventListInstance.toJSON=function toJSON(){return this._solution};SubscribedEventListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SubscribedEventListInstance};h=function SubscribedEventPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.subscriptionSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SubscribedEventInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.type=e.type;this.version=c.integer(e.version);this.subscriptionSid=e.subscription_sid;this.url=e.url;this._context=undefined;this._solution={subscriptionSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SubscribedEventList:u,SubscribedEventPage:h,SubscribedEventInstance:f}},23827:(t,e,i)=>{"use strict";var n=i(90250);var o=i(96879).FaxList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._faxes=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"faxes",{get:function(){this._faxes=this._faxes||new o(this);return this._faxes}});t.exports=V1},96879:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(68399).FaxMediaList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function FaxList(t){function FaxListInstance(t){return FaxListInstance.get(t)}FaxListInstance._version=t;FaxListInstance._solution={};FaxListInstance._uri=`/Faxes`;FaxListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FaxListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FaxListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({From:o.get(t,"from"),To:o.get(t,"to"),DateCreatedOnOrBefore:u.iso8601DateTime(o.get(t,"dateCreatedOnOrBefore")),DateCreatedAfter:u.iso8601DateTime(o.get(t,"dateCreatedAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FaxListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FaxListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.mediaUrl)){throw new Error('Required parameter "opts.mediaUrl" missing.')}var i=n.defer();var s=h.of({To:o.get(t,"to"),MediaUrl:o.get(t,"mediaUrl"),Quality:o.get(t,"quality"),StatusCallback:o.get(t,"statusCallback"),From:o.get(t,"from"),SipAuthUsername:o.get(t,"sipAuthUsername"),SipAuthPassword:o.get(t,"sipAuthPassword"),StoreMedia:u.bool(o.get(t,"storeMedia")),Ttl:o.get(t,"ttl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FaxListInstance.get=function get(t){return new l(this._version,t)};FaxListInstance.toJSON=function toJSON(){return this._solution};FaxListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FaxListInstance};p=function FaxPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FaxInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.from=e.from;this.to=e.to;this.quality=e.quality;this.mediaSid=e.media_sid;this.mediaUrl=e.media_url;this.numPages=a.integer(e.num_pages);this.duration=a.integer(e.duration);this.status=e.status;this.direction=e.direction;this.apiVersion=e.api_version;this.price=a.decimal(e.price);this.priceUnit=e.price_unit;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.links=e.links;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.media=function media(){return this._proxy.media};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function FaxContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Faxes/${e}`;this._media=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"media",{get:function(){if(!this._media){this._media=new r(this._version,this._solution.sid)}return this._media}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FaxList:f,FaxPage:p,FaxInstance:d,FaxContext:l}},68399:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FaxMediaList(t,e){function FaxMediaListInstance(t){return FaxMediaListInstance.get(t)}FaxMediaListInstance._version=t;FaxMediaListInstance._solution={faxSid:e};FaxMediaListInstance._uri=`/Faxes/${e}/Media`;FaxMediaListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FaxMediaListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FaxMediaListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FaxMediaListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FaxMediaListInstance.get=function get(t){return new p(this._version,this._solution.faxSid,t)};FaxMediaListInstance.toJSON=function toJSON(){return this._solution};FaxMediaListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FaxMediaListInstance};h=function FaxMediaPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.faxSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FaxMediaInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.faxSid=e.fax_sid;this.contentType=e.content_type;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={faxSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.faxSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FaxMediaContext(t,e,i){this._version=t;this._solution={faxSid:e,sid:i};this._uri=`/Faxes/${e}/Media/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.faxSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FaxMediaList:u,FaxMediaPage:h,FaxMediaInstance:f,FaxMediaContext:p}},47633:(t,e,i)=>{"use strict";var n=i(90250);var o=i(84596).ChannelList;var s=i(59150).ConfigurationList;var r=i(85854).FlexFlowList;var c=i(64351);var a=i(19769).WebChannelList;function V1(t){c.prototype.constructor.call(this,t,"v1");this._channel=undefined;this._configuration=undefined;this._flexFlow=undefined;this._webChannel=undefined}n.extend(V1.prototype,c.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"channel",{get:function(){this._channel=this._channel||new o(this);return this._channel}});Object.defineProperty(V1.prototype,"configuration",{get:function(){this._configuration=this._configuration||new s(this);return this._configuration}});Object.defineProperty(V1.prototype,"flexFlow",{get:function(){this._flexFlow=this._flexFlow||new r(this);return this._flexFlow}});Object.defineProperty(V1.prototype,"webChannel",{get:function(){this._webChannel=this._webChannel||new a(this);return this._webChannel}});t.exports=V1},84596:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ChannelList(t){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={};ChannelListInstance._uri=`/Channels`;ChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.flexFlowSid)){throw new Error('Required parameter "opts.flexFlowSid" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}if(o.isUndefined(t.chatUserFriendlyName)){throw new Error('Required parameter "opts.chatUserFriendlyName" missing.')}if(o.isUndefined(t.chatFriendlyName)){throw new Error('Required parameter "opts.chatFriendlyName" missing.')}var i=n.defer();var s=u.of({FlexFlowSid:o.get(t,"flexFlowSid"),Identity:o.get(t,"identity"),ChatUserFriendlyName:o.get(t,"chatUserFriendlyName"),ChatFriendlyName:o.get(t,"chatFriendlyName"),Target:o.get(t,"target"),ChatUniqueName:o.get(t,"chatUniqueName"),PreEngagementData:o.get(t,"preEngagementData"),TaskSid:o.get(t,"taskSid"),TaskAttributes:o.get(t,"taskAttributes"),LongLived:a.bool(o.get(t,"longLived"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.get=function get(t){return new d(this._version,t)};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};f=function ChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ChannelInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.flexFlowSid=e.flex_flow_sid;this.sid=e.sid;this.userSid=e.user_sid;this.taskSid=e.task_sid;this.url=e.url;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ChannelContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Channels/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:h,ChannelPage:f,ChannelInstance:p,ChannelContext:d}},59150:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ConfigurationList(t){function ConfigurationListInstance(t){return ConfigurationListInstance.get(t)}ConfigurationListInstance._version=t;ConfigurationListInstance._solution={};ConfigurationListInstance.get=function get(){return new p(this._version)};ConfigurationListInstance.toJSON=function toJSON(){return this._solution};ConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConfigurationListInstance};h=function ConfigurationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ConfigurationInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.attributes=e.attributes;this.status=e.status;this.taskrouterWorkspaceSid=e.taskrouter_workspace_sid;this.taskrouterTargetWorkflowSid=e.taskrouter_target_workflow_sid;this.taskrouterTargetTaskqueueSid=e.taskrouter_target_taskqueue_sid;this.taskrouterTaskqueues=e.taskrouter_taskqueues;this.taskrouterSkills=e.taskrouter_skills;this.taskrouterWorkerChannels=e.taskrouter_worker_channels;this.taskrouterWorkerAttributes=e.taskrouter_worker_attributes;this.taskrouterOfflineActivitySid=e.taskrouter_offline_activity_sid;this.runtimeDomain=e.runtime_domain;this.messagingServiceInstanceSid=e.messaging_service_instance_sid;this.chatServiceInstanceSid=e.chat_service_instance_sid;this.flexServiceInstanceSid=e.flex_service_instance_sid;this.uiLanguage=e.ui_language;this.uiAttributes=e.ui_attributes;this.uiDependencies=e.ui_dependencies;this.uiVersion=e.ui_version;this.serviceVersion=e.service_version;this.callRecordingEnabled=e.call_recording_enabled;this.callRecordingWebhookUrl=e.call_recording_webhook_url;this.crmEnabled=e.crm_enabled;this.crmType=e.crm_type;this.crmCallbackUrl=e.crm_callback_url;this.crmFallbackUrl=e.crm_fallback_url;this.crmAttributes=e.crm_attributes;this.publicAttributes=e.public_attributes;this.pluginServiceEnabled=e.plugin_service_enabled;this.pluginServiceAttributes=e.plugin_service_attributes;this.integrations=e.integrations;this.outboundCallFlows=e.outbound_call_flows;this.serverlessServiceSids=e.serverless_service_sids;this.queueStatsConfiguration=e.queue_stats_configuration;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.create=function create(t){return this._proxy.create(t)};f.prototype.update=function update(t){return this._proxy.update(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConfigurationContext(t){this._version=t;this._solution={};this._uri=`/Configuration`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({UiVersion:o.get(t,"uiVersion")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.create=function create(t){var e=n.defer();var i=this._version.create({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t){var e=n.defer();var i=this._version.update({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConfigurationList:u,ConfigurationPage:h,ConfigurationInstance:f,ConfigurationContext:p}},85854:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function FlexFlowList(t){function FlexFlowListInstance(t){return FlexFlowListInstance.get(t)}FlexFlowListInstance._version=t;FlexFlowListInstance._solution={};FlexFlowListInstance._uri=`/FlexFlows`;FlexFlowListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FlexFlowListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FlexFlowListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlexFlowListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlexFlowListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.chatServiceSid)){throw new Error('Required parameter "opts.chatServiceSid" missing.')}if(o.isUndefined(t.channelType)){throw new Error('Required parameter "opts.channelType" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),ChatServiceSid:o.get(t,"chatServiceSid"),ChannelType:o.get(t,"channelType"),ContactIdentity:o.get(t,"contactIdentity"),Enabled:a.bool(o.get(t,"enabled")),IntegrationType:o.get(t,"integrationType"),"Integration.FlowSid":o.get(t,"integration.flowSid"),"Integration.Url":o.get(t,"integration.url"),"Integration.WorkspaceSid":o.get(t,"integration.workspaceSid"),"Integration.WorkflowSid":o.get(t,"integration.workflowSid"),"Integration.Channel":o.get(t,"integration.channel"),"Integration.Timeout":o.get(t,"integration.timeout"),"Integration.Priority":o.get(t,"integration.priority"),"Integration.CreationOnMessage":a.bool(o.get(t,"integration.creationOnMessage")),LongLived:a.bool(o.get(t,"longLived")),JanitorEnabled:a.bool(o.get(t,"janitorEnabled")),"Integration.RetryCount":o.get(t,"integration.retryCount")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlexFlowListInstance.get=function get(t){return new d(this._version,t)};FlexFlowListInstance.toJSON=function toJSON(){return this._solution};FlexFlowListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlexFlowListInstance};f=function FlexFlowPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FlexFlowInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.sid=e.sid;this.friendlyName=e.friendly_name;this.chatServiceSid=e.chat_service_sid;this.channelType=e.channel_type;this.contactIdentity=e.contact_identity;this.enabled=e.enabled;this.integrationType=e.integration_type;this.integration=e.integration;this.longLived=e.long_lived;this.janitorEnabled=e.janitor_enabled;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FlexFlowContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/FlexFlows/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),ChatServiceSid:o.get(t,"chatServiceSid"),ChannelType:o.get(t,"channelType"),ContactIdentity:o.get(t,"contactIdentity"),Enabled:a.bool(o.get(t,"enabled")),IntegrationType:o.get(t,"integrationType"),"Integration.FlowSid":o.get(t,"integration.flowSid"),"Integration.Url":o.get(t,"integration.url"),"Integration.WorkspaceSid":o.get(t,"integration.workspaceSid"),"Integration.WorkflowSid":o.get(t,"integration.workflowSid"),"Integration.Channel":o.get(t,"integration.channel"),"Integration.Timeout":o.get(t,"integration.timeout"),"Integration.Priority":o.get(t,"integration.priority"),"Integration.CreationOnMessage":a.bool(o.get(t,"integration.creationOnMessage")),LongLived:a.bool(o.get(t,"longLived")),JanitorEnabled:a.bool(o.get(t,"janitorEnabled")),"Integration.RetryCount":o.get(t,"integration.retryCount")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlexFlowList:h,FlexFlowPage:f,FlexFlowInstance:p,FlexFlowContext:d}},19769:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function WebChannelList(t){function WebChannelListInstance(t){return WebChannelListInstance.get(t)}WebChannelListInstance._version=t;WebChannelListInstance._solution={};WebChannelListInstance._uri=`/WebChannels`;WebChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebChannelListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.flexFlowSid)){throw new Error('Required parameter "opts.flexFlowSid" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}if(o.isUndefined(t.customerFriendlyName)){throw new Error('Required parameter "opts.customerFriendlyName" missing.')}if(o.isUndefined(t.chatFriendlyName)){throw new Error('Required parameter "opts.chatFriendlyName" missing.')}var i=n.defer();var s=a.of({FlexFlowSid:o.get(t,"flexFlowSid"),Identity:o.get(t,"identity"),CustomerFriendlyName:o.get(t,"customerFriendlyName"),ChatFriendlyName:o.get(t,"chatFriendlyName"),ChatUniqueName:o.get(t,"chatUniqueName"),PreEngagementData:o.get(t,"preEngagementData")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebChannelListInstance.get=function get(t){return new p(this._version,t)};WebChannelListInstance.toJSON=function toJSON(){return this._solution};WebChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebChannelListInstance};h=function WebChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WebChannelInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.flexFlowSid=e.flex_flow_sid;this.sid=e.sid;this.url=e.url;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebChannelContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/WebChannels/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({ChatStatus:o.get(t,"chatStatus"),PostEngagementData:o.get(t,"postEngagementData")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebChannelList:u,WebChannelPage:h,WebChannelInstance:f,WebChannelContext:p}},46133:(t,e,i)=>{"use strict";var n=i(90250);var o=i(18097).CallList;var s=i(34571).RoomList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._calls=undefined;this._rooms=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"calls",{get:function(){this._calls=this._calls||new o(this);return this._calls}});Object.defineProperty(V1.prototype,"rooms",{get:function(){this._rooms=this._rooms||new s(this);return this._rooms}});t.exports=V1},18097:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(23344).CallSummaryList;var c=i(43552).EventList;var a=i(83756).MetricList;var u=i(60938);var h=i(72142);var f;var p;var d;var l;f=function CallList(t){function CallListInstance(t){return CallListInstance.get(t)}CallListInstance._version=t;CallListInstance._solution={};CallListInstance.get=function get(t){return new l(this._version,t)};CallListInstance.toJSON=function toJSON(){return this._solution};CallListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CallListInstance};p=function CallPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,u.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CallInstance(t,e,i){this._version=t;this.sid=e.sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.events=function events(){return this._proxy.events};d.prototype.metrics=function metrics(){return this._proxy.metrics};d.prototype.summary=function summary(){return this._proxy.summary};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function CallContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Voice/${e}`;this._events=undefined;this._metrics=undefined;this._summary=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"events",{get:function(){if(!this._events){this._events=new c(this._version,this._solution.sid)}return this._events}});Object.defineProperty(l.prototype,"metrics",{get:function(){if(!this._metrics){this._metrics=new a(this._version,this._solution.sid)}return this._metrics}});Object.defineProperty(l.prototype,"summary",{get:function(){if(!this._summary){this._summary=new r(this._version,this._solution.sid)}return this._summary}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CallList:f,CallPage:p,CallInstance:d,CallContext:l}},43552:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function EventList(t,e){function EventListInstance(t){return EventListInstance.get(t)}EventListInstance._version=t;EventListInstance._solution={callSid:e};EventListInstance._uri=`/Voice/${e}/Events`;EventListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EventListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EventListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({Edge:o.get(t,"edge"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.toJSON=function toJSON(){return this._solution};EventListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EventListInstance};u=function EventPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.callSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function EventInstance(t,e,i){this._version=t;this.timestamp=e.timestamp;this.callSid=e.call_sid;this.accountSid=e.account_sid;this.edge=e.edge;this.group=e.group;this.level=e.level;this.name=e.name;this.carrierEdge=e.carrier_edge;this.sipEdge=e.sip_edge;this.sdkEdge=e.sdk_edge;this.clientEdge=e.client_edge;this._context=undefined;this._solution={callSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EventList:a,EventPage:u,EventInstance:h}},83756:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function MetricList(t,e){function MetricListInstance(t){return MetricListInstance.get(t)}MetricListInstance._version=t;MetricListInstance._solution={callSid:e};MetricListInstance._uri=`/Voice/${e}/Metrics`;MetricListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MetricListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MetricListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({Edge:o.get(t,"edge"),Direction:o.get(t,"direction"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MetricListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MetricListInstance.toJSON=function toJSON(){return this._solution};MetricListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MetricListInstance};u=function MetricPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.callSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function MetricInstance(t,e,i){this._version=t;this.timestamp=e.timestamp;this.callSid=e.call_sid;this.accountSid=e.account_sid;this.edge=e.edge;this.direction=e.direction;this.carrierEdge=e.carrier_edge;this.sipEdge=e.sip_edge;this.sdkEdge=e.sdk_edge;this.clientEdge=e.client_edge;this._context=undefined;this._solution={callSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MetricList:a,MetricPage:u,MetricInstance:h}},23344:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CallSummaryList(t,e){function CallSummaryListInstance(t){return CallSummaryListInstance.get(t)}CallSummaryListInstance._version=t;CallSummaryListInstance._solution={callSid:e};CallSummaryListInstance.get=function get(){return new p(this._version,this._solution.callSid)};CallSummaryListInstance.toJSON=function toJSON(){return this._solution};CallSummaryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CallSummaryListInstance};h=function CallSummaryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.callSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CallSummaryInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.callSid=e.call_sid;this.callType=e.call_type;this.callState=e.call_state;this.processingState=e.processing_state;this.startTime=c.iso8601DateTime(e.start_time);this.endTime=c.iso8601DateTime(e.end_time);this.duration=c.integer(e.duration);this.connectDuration=c.integer(e.connect_duration);this.from=e.from;this.to=e.to;this.carrierEdge=e.carrier_edge;this.clientEdge=e.client_edge;this.sdkEdge=e.sdk_edge;this.sipEdge=e.sip_edge;this.tags=e.tags;this.url=e.url;this.attributes=e.attributes;this.properties=e.properties;this.trust=e.trust;this._context=undefined;this._solution={callSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.callSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CallSummaryContext(t,e){this._version=t;this._solution={callSid:e};this._uri=`/Voice/${e}/Summary`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({ProcessingState:o.get(t,"processingState")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CallSummaryList:u,CallSummaryPage:h,CallSummaryInstance:f,CallSummaryContext:p}},34571:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(32410).ParticipantList;var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function RoomList(t){function RoomListInstance(t){return RoomListInstance.get(t)}RoomListInstance._version=t;RoomListInstance._solution={};RoomListInstance._uri=`/Video/Rooms`;RoomListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoomListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoomListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({RoomType:u.map(o.get(t,"roomType"),function(t){return t}),Codec:u.map(o.get(t,"codec"),function(t){return t}),RoomName:o.get(t,"roomName"),CreatedAfter:u.iso8601DateTime(o.get(t,"createdAfter")),CreatedBefore:u.iso8601DateTime(o.get(t,"createdBefore")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomListInstance.get=function get(t){return new l(this._version,t)};RoomListInstance.toJSON=function toJSON(){return this._solution};RoomListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoomListInstance};p=function RoomPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoomInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.roomSid=e.room_sid;this.roomName=e.room_name;this.createTime=a.iso8601DateTime(e.create_time);this.endTime=a.iso8601DateTime(e.end_time);this.roomType=e.room_type;this.roomStatus=e.room_status;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.createdMethod=e.created_method;this.endReason=e.end_reason;this.maxParticipants=a.integer(e.max_participants);this.uniqueParticipants=a.integer(e.unique_participants);this.uniqueParticipantIdentities=a.integer(e.unique_participant_identities);this.concurrentParticipants=a.integer(e.concurrent_participants);this.maxConcurrentParticipants=a.integer(e.max_concurrent_participants);this.codecs=e.codecs;this.mediaRegion=e.media_region;this.durationSec=a.integer(e.duration_sec);this.totalParticipantDurationSec=a.integer(e.total_participant_duration_sec);this.totalRecordingDurationSec=a.integer(e.total_recording_duration_sec);this.processingState=e.processing_state;this.recordingEnabled=e.recording_enabled;this.edgeLocation=e.edge_location;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={roomSid:i||this.roomSid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.roomSid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.participants=function participants(){return this._proxy.participants};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function RoomContext(t,e){this._version=t;this._solution={roomSid:e};this._uri=`/Video/Rooms/${e}`;this._participants=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.roomSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"participants",{get:function(){if(!this._participants){this._participants=new c(this._version,this._solution.roomSid)}return this._participants}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoomList:f,RoomPage:p,RoomInstance:d,RoomContext:l}},32410:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ParticipantList(t,e){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={roomSid:e};ParticipantListInstance._uri=`/Video/Rooms/${e}/Participants`;ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new p(this._version,this._solution.roomSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};h=function ParticipantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.roomSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ParticipantInstance(t,e,i,n){this._version=t;this.participantSid=e.participant_sid;this.participantIdentity=e.participant_identity;this.joinTime=c.iso8601DateTime(e.join_time);this.leaveTime=c.iso8601DateTime(e.leave_time);this.durationSec=c.integer(e.duration_sec);this.accountSid=e.account_sid;this.roomSid=e.room_sid;this.status=e.status;this.codecs=e.codecs;this.endReason=e.end_reason;this.errorCode=c.integer(e.error_code);this.errorCodeUrl=e.error_code_url;this.mediaRegion=e.media_region;this.properties=e.properties;this.edgeLocation=e.edge_location;this.publisherInfo=e.publisher_info;this.url=e.url;this._context=undefined;this._solution={roomSid:i,participantSid:n||this.participantSid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.roomSid,this._solution.participantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ParticipantContext(t,e,i){this._version=t;this._solution={roomSid:e,participantSid:i};this._uri=`/Video/Rooms/${e}/Participants/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.roomSid,this._solution.participantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:u,ParticipantPage:h,ParticipantInstance:f,ParticipantContext:p}},76365:(t,e,i)=>{"use strict";var n=i(90250);var o=i(28705).CredentialList;var s=i(54677).ServiceList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._credentials=undefined;this._services=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"credentials",{get:function(){this._credentials=this._credentials||new o(this);return this._credentials}});Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V1},17014:(t,e,i)=>{"use strict";var n=i(90250);var o=i(74557).CredentialList;var s=i(95950).ServiceList;var r=i(64351);function V2(t){r.prototype.constructor.call(this,t,"v2");this._credentials=undefined;this._services=undefined}n.extend(V2.prototype,r.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"credentials",{get:function(){this._credentials=this._credentials||new o(this);return this._credentials}});Object.defineProperty(V2.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V2},28705:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},54677:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(91981).ChannelList;var c=i(60938);var a=i(31693).RoleList;var u=i(88559).UserList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new m(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};l=function ServicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.defaultServiceRoleSid=e.default_service_role_sid;this.defaultChannelRoleSid=e.default_channel_role_sid;this.defaultChannelCreatorRoleSid=e.default_channel_creator_role_sid;this.readStatusEnabled=e.read_status_enabled;this.reachabilityEnabled=e.reachability_enabled;this.typingIndicatorTimeout=h.integer(e.typing_indicator_timeout);this.consumptionReportInterval=h.integer(e.consumption_report_interval);this.limits=e.limits;this.webhooks=e.webhooks;this.preWebhookUrl=e.pre_webhook_url;this.postWebhookUrl=e.post_webhook_url;this.webhookMethod=e.webhook_method;this.webhookFilters=e.webhook_filters;this.notifications=e.notifications;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.channels=function channels(){return this._proxy.channels};v.prototype.roles=function roles(){return this._proxy.roles};v.prototype.users=function users(){return this._proxy.users};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._channels=undefined;this._roles=undefined;this._users=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),DefaultServiceRoleSid:o.get(t,"defaultServiceRoleSid"),DefaultChannelRoleSid:o.get(t,"defaultChannelRoleSid"),DefaultChannelCreatorRoleSid:o.get(t,"defaultChannelCreatorRoleSid"),ReadStatusEnabled:f.bool(o.get(t,"readStatusEnabled")),ReachabilityEnabled:f.bool(o.get(t,"reachabilityEnabled")),TypingIndicatorTimeout:o.get(t,"typingIndicatorTimeout"),ConsumptionReportInterval:o.get(t,"consumptionReportInterval"),"Notifications.NewMessage.Enabled":f.bool(o.get(t,"notifications.newMessage.enabled")),"Notifications.NewMessage.Template":o.get(t,"notifications.newMessage.template"),"Notifications.AddedToChannel.Enabled":f.bool(o.get(t,"notifications.addedToChannel.enabled")),"Notifications.AddedToChannel.Template":o.get(t,"notifications.addedToChannel.template"),"Notifications.RemovedFromChannel.Enabled":f.bool(o.get(t,"notifications.removedFromChannel.enabled")),"Notifications.RemovedFromChannel.Template":o.get(t,"notifications.removedFromChannel.template"),"Notifications.InvitedToChannel.Enabled":f.bool(o.get(t,"notifications.invitedToChannel.enabled")),"Notifications.InvitedToChannel.Template":o.get(t,"notifications.invitedToChannel.template"),PreWebhookUrl:o.get(t,"preWebhookUrl"),PostWebhookUrl:o.get(t,"postWebhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),WebhookFilters:f.map(o.get(t,"webhookFilters"),function(t){return t}),"Webhooks.OnMessageSend.Url":o.get(t,"webhooks.onMessageSend.url"),"Webhooks.OnMessageSend.Method":o.get(t,"webhooks.onMessageSend.method"),"Webhooks.OnMessageUpdate.Url":o.get(t,"webhooks.onMessageUpdate.url"),"Webhooks.OnMessageUpdate.Method":o.get(t,"webhooks.onMessageUpdate.method"),"Webhooks.OnMessageRemove.Url":o.get(t,"webhooks.onMessageRemove.url"),"Webhooks.OnMessageRemove.Method":o.get(t,"webhooks.onMessageRemove.method"),"Webhooks.OnChannelAdd.Url":o.get(t,"webhooks.onChannelAdd.url"),"Webhooks.OnChannelAdd.Method":o.get(t,"webhooks.onChannelAdd.method"),"Webhooks.OnChannelDestroy.Url":o.get(t,"webhooks.onChannelDestroy.url"),"Webhooks.OnChannelDestroy.Method":o.get(t,"webhooks.onChannelDestroy.method"),"Webhooks.OnChannelUpdate.Url":o.get(t,"webhooks.onChannelUpdate.url"),"Webhooks.OnChannelUpdate.Method":o.get(t,"webhooks.onChannelUpdate.method"),"Webhooks.OnMemberAdd.Url":o.get(t,"webhooks.onMemberAdd.url"),"Webhooks.OnMemberAdd.Method":o.get(t,"webhooks.onMemberAdd.method"),"Webhooks.OnMemberRemove.Url":o.get(t,"webhooks.onMemberRemove.url"),"Webhooks.OnMemberRemove.Method":o.get(t,"webhooks.onMemberRemove.method"),"Webhooks.OnMessageSent.Url":o.get(t,"webhooks.onMessageSent.url"),"Webhooks.OnMessageSent.Method":o.get(t,"webhooks.onMessageSent.method"),"Webhooks.OnMessageUpdated.Url":o.get(t,"webhooks.onMessageUpdated.url"),"Webhooks.OnMessageUpdated.Method":o.get(t,"webhooks.onMessageUpdated.method"),"Webhooks.OnMessageRemoved.Url":o.get(t,"webhooks.onMessageRemoved.url"),"Webhooks.OnMessageRemoved.Method":o.get(t,"webhooks.onMessageRemoved.method"),"Webhooks.OnChannelAdded.Url":o.get(t,"webhooks.onChannelAdded.url"),"Webhooks.OnChannelAdded.Method":o.get(t,"webhooks.onChannelAdded.method"),"Webhooks.OnChannelDestroyed.Url":o.get(t,"webhooks.onChannelDestroyed.url"),"Webhooks.OnChannelDestroyed.Method":o.get(t,"webhooks.onChannelDestroyed.method"),"Webhooks.OnChannelUpdated.Url":o.get(t,"webhooks.onChannelUpdated.url"),"Webhooks.OnChannelUpdated.Method":o.get(t,"webhooks.onChannelUpdated.method"),"Webhooks.OnMemberAdded.Url":o.get(t,"webhooks.onMemberAdded.url"),"Webhooks.OnMemberAdded.Method":o.get(t,"webhooks.onMemberAdded.method"),"Webhooks.OnMemberRemoved.Url":o.get(t,"webhooks.onMemberRemoved.url"),"Webhooks.OnMemberRemoved.Method":o.get(t,"webhooks.onMemberRemoved.method"),"Limits.ChannelMembers":o.get(t,"limits.channelMembers"),"Limits.UserChannels":o.get(t,"limits.userChannels")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"channels",{get:function(){if(!this._channels){this._channels=new r(this._version,this._solution.sid)}return this._channels}});Object.defineProperty(m.prototype,"roles",{get:function(){if(!this._roles){this._roles=new a(this._version,this._solution.sid)}return this._roles}});Object.defineProperty(m.prototype,"users",{get:function(){if(!this._users){this._users=new u(this._version,this._solution.sid)}return this._users}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:d,ServicePage:l,ServiceInstance:v,ServiceContext:m}},91981:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(88085).InviteList;var c=i(91007).MemberList;var a=i(57885).MessageList;var u=i(60938);var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ChannelList(t,e){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={serviceSid:e};ChannelListInstance._uri=`/Services/${e}/Channels`;ChannelListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),Type:o.get(t,"type")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({Type:f.map(o.get(t,"type"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.get=function get(t){return new m(this._version,this._solution.serviceSid,t)};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};l=function ChannelPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,u.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.serviceSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ChannelInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.type=e.type;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this.membersCount=h.integer(e.members_count);this.messagesCount=h.integer(e.messages_count);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.members=function members(){return this._proxy.members};v.prototype.messages=function messages(){return this._proxy.messages};v.prototype.invites=function invites(){return this._proxy.invites};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ChannelContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Channels/${i}`;this._members=undefined;this._messages=undefined;this._invites=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"members",{get:function(){if(!this._members){this._members=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._members}});Object.defineProperty(m.prototype,"messages",{get:function(){if(!this._messages){this._messages=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._messages}});Object.defineProperty(m.prototype,"invites",{get:function(){if(!this._invites){this._invites=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._invites}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:d,ChannelPage:l,ChannelInstance:v,ChannelContext:m}},88085:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function InviteList(t,e,i){function InviteListInstance(t){return InviteListInstance.get(t)}InviteListInstance._version=t;InviteListInstance._solution={serviceSid:e,channelSid:i};InviteListInstance._uri=`/Services/${e}/Channels/${i}/Invites`;InviteListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InviteListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InviteListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};InviteListInstance.toJSON=function toJSON(){return this._solution};InviteListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InviteListInstance};f=function InvitePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InviteInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.createdBy=e.created_by;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function InviteContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Invites/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InviteList:h,InvitePage:f,InviteInstance:p,InviteContext:d}},91007:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MemberList(t,e,i){function MemberListInstance(t){return MemberListInstance.get(t)}MemberListInstance._version=t;MemberListInstance._solution={serviceSid:e,channelSid:i};MemberListInstance._uri=`/Services/${e}/Channels/${i}/Members`;MemberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MemberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MemberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MemberListInstance.toJSON=function toJSON(){return this._solution};MemberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MemberListInstance};f=function MemberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MemberInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.lastConsumptionTimestamp=c.iso8601DateTime(e.last_consumption_timestamp);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MemberContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Members/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MemberList:h,MemberPage:f,MemberInstance:p,MemberContext:d}},57885:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function MessageList(t,e,i){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={serviceSid:e,channelSid:i};MessageListInstance._uri=`/Services/${e}/Channels/${i}/Messages`;MessageListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.body)){throw new Error('Required parameter "opts.body" missing.')}var i=n.defer();var s=a.of({Body:o.get(t,"body"),From:o.get(t,"from"),Attributes:o.get(t,"attributes")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Order:o.get(t,"order"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};h=function MessagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.channelSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function MessageInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.attributes=e.attributes;this.serviceSid=e.service_sid;this.to=e.to;this.channelSid=e.channel_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.wasEdited=e.was_edited;this.from=e.from;this.body=e.body;this.index=c.integer(e.index);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessageContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Messages/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Body:o.get(t,"body"),Attributes:o.get(t,"attributes")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:u,MessagePage:h,MessageInstance:f,MessageContext:p}},31693:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t,e){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={serviceSid:e};RoleListInstance._uri=`/Services/${e}/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Roles/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},88559:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(24284).UserChannelList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function UserList(t,e){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={serviceSid:e};UserListInstance._uri=`/Services/${e}/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};f=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.attributes=e.attributes;this.friendlyName=e.friendly_name;this.roleSid=e.role_sid;this.identity=e.identity;this.isOnline=e.is_online;this.isNotifiable=e.is_notifiable;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.joinedChannelsCount=a.integer(e.joined_channels_count);this.links=e.links;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.userChannels=function userChannels(){return this._proxy.userChannels};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Users/${i}`;this._userChannels=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"userChannels",{get:function(){if(!this._userChannels){this._userChannels=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._userChannels}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:h,UserPage:f,UserInstance:p,UserContext:d}},24284:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function UserChannelList(t,e,i){function UserChannelListInstance(t){return UserChannelListInstance.get(t)}UserChannelListInstance._version=t;UserChannelListInstance._solution={serviceSid:e,userSid:i};UserChannelListInstance._uri=`/Services/${e}/Users/${i}/Channels`;UserChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.toJSON=function toJSON(){return this._solution};UserChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserChannelListInstance};h=function UserChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.userSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UserChannelInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.memberSid=e.member_sid;this.status=e.status;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.unreadMessagesCount=c.integer(e.unread_messages_count);this.links=e.links;this._context=undefined;this._solution={serviceSid:i,userSid:n}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserChannelList:u,UserChannelPage:h,UserChannelInstance:f}},74557:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},95950:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(80750).BindingList;var c=i(80866).ChannelList;var a=i(60938);var u=i(30422).RoleList;var h=i(89977).UserList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new _(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};v=function ServicePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,a.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.defaultServiceRoleSid=e.default_service_role_sid;this.defaultChannelRoleSid=e.default_channel_role_sid;this.defaultChannelCreatorRoleSid=e.default_channel_creator_role_sid;this.readStatusEnabled=e.read_status_enabled;this.reachabilityEnabled=e.reachability_enabled;this.typingIndicatorTimeout=f.integer(e.typing_indicator_timeout);this.consumptionReportInterval=f.integer(e.consumption_report_interval);this.limits=e.limits;this.preWebhookUrl=e.pre_webhook_url;this.postWebhookUrl=e.post_webhook_url;this.webhookMethod=e.webhook_method;this.webhookFilters=e.webhook_filters;this.preWebhookRetryCount=f.integer(e.pre_webhook_retry_count);this.postWebhookRetryCount=f.integer(e.post_webhook_retry_count);this.notifications=e.notifications;this.media=e.media;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.channels=function channels(){return this._proxy.channels};m.prototype.roles=function roles(){return this._proxy.roles};m.prototype.users=function users(){return this._proxy.users};m.prototype.bindings=function bindings(){return this._proxy.bindings};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._channels=undefined;this._roles=undefined;this._users=undefined;this._bindings=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),DefaultServiceRoleSid:o.get(t,"defaultServiceRoleSid"),DefaultChannelRoleSid:o.get(t,"defaultChannelRoleSid"),DefaultChannelCreatorRoleSid:o.get(t,"defaultChannelCreatorRoleSid"),ReadStatusEnabled:p.bool(o.get(t,"readStatusEnabled")),ReachabilityEnabled:p.bool(o.get(t,"reachabilityEnabled")),TypingIndicatorTimeout:o.get(t,"typingIndicatorTimeout"),ConsumptionReportInterval:o.get(t,"consumptionReportInterval"),"Notifications.NewMessage.Enabled":p.bool(o.get(t,"notifications.newMessage.enabled")),"Notifications.NewMessage.Template":o.get(t,"notifications.newMessage.template"),"Notifications.NewMessage.Sound":o.get(t,"notifications.newMessage.sound"),"Notifications.NewMessage.BadgeCountEnabled":p.bool(o.get(t,"notifications.newMessage.badgeCountEnabled")),"Notifications.AddedToChannel.Enabled":p.bool(o.get(t,"notifications.addedToChannel.enabled")),"Notifications.AddedToChannel.Template":o.get(t,"notifications.addedToChannel.template"),"Notifications.AddedToChannel.Sound":o.get(t,"notifications.addedToChannel.sound"),"Notifications.RemovedFromChannel.Enabled":p.bool(o.get(t,"notifications.removedFromChannel.enabled")),"Notifications.RemovedFromChannel.Template":o.get(t,"notifications.removedFromChannel.template"),"Notifications.RemovedFromChannel.Sound":o.get(t,"notifications.removedFromChannel.sound"),"Notifications.InvitedToChannel.Enabled":p.bool(o.get(t,"notifications.invitedToChannel.enabled")),"Notifications.InvitedToChannel.Template":o.get(t,"notifications.invitedToChannel.template"),"Notifications.InvitedToChannel.Sound":o.get(t,"notifications.invitedToChannel.sound"),PreWebhookUrl:o.get(t,"preWebhookUrl"),PostWebhookUrl:o.get(t,"postWebhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),WebhookFilters:p.map(o.get(t,"webhookFilters"),function(t){return t}),"Limits.ChannelMembers":o.get(t,"limits.channelMembers"),"Limits.UserChannels":o.get(t,"limits.userChannels"),"Media.CompatibilityMessage":o.get(t,"media.compatibilityMessage"),PreWebhookRetryCount:o.get(t,"preWebhookRetryCount"),PostWebhookRetryCount:o.get(t,"postWebhookRetryCount"),"Notifications.LogEnabled":p.bool(o.get(t,"notifications.logEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"channels",{get:function(){if(!this._channels){this._channels=new c(this._version,this._solution.sid)}return this._channels}});Object.defineProperty(_.prototype,"roles",{get:function(){if(!this._roles){this._roles=new u(this._version,this._solution.sid)}return this._roles}});Object.defineProperty(_.prototype,"users",{get:function(){if(!this._users){this._users=new h(this._version,this._solution.sid)}return this._users}});Object.defineProperty(_.prototype,"bindings",{get:function(){if(!this._bindings){this._bindings=new r(this._version,this._solution.sid)}return this._bindings}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:l,ServicePage:v,ServiceInstance:m,ServiceContext:_}},80750:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function BindingList(t,e){function BindingListInstance(t){return BindingListInstance.get(t)}BindingListInstance._version=t;BindingListInstance._solution={serviceSid:e};BindingListInstance._uri=`/Services/${e}/Bindings`;BindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({BindingType:a.map(o.get(t,"bindingType"),function(t){return t}),Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};BindingListInstance.toJSON=function toJSON(){return this._solution};BindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BindingListInstance};f=function BindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BindingInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.endpoint=e.endpoint;this.identity=e.identity;this.credentialSid=e.credential_sid;this.bindingType=e.binding_type;this.messageTypes=e.message_types;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BindingContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Bindings/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BindingList:h,BindingPage:f,BindingInstance:p,BindingContext:d}},80866:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(16469).InviteList;var c=i(94912).MemberList;var a=i(34682).MessageList;var u=i(60938);var h=i(77698).WebhookList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ChannelList(t,e){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={serviceSid:e};ChannelListInstance._uri=`/Services/${e}/Channels`;ChannelListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),Type:o.get(t,"type"),DateCreated:p.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:p.iso8601DateTime(o.get(t,"dateUpdated")),CreatedBy:o.get(t,"createdBy")});var r=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({Type:p.map(o.get(t,"type"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.get=function get(t){return new _(this._version,this._solution.serviceSid,t)};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};v=function ChannelPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,u.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t,this._solution.serviceSid)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ChannelInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.type=e.type;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this.membersCount=f.integer(e.members_count);this.messagesCount=f.integer(e.messages_count);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.members=function members(){return this._proxy.members};m.prototype.messages=function messages(){return this._proxy.messages};m.prototype.invites=function invites(){return this._proxy.invites};m.prototype.webhooks=function webhooks(){return this._proxy.webhooks};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ChannelContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Channels/${i}`;this._members=undefined;this._messages=undefined;this._invites=undefined;this._webhooks=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),DateCreated:p.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:p.iso8601DateTime(o.get(t,"dateUpdated")),CreatedBy:o.get(t,"createdBy")});var r=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"members",{get:function(){if(!this._members){this._members=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._members}});Object.defineProperty(_.prototype,"messages",{get:function(){if(!this._messages){this._messages=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._messages}});Object.defineProperty(_.prototype,"invites",{get:function(){if(!this._invites){this._invites=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._invites}});Object.defineProperty(_.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new h(this._version,this._solution.serviceSid,this._solution.sid)}return this._webhooks}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:l,ChannelPage:v,ChannelInstance:m,ChannelContext:_}},16469:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function InviteList(t,e,i){function InviteListInstance(t){return InviteListInstance.get(t)}InviteListInstance._version=t;InviteListInstance._solution={serviceSid:e,channelSid:i};InviteListInstance._uri=`/Services/${e}/Channels/${i}/Invites`;InviteListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InviteListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InviteListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};InviteListInstance.toJSON=function toJSON(){return this._solution};InviteListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InviteListInstance};f=function InvitePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InviteInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.createdBy=e.created_by;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function InviteContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Invites/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InviteList:h,InvitePage:f,InviteInstance:p,InviteContext:d}},94912:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MemberList(t,e,i){function MemberListInstance(t){return MemberListInstance.get(t)}MemberListInstance._version=t;MemberListInstance._solution={serviceSid:e,channelSid:i};MemberListInstance._uri=`/Services/${e}/Channels/${i}/Members`;MemberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp")),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MemberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MemberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MemberListInstance.toJSON=function toJSON(){return this._solution};MemberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MemberListInstance};f=function MemberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MemberInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.lastConsumptionTimestamp=c.iso8601DateTime(e.last_consumption_timestamp);this.url=e.url;this.attributes=e.attributes;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MemberContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Members/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp")),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MemberList:h,MemberPage:f,MemberInstance:p,MemberContext:d}},34682:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MessageList(t,e,i){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={serviceSid:e,channelSid:i};MessageListInstance._uri=`/Services/${e}/Channels/${i}/Messages`;MessageListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({From:o.get(t,"from"),Attributes:o.get(t,"attributes"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),LastUpdatedBy:o.get(t,"lastUpdatedBy"),Body:o.get(t,"body"),MediaSid:o.get(t,"mediaSid")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};f=function MessagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessageInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.attributes=e.attributes;this.serviceSid=e.service_sid;this.to=e.to;this.channelSid=e.channel_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.lastUpdatedBy=e.last_updated_by;this.wasEdited=e.was_edited;this.from=e.from;this.body=e.body;this.index=c.integer(e.index);this.type=e.type;this.media=e.media;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MessageContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Messages/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Body:o.get(t,"body"),Attributes:o.get(t,"attributes"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),LastUpdatedBy:o.get(t,"lastUpdatedBy"),From:o.get(t,"from")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:h,MessagePage:f,MessageInstance:p,MessageContext:d}},77698:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WebhookList(t,e,i){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={serviceSid:e,channelSid:i};WebhookListInstance._uri=`/Services/${e}/Channels/${i}/Webhooks`;WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.RetryCount":o.get(t,"configuration.retryCount")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};f=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.type=e.type;this.url=e.url;this.configuration=e.configuration;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WebhookContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Webhooks/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.RetryCount":o.get(t,"configuration.retryCount")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:h,WebhookPage:f,WebhookInstance:p,WebhookContext:d}},30422:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t,e){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={serviceSid:e};RoleListInstance._uri=`/Services/${e}/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Roles/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},89977:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(38782).UserBindingList;var a=i(15790).UserChannelList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function UserList(t,e){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={serviceSid:e};UserListInstance._uri=`/Services/${e}/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=h.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};p=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.attributes=e.attributes;this.friendlyName=e.friendly_name;this.roleSid=e.role_sid;this.identity=e.identity;this.isOnline=e.is_online;this.isNotifiable=e.is_notifiable;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.joinedChannelsCount=u.integer(e.joined_channels_count);this.links=e.links;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.userChannels=function userChannels(){return this._proxy.userChannels};d.prototype.userBindings=function userBindings(){return this._proxy.userBindings};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function UserContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Users/${i}`;this._userChannels=undefined;this._userBindings=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"userChannels",{get:function(){if(!this._userChannels){this._userChannels=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._userChannels}});Object.defineProperty(l.prototype,"userBindings",{get:function(){if(!this._userBindings){this._userBindings=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._userBindings}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:f,UserPage:p,UserInstance:d,UserContext:l}},38782:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function UserBindingList(t,e,i){function UserBindingListInstance(t){return UserBindingListInstance.get(t)}UserBindingListInstance._version=t;UserBindingListInstance._solution={serviceSid:e,userSid:i};UserBindingListInstance._uri=`/Services/${e}/Users/${i}/Bindings`;UserBindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserBindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserBindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({BindingType:a.map(o.get(t,"bindingType"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserBindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserBindingListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.userSid,t)};UserBindingListInstance.toJSON=function toJSON(){return this._solution};UserBindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserBindingListInstance};f=function UserBindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.userSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserBindingInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.endpoint=e.endpoint;this.identity=e.identity;this.userSid=e.user_sid;this.credentialSid=e.credential_sid;this.bindingType=e.binding_type;this.messageTypes=e.message_types;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,userSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.userSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserBindingContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,userSid:i,sid:n};this._uri=`/Services/${e}/Users/${i}/Bindings/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserBindingList:h,UserBindingPage:f,UserBindingInstance:p,UserBindingContext:d}},15790:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function UserChannelList(t,e,i){function UserChannelListInstance(t){return UserChannelListInstance.get(t)}UserChannelListInstance._version=t;UserChannelListInstance._solution={serviceSid:e,userSid:i};UserChannelListInstance._uri=`/Services/${e}/Users/${i}/Channels`;UserChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.userSid,t)};UserChannelListInstance.toJSON=function toJSON(){return this._solution};UserChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserChannelListInstance};f=function UserChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.userSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserChannelInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.userSid=e.user_sid;this.memberSid=e.member_sid;this.status=e.status;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.unreadMessagesCount=c.integer(e.unread_messages_count);this.links=e.links;this.url=e.url;this.notificationLevel=e.notification_level;this._context=undefined;this._solution={serviceSid:i,userSid:n,channelSid:o||this.channelSid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserChannelContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,userSid:i,channelSid:n};this._uri=`/Services/${e}/Users/${i}/Channels/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({NotificationLevel:o.get(t,"notificationLevel"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserChannelList:h,UserChannelPage:f,UserChannelInstance:p,UserChannelContext:d}},23896:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64991).PhoneNumberList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._phoneNumbers=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"phoneNumbers",{get:function(){this._phoneNumbers=this._phoneNumbers||new o(this);return this._phoneNumbers}});t.exports=V1},64991:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function PhoneNumberList(t){function PhoneNumberListInstance(t){return PhoneNumberListInstance.get(t)}PhoneNumberListInstance._version=t;PhoneNumberListInstance._solution={};PhoneNumberListInstance.get=function get(t){return new p(this._version,t)};PhoneNumberListInstance.toJSON=function toJSON(){return this._solution};PhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PhoneNumberListInstance};h=function PhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PhoneNumberInstance(t,e,i){this._version=t;this.callerName=e.caller_name;this.countryCode=e.country_code;this.phoneNumber=e.phone_number;this.nationalFormat=e.national_format;this.carrier=e.carrier;this.addOns=e.add_ons;this.url=e.url;this._context=undefined;this._solution={phoneNumber:i||this.phoneNumber}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.phoneNumber)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PhoneNumberContext(t,e){this._version=t;this._solution={phoneNumber:e};this._uri=`/PhoneNumbers/${e}`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({CountryCode:o.get(t,"countryCode"),Type:c.map(o.get(t,"type"),function(t){return t}),AddOns:c.map(o.get(t,"addOns"),function(t){return t})});o.extend(s,c.prefixedCollapsibleMap(t.addOnsData,"AddOns"));var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.phoneNumber))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PhoneNumberList:u,PhoneNumberPage:h,PhoneNumberInstance:f,PhoneNumberContext:p}},98776:(t,e,i)=>{"use strict";var n=i(90250);var o=i(6161).DeactivationsList;var s=i(10046).ServiceList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._deactivations=undefined;this._services=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"deactivations",{get:function(){this._deactivations=this._deactivations||new o(this);return this._deactivations}});Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V1},6161:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function DeactivationsList(t){function DeactivationsListInstance(t){return DeactivationsListInstance.get(t)}DeactivationsListInstance._version=t;DeactivationsListInstance._solution={};DeactivationsListInstance.get=function get(){return new p(this._version)};DeactivationsListInstance.toJSON=function toJSON(){return this._solution};DeactivationsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeactivationsListInstance};h=function DeactivationsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DeactivationsInstance(t,e){this._version=t;this.redirectTo=e.redirect_to;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeactivationsContext(t){this._version=t;this._solution={};this._uri=`/Deactivations`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Date:c.iso8601Date(o.get(t,"date"))});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeactivationsList:u,DeactivationsPage:h,DeactivationsInstance:f,DeactivationsContext:p}},10046:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(78697).AlphaSenderList;var c=i(60938);var a=i(44017).PhoneNumberList;var u=i(64359).ShortCodeList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),InboundRequestUrl:o.get(t,"inboundRequestUrl"),InboundMethod:o.get(t,"inboundMethod"),FallbackUrl:o.get(t,"fallbackUrl"),FallbackMethod:o.get(t,"fallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StickySender:f.bool(o.get(t,"stickySender")),MmsConverter:f.bool(o.get(t,"mmsConverter")),SmartEncoding:f.bool(o.get(t,"smartEncoding")),ScanMessageContent:o.get(t,"scanMessageContent"),FallbackToLongCode:f.bool(o.get(t,"fallbackToLongCode")),AreaCodeGeomatch:f.bool(o.get(t,"areaCodeGeomatch")),ValidityPeriod:o.get(t,"validityPeriod"),SynchronousValidation:f.bool(o.get(t,"synchronousValidation"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new m(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};l=function ServicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.inboundRequestUrl=e.inbound_request_url;this.inboundMethod=e.inbound_method;this.fallbackUrl=e.fallback_url;this.fallbackMethod=e.fallback_method;this.statusCallback=e.status_callback;this.stickySender=e.sticky_sender;this.mmsConverter=e.mms_converter;this.smartEncoding=e.smart_encoding;this.scanMessageContent=e.scan_message_content;this.fallbackToLongCode=e.fallback_to_long_code;this.areaCodeGeomatch=e.area_code_geomatch;this.synchronousValidation=e.synchronous_validation;this.validityPeriod=h.integer(e.validity_period);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.phoneNumbers=function phoneNumbers(){return this._proxy.phoneNumbers};v.prototype.shortCodes=function shortCodes(){return this._proxy.shortCodes};v.prototype.alphaSenders=function alphaSenders(){return this._proxy.alphaSenders};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._phoneNumbers=undefined;this._shortCodes=undefined;this._alphaSenders=undefined};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),InboundRequestUrl:o.get(t,"inboundRequestUrl"),InboundMethod:o.get(t,"inboundMethod"),FallbackUrl:o.get(t,"fallbackUrl"),FallbackMethod:o.get(t,"fallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StickySender:f.bool(o.get(t,"stickySender")),MmsConverter:f.bool(o.get(t,"mmsConverter")),SmartEncoding:f.bool(o.get(t,"smartEncoding")),ScanMessageContent:o.get(t,"scanMessageContent"),FallbackToLongCode:f.bool(o.get(t,"fallbackToLongCode")),AreaCodeGeomatch:f.bool(o.get(t,"areaCodeGeomatch")),ValidityPeriod:o.get(t,"validityPeriod"),SynchronousValidation:f.bool(o.get(t,"synchronousValidation"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"phoneNumbers",{get:function(){if(!this._phoneNumbers){this._phoneNumbers=new a(this._version,this._solution.sid)}return this._phoneNumbers}});Object.defineProperty(m.prototype,"shortCodes",{get:function(){if(!this._shortCodes){this._shortCodes=new u(this._version,this._solution.sid)}return this._shortCodes}});Object.defineProperty(m.prototype,"alphaSenders",{get:function(){if(!this._alphaSenders){this._alphaSenders=new r(this._version,this._solution.sid)}return this._alphaSenders}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:d,ServicePage:l,ServiceInstance:v,ServiceContext:m}},78697:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AlphaSenderList(t,e){function AlphaSenderListInstance(t){return AlphaSenderListInstance.get(t)}AlphaSenderListInstance._version=t;AlphaSenderListInstance._solution={serviceSid:e};AlphaSenderListInstance._uri=`/Services/${e}/AlphaSenders`;AlphaSenderListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.alphaSender)){throw new Error('Required parameter "opts.alphaSender" missing.')}var i=n.defer();var s=a.of({AlphaSender:o.get(t,"alphaSender")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AlphaSenderListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AlphaSenderListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AlphaSenderListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AlphaSenderListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AlphaSenderListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,t)};AlphaSenderListInstance.toJSON=function toJSON(){return this._solution};AlphaSenderListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AlphaSenderListInstance};h=function AlphaSenderPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AlphaSenderInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.alphaSender=e.alpha_sender;this.capabilities=e.capabilities;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AlphaSenderContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/AlphaSenders/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AlphaSenderList:u,AlphaSenderPage:h,AlphaSenderInstance:f,AlphaSenderContext:p}},44017:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function PhoneNumberList(t,e){function PhoneNumberListInstance(t){return PhoneNumberListInstance.get(t)}PhoneNumberListInstance._version=t;PhoneNumberListInstance._solution={serviceSid:e};PhoneNumberListInstance._uri=`/Services/${e}/PhoneNumbers`;PhoneNumberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumberSid)){throw new Error('Required parameter "opts.phoneNumberSid" missing.')}var i=n.defer();var s=a.of({PhoneNumberSid:o.get(t,"phoneNumberSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PhoneNumberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PhoneNumberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,t)};PhoneNumberListInstance.toJSON=function toJSON(){return this._solution};PhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PhoneNumberListInstance};h=function PhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PhoneNumberInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.phoneNumber=e.phone_number;this.countryCode=e.country_code;this.capabilities=e.capabilities;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PhoneNumberContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/PhoneNumbers/${i}`};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PhoneNumberList:u,PhoneNumberPage:h,PhoneNumberInstance:f,PhoneNumberContext:p}},64359:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ShortCodeList(t,e){function ShortCodeListInstance(t){return ShortCodeListInstance.get(t)}ShortCodeListInstance._version=t;ShortCodeListInstance._solution={serviceSid:e};ShortCodeListInstance._uri=`/Services/${e}/ShortCodes`;ShortCodeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.shortCodeSid)){throw new Error('Required parameter "opts.shortCodeSid" missing.')}var i=n.defer();var s=a.of({ShortCodeSid:o.get(t,"shortCodeSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ShortCodeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ShortCodeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,t)};ShortCodeListInstance.toJSON=function toJSON(){return this._solution};ShortCodeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ShortCodeListInstance};h=function ShortCodePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ShortCodeInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.shortCode=e.short_code;this.countryCode=e.country_code;this.capabilities=e.capabilities;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ShortCodeContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/ShortCodes/${i}`};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ShortCodeList:u,ShortCodePage:h,ShortCodeInstance:f,ShortCodeContext:p}},99630:(t,e,i)=>{"use strict";var n=i(90250);var o=i(97142).AlertList;var s=i(91066).EventList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._alerts=undefined;this._events=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"alerts",{get:function(){this._alerts=this._alerts||new o(this);return this._alerts}});Object.defineProperty(V1.prototype,"events",{get:function(){this._events=this._events||new s(this);return this._events}});t.exports=V1},97142:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function AlertList(t){function AlertListInstance(t){return AlertListInstance.get(t)}AlertListInstance._version=t;AlertListInstance._solution={};AlertListInstance._uri=`/Alerts`;AlertListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AlertListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AlertListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({LogLevel:o.get(t,"logLevel"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),EndDate:a.iso8601DateTime(o.get(t,"endDate")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AlertListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AlertListInstance.get=function get(t){return new d(this._version,t)};AlertListInstance.toJSON=function toJSON(){return this._solution};AlertListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AlertListInstance};f=function AlertPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AlertInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.alertText=e.alert_text;this.apiVersion=e.api_version;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateGenerated=c.iso8601DateTime(e.date_generated);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.errorCode=e.error_code;this.logLevel=e.log_level;this.moreInfo=e.more_info;this.requestMethod=e.request_method;this.requestUrl=e.request_url;this.requestVariables=e.request_variables;this.resourceSid=e.resource_sid;this.responseBody=e.response_body;this.responseHeaders=e.response_headers;this.sid=e.sid;this.url=e.url;this.requestHeaders=e.request_headers;this.serviceSid=e.service_sid;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AlertContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Alerts/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AlertList:h,AlertPage:f,AlertInstance:p,AlertContext:d}},91066:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function EventList(t){function EventListInstance(t){return EventListInstance.get(t)}EventListInstance._version=t;EventListInstance._solution={};EventListInstance._uri=`/Events`;EventListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EventListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EventListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ActorSid:o.get(t,"actorSid"),EventType:o.get(t,"eventType"),ResourceSid:o.get(t,"resourceSid"),SourceIpAddress:o.get(t,"sourceIpAddress"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),EndDate:a.iso8601DateTime(o.get(t,"endDate")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.get=function get(t){return new d(this._version,t)};EventListInstance.toJSON=function toJSON(){return this._solution};EventListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EventListInstance};f=function EventPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function EventInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.actorSid=e.actor_sid;this.actorType=e.actor_type;this.description=e.description;this.eventData=e.event_data;this.eventDate=c.iso8601DateTime(e.event_date);this.eventType=e.event_type;this.resourceSid=e.resource_sid;this.resourceType=e.resource_type;this.sid=e.sid;this.source=e.source;this.sourceIpAddress=e.source_ip_address;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function EventContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Events/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EventList:h,EventPage:f,EventInstance:p,EventContext:d}},88117:(t,e,i)=>{"use strict";var n=i(90250);var o=i(93722).CredentialList;var s=i(87108).ServiceList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._credentials=undefined;this._services=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"credentials",{get:function(){this._credentials=this._credentials||new o(this);return this._credentials}});Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V1},93722:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},87108:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(12429).BindingList;var c=i(53022).NotificationList;var a=i(60938);var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),ApnCredentialSid:o.get(t,"apnCredentialSid"),GcmCredentialSid:o.get(t,"gcmCredentialSid"),MessagingServiceSid:o.get(t,"messagingServiceSid"),FacebookMessengerPageId:o.get(t,"facebookMessengerPageId"),DefaultApnNotificationProtocolVersion:o.get(t,"defaultApnNotificationProtocolVersion"),DefaultGcmNotificationProtocolVersion:o.get(t,"defaultGcmNotificationProtocolVersion"),FcmCredentialSid:o.get(t,"fcmCredentialSid"),DefaultFcmNotificationProtocolVersion:o.get(t,"defaultFcmNotificationProtocolVersion"),LogEnabled:h.bool(o.get(t,"logEnabled")),AlexaSkillId:o.get(t,"alexaSkillId"),DefaultAlexaNotificationProtocolVersion:o.get(t,"defaultAlexaNotificationProtocolVersion"),DeliveryCallbackUrl:o.get(t,"deliveryCallbackUrl"),DeliveryCallbackEnabled:h.bool(o.get(t,"deliveryCallbackEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new v(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};d=function ServicePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,a.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.apnCredentialSid=e.apn_credential_sid;this.gcmCredentialSid=e.gcm_credential_sid;this.fcmCredentialSid=e.fcm_credential_sid;this.messagingServiceSid=e.messaging_service_sid;this.facebookMessengerPageId=e.facebook_messenger_page_id;this.defaultApnNotificationProtocolVersion=e.default_apn_notification_protocol_version;this.defaultGcmNotificationProtocolVersion=e.default_gcm_notification_protocol_version;this.defaultFcmNotificationProtocolVersion=e.default_fcm_notification_protocol_version;this.logEnabled=e.log_enabled;this.url=e.url;this.links=e.links;this.alexaSkillId=e.alexa_skill_id;this.defaultAlexaNotificationProtocolVersion=e.default_alexa_notification_protocol_version;this.deliveryCallbackUrl=e.delivery_callback_url;this.deliveryCallbackEnabled=e.delivery_callback_enabled;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.sid)}return this._context}});l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.bindings=function bindings(){return this._proxy.bindings};l.prototype.notifications=function notifications(){return this._proxy.notifications};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._bindings=undefined;this._notifications=undefined};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),ApnCredentialSid:o.get(t,"apnCredentialSid"),GcmCredentialSid:o.get(t,"gcmCredentialSid"),MessagingServiceSid:o.get(t,"messagingServiceSid"),FacebookMessengerPageId:o.get(t,"facebookMessengerPageId"),DefaultApnNotificationProtocolVersion:o.get(t,"defaultApnNotificationProtocolVersion"),DefaultGcmNotificationProtocolVersion:o.get(t,"defaultGcmNotificationProtocolVersion"),FcmCredentialSid:o.get(t,"fcmCredentialSid"),DefaultFcmNotificationProtocolVersion:o.get(t,"defaultFcmNotificationProtocolVersion"),LogEnabled:h.bool(o.get(t,"logEnabled")),AlexaSkillId:o.get(t,"alexaSkillId"),DefaultAlexaNotificationProtocolVersion:o.get(t,"defaultAlexaNotificationProtocolVersion"),DeliveryCallbackUrl:o.get(t,"deliveryCallbackUrl"),DeliveryCallbackEnabled:h.bool(o.get(t,"deliveryCallbackEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"bindings",{get:function(){if(!this._bindings){this._bindings=new r(this._version,this._solution.sid)}return this._bindings}});Object.defineProperty(v.prototype,"notifications",{get:function(){if(!this._notifications){this._notifications=new c(this._version,this._solution.sid)}return this._notifications}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:p,ServicePage:d,ServiceInstance:l,ServiceContext:v}},12429:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function BindingList(t,e){function BindingListInstance(t){return BindingListInstance.get(t)}BindingListInstance._version=t;BindingListInstance._solution={serviceSid:e};BindingListInstance._uri=`/Services/${e}/Bindings`;BindingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}if(o.isUndefined(t.bindingType)){throw new Error('Required parameter "opts.bindingType" missing.')}if(o.isUndefined(t.address)){throw new Error('Required parameter "opts.address" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),BindingType:o.get(t,"bindingType"),Address:o.get(t,"address"),Tag:a.map(o.get(t,"tag"),function(t){return t}),NotificationProtocolVersion:o.get(t,"notificationProtocolVersion"),CredentialSid:o.get(t,"credentialSid"),Endpoint:o.get(t,"endpoint")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),Identity:a.map(o.get(t,"identity"),function(t){return t}),Tag:a.map(o.get(t,"tag"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};BindingListInstance.toJSON=function toJSON(){return this._solution};BindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BindingListInstance};f=function BindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BindingInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.credentialSid=e.credential_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.notificationProtocolVersion=e.notification_protocol_version;this.endpoint=e.endpoint;this.identity=e.identity;this.bindingType=e.binding_type;this.address=e.address;this.tags=e.tags;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BindingContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Bindings/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BindingList:h,BindingPage:f,BindingInstance:p,BindingContext:d}},53022:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function NotificationList(t,e){function NotificationListInstance(t){return NotificationListInstance.get(t)}NotificationListInstance._version=t;NotificationListInstance._solution={serviceSid:e};NotificationListInstance._uri=`/Services/${e}/Notifications`;NotificationListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),Tag:a.map(o.get(t,"tag"),function(t){return t}),Body:o.get(t,"body"),Priority:o.get(t,"priority"),Ttl:o.get(t,"ttl"),Title:o.get(t,"title"),Sound:o.get(t,"sound"),Action:o.get(t,"action"),Data:a.object(o.get(t,"data")),Apn:a.object(o.get(t,"apn")),Gcm:a.object(o.get(t,"gcm")),Sms:a.object(o.get(t,"sms")),FacebookMessenger:a.object(o.get(t,"facebookMessenger")),Fcm:a.object(o.get(t,"fcm")),Segment:a.map(o.get(t,"segment"),function(t){return t}),Alexa:a.object(o.get(t,"alexa")),ToBinding:a.map(o.get(t,"toBinding"),function(t){return t}),DeliveryCallbackUrl:o.get(t,"deliveryCallbackUrl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NotificationListInstance.toJSON=function toJSON(){return this._solution};NotificationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NotificationListInstance};f=function NotificationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function NotificationInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.identities=e.identities;this.tags=e.tags;this.segments=e.segments;this.priority=e.priority;this.ttl=c.integer(e.ttl);this.title=e.title;this.body=e.body;this.sound=e.sound;this.action=e.action;this.data=e.data;this.apn=e.apn;this.gcm=e.gcm;this.fcm=e.fcm;this.sms=e.sms;this.facebookMessenger=e.facebook_messenger;this.alexa=e.alexa;this._context=undefined;this._solution={serviceSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NotificationList:h,NotificationPage:f,NotificationInstance:p}},16213:(t,e,i)=>{"use strict";var n=i(90250);var o=i(29437).RegulatoryComplianceList;var s=i(64351);function V2(t){s.prototype.constructor.call(this,t,"v2");this._regulatoryCompliance=undefined}n.extend(V2.prototype,s.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"regulatoryCompliance",{get:function(){this._regulatoryCompliance=this._regulatoryCompliance||new o(this);return this._regulatoryCompliance}});t.exports=V2},29437:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(27712).BundleList;var r=i(68798).EndUserList;var c=i(86094).EndUserTypeList;var a=i(18721).RegulationList;var u=i(32231).SupportingDocumentList;var h=i(13301).SupportingDocumentTypeList;var f;f=function RegulatoryComplianceList(t){function RegulatoryComplianceListInstance(t){return RegulatoryComplianceListInstance.get(t)}RegulatoryComplianceListInstance._version=t;RegulatoryComplianceListInstance._solution={};RegulatoryComplianceListInstance._bundles=undefined;RegulatoryComplianceListInstance._endUsers=undefined;RegulatoryComplianceListInstance._endUserTypes=undefined;RegulatoryComplianceListInstance._regulations=undefined;RegulatoryComplianceListInstance._supportingDocuments=undefined;RegulatoryComplianceListInstance._supportingDocumentTypes=undefined;Object.defineProperty(RegulatoryComplianceListInstance,"bundles",{get:function bundles(){if(!this._bundles){this._bundles=new s(this._version)}return this._bundles}});Object.defineProperty(RegulatoryComplianceListInstance,"endUsers",{get:function endUsers(){if(!this._endUsers){this._endUsers=new r(this._version)}return this._endUsers}});Object.defineProperty(RegulatoryComplianceListInstance,"endUserTypes",{get:function endUserTypes(){if(!this._endUserTypes){this._endUserTypes=new c(this._version)}return this._endUserTypes}});Object.defineProperty(RegulatoryComplianceListInstance,"regulations",{get:function regulations(){if(!this._regulations){this._regulations=new a(this._version)}return this._regulations}});Object.defineProperty(RegulatoryComplianceListInstance,"supportingDocuments",{get:function supportingDocuments(){if(!this._supportingDocuments){this._supportingDocuments=new u(this._version)}return this._supportingDocuments}});Object.defineProperty(RegulatoryComplianceListInstance,"supportingDocumentTypes",{get:function supportingDocumentTypes(){if(!this._supportingDocumentTypes){this._supportingDocumentTypes=new h(this._version)}return this._supportingDocumentTypes}});RegulatoryComplianceListInstance.toJSON=function toJSON(){return this._solution};RegulatoryComplianceListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return RegulatoryComplianceListInstance};t.exports={RegulatoryComplianceList:f}},27712:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(28306).EvaluationList;var c=i(59854).ItemAssignmentList;var a=i(60938);var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function BundleList(t){function BundleListInstance(t){return BundleListInstance.get(t)}BundleListInstance._version=t;BundleListInstance._solution={};BundleListInstance._uri=`/RegulatoryCompliance/Bundles`;BundleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.email)){throw new Error('Required parameter "opts.email" missing.')}var i=n.defer();var s=h.of({FriendlyName:o.get(t,"friendlyName"),Email:o.get(t,"email"),StatusCallback:o.get(t,"statusCallback"),RegulationSid:o.get(t,"regulationSid"),IsoCountry:o.get(t,"isoCountry"),EndUserType:o.get(t,"endUserType"),NumberType:o.get(t,"numberType")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BundleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BundleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BundleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Status:o.get(t,"status"),FriendlyName:o.get(t,"friendlyName"),RegulationSid:o.get(t,"regulationSid"),IsoCountry:o.get(t,"isoCountry"),NumberType:o.get(t,"numberType"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BundleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BundleListInstance.get=function get(t){return new l(this._version,t)};BundleListInstance.toJSON=function toJSON(){return this._solution};BundleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BundleListInstance};p=function BundlePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,a.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BundleInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.regulationSid=e.regulation_sid;this.friendlyName=e.friendly_name;this.status=e.status;this.validUntil=u.iso8601DateTime(e.valid_until);this.email=e.email;this.statusCallback=e.status_callback;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.evaluations=function evaluations(){return this._proxy.evaluations};d.prototype.itemAssignments=function itemAssignments(){return this._proxy.itemAssignments};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function BundleContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/Bundles/${e}`;this._evaluations=undefined;this._itemAssignments=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Status:o.get(t,"status"),StatusCallback:o.get(t,"statusCallback"),FriendlyName:o.get(t,"friendlyName"),Email:o.get(t,"email")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"evaluations",{get:function(){if(!this._evaluations){this._evaluations=new r(this._version,this._solution.sid)}return this._evaluations}});Object.defineProperty(l.prototype,"itemAssignments",{get:function(){if(!this._itemAssignments){this._itemAssignments=new c(this._version,this._solution.sid)}return this._itemAssignments}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BundleList:f,BundlePage:p,BundleInstance:d,BundleContext:l}},28306:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function EvaluationList(t,e){function EvaluationListInstance(t){return EvaluationListInstance.get(t)}EvaluationListInstance._version=t;EvaluationListInstance._solution={bundleSid:e};EvaluationListInstance._uri=`/RegulatoryCompliance/Bundles/${e}/Evaluations`;EvaluationListInstance.create=function create(t){var e=n.defer();var i=this._version.create({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.bundleSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};EvaluationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EvaluationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EvaluationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EvaluationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EvaluationListInstance.get=function get(t){return new p(this._version,this._solution.bundleSid,t)};EvaluationListInstance.toJSON=function toJSON(){return this._solution};EvaluationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EvaluationListInstance};h=function EvaluationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.bundleSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function EvaluationInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.regulationSid=e.regulation_sid;this.bundleSid=e.bundle_sid;this.status=e.status;this.results=e.results;this.dateCreated=c.iso8601DateTime(e.date_created);this.url=e.url;this._context=undefined;this._solution={bundleSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.bundleSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function EvaluationContext(t,e,i){this._version=t;this._solution={bundleSid:e,sid:i};this._uri=`/RegulatoryCompliance/Bundles/${e}/Evaluations/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.bundleSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EvaluationList:u,EvaluationPage:h,EvaluationInstance:f,EvaluationContext:p}},59854:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ItemAssignmentList(t,e){function ItemAssignmentListInstance(t){return ItemAssignmentListInstance.get(t)}ItemAssignmentListInstance._version=t;ItemAssignmentListInstance._solution={bundleSid:e};ItemAssignmentListInstance._uri=`/RegulatoryCompliance/Bundles/${e}/ItemAssignments`;ItemAssignmentListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.objectSid)){throw new Error('Required parameter "opts.objectSid" missing.')}var i=n.defer();var s=a.of({ObjectSid:o.get(t,"objectSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.bundleSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ItemAssignmentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ItemAssignmentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ItemAssignmentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ItemAssignmentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ItemAssignmentListInstance.get=function get(t){return new p(this._version,this._solution.bundleSid,t)};ItemAssignmentListInstance.toJSON=function toJSON(){return this._solution};ItemAssignmentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ItemAssignmentListInstance};h=function ItemAssignmentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.bundleSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ItemAssignmentInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.bundleSid=e.bundle_sid;this.accountSid=e.account_sid;this.objectSid=e.object_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.url=e.url;this._context=undefined;this._solution={bundleSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.bundleSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ItemAssignmentContext(t,e,i){this._version=t;this._solution={bundleSid:e,sid:i};this._uri=`/RegulatoryCompliance/Bundles/${e}/ItemAssignments/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.bundleSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ItemAssignmentList:u,ItemAssignmentPage:h,ItemAssignmentInstance:f,ItemAssignmentContext:p}},68798:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function EndUserList(t){function EndUserListInstance(t){return EndUserListInstance.get(t)}EndUserListInstance._version=t;EndUserListInstance._solution={};EndUserListInstance._uri=`/RegulatoryCompliance/EndUsers`;EndUserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Attributes:a.object(o.get(t,"attributes"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EndUserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EndUserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EndUserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EndUserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EndUserListInstance.get=function get(t){return new d(this._version,t)};EndUserListInstance.toJSON=function toJSON(){return this._solution};EndUserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EndUserListInstance};f=function EndUserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function EndUserInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.attributes=e.attributes;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function EndUserContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/EndUsers/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Attributes:a.object(o.get(t,"attributes"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EndUserList:h,EndUserPage:f,EndUserInstance:p,EndUserContext:d}},86094:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function EndUserTypeList(t){function EndUserTypeListInstance(t){return EndUserTypeListInstance.get(t)}EndUserTypeListInstance._version=t;EndUserTypeListInstance._solution={};EndUserTypeListInstance._uri=`/RegulatoryCompliance/EndUserTypes`;EndUserTypeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EndUserTypeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EndUserTypeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EndUserTypeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EndUserTypeListInstance.get=function get(t){return new f(this._version,t)};EndUserTypeListInstance.toJSON=function toJSON(){return this._solution};EndUserTypeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EndUserTypeListInstance};u=function EndUserTypePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function EndUserTypeInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.machineName=e.machine_name;this.fields=e.fields;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function EndUserTypeContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/EndUserTypes/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EndUserTypeList:a,EndUserTypePage:u,EndUserTypeInstance:h,EndUserTypeContext:f}},18721:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function RegulationList(t){function RegulationListInstance(t){return RegulationListInstance.get(t)}RegulationListInstance._version=t;RegulationListInstance._solution={};RegulationListInstance._uri=`/RegulatoryCompliance/Regulations`;RegulationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RegulationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RegulationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({EndUserType:o.get(t,"endUserType"),IsoCountry:o.get(t,"isoCountry"),NumberType:o.get(t,"numberType"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RegulationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RegulationListInstance.get=function get(t){return new f(this._version,t)};RegulationListInstance.toJSON=function toJSON(){return this._solution};RegulationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RegulationListInstance};u=function RegulationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function RegulationInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.isoCountry=e.iso_country;this.numberType=e.number_type;this.endUserType=e.end_user_type;this.requirements=e.requirements;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function RegulationContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/Regulations/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RegulationList:a,RegulationPage:u,RegulationInstance:h,RegulationContext:f}},32231:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function SupportingDocumentList(t){function SupportingDocumentListInstance(t){return SupportingDocumentListInstance.get(t)}SupportingDocumentListInstance._version=t;SupportingDocumentListInstance._solution={};SupportingDocumentListInstance._uri=`/RegulatoryCompliance/SupportingDocuments`;SupportingDocumentListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Attributes:a.object(o.get(t,"attributes"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SupportingDocumentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SupportingDocumentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SupportingDocumentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SupportingDocumentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SupportingDocumentListInstance.get=function get(t){return new d(this._version,t)};SupportingDocumentListInstance.toJSON=function toJSON(){return this._solution};SupportingDocumentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SupportingDocumentListInstance};f=function SupportingDocumentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SupportingDocumentInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.mimeType=e.mime_type;this.status=e.status;this.type=e.type;this.attributes=e.attributes;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SupportingDocumentContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/SupportingDocuments/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Attributes:a.object(o.get(t,"attributes"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SupportingDocumentList:h,SupportingDocumentPage:f,SupportingDocumentInstance:p,SupportingDocumentContext:d}},13301:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function SupportingDocumentTypeList(t){function SupportingDocumentTypeListInstance(t){return SupportingDocumentTypeListInstance.get(t)}SupportingDocumentTypeListInstance._version=t;SupportingDocumentTypeListInstance._solution={};SupportingDocumentTypeListInstance._uri=`/RegulatoryCompliance/SupportingDocumentTypes`;SupportingDocumentTypeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SupportingDocumentTypeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SupportingDocumentTypeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SupportingDocumentTypeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SupportingDocumentTypeListInstance.get=function get(t){return new f(this._version,t)};SupportingDocumentTypeListInstance.toJSON=function toJSON(){return this._solution};SupportingDocumentTypeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SupportingDocumentTypeListInstance};u=function SupportingDocumentTypePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function SupportingDocumentTypeInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.machineName=e.machine_name;this.fields=e.fields;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SupportingDocumentTypeContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/SupportingDocumentTypes/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SupportingDocumentTypeList:a,SupportingDocumentTypePage:u,SupportingDocumentTypeInstance:h,SupportingDocumentTypeContext:f}},1382:(t,e,i)=>{"use strict";var n=i(90250);var o=i(85387).ExportConfigurationList;var s=i(80683).ExportList;var r=i(64351);function BulkExports(t){r.prototype.constructor.call(this,t,"BulkExports");this._exports=undefined;this._exportConfiguration=undefined}n.extend(BulkExports.prototype,r.prototype);BulkExports.prototype.constructor=BulkExports;Object.defineProperty(BulkExports.prototype,"exports",{get:function(){this._exports=this._exports||new s(this);return this._exports}});Object.defineProperty(BulkExports.prototype,"exportConfiguration",{get:function(){this._exportConfiguration=this._exportConfiguration||new o(this);return this._exportConfiguration}});t.exports=BulkExports},82477:(t,e,i)=>{"use strict";var n=i(90250);var o=i(55897).FleetList;var s=i(64351);function DeployedDevices(t){s.prototype.constructor.call(this,t,"DeployedDevices");this._fleets=undefined}n.extend(DeployedDevices.prototype,s.prototype);DeployedDevices.prototype.constructor=DeployedDevices;Object.defineProperty(DeployedDevices.prototype,"fleets",{get:function(){this._fleets=this._fleets||new o(this);return this._fleets}});t.exports=DeployedDevices},39874:(t,e,i)=>{"use strict";var n=i(90250);var o=i(2676).AuthorizationDocumentList;var s=i(95372).HostedNumberOrderList;var r=i(64351);function HostedNumbers(t){r.prototype.constructor.call(this,t,"HostedNumbers");this._authorizationDocuments=undefined;this._hostedNumberOrders=undefined}n.extend(HostedNumbers.prototype,r.prototype);HostedNumbers.prototype.constructor=HostedNumbers;Object.defineProperty(HostedNumbers.prototype,"authorizationDocuments",{get:function(){this._authorizationDocuments=this._authorizationDocuments||new o(this);return this._authorizationDocuments}});Object.defineProperty(HostedNumbers.prototype,"hostedNumberOrders",{get:function(){this._hostedNumberOrders=this._hostedNumberOrders||new s(this);return this._hostedNumberOrders}});t.exports=HostedNumbers},87505:(t,e,i)=>{"use strict";var n=i(90250);var o=i(55988).AvailableAddOnList;var s=i(74874).InstalledAddOnList;var r=i(64351);function Marketplace(t){r.prototype.constructor.call(this,t,"marketplace");this._availableAddOns=undefined;this._installedAddOns=undefined}n.extend(Marketplace.prototype,r.prototype);Marketplace.prototype.constructor=Marketplace;Object.defineProperty(Marketplace.prototype,"availableAddOns",{get:function(){this._availableAddOns=this._availableAddOns||new o(this);return this._availableAddOns}});Object.defineProperty(Marketplace.prototype,"installedAddOns",{get:function(){this._installedAddOns=this._installedAddOns||new s(this);return this._installedAddOns}});t.exports=Marketplace},71881:(t,e,i)=>{"use strict";var n=i(90250);var o=i(53087).ServiceList;var s=i(64351);function Sync(t){s.prototype.constructor.call(this,t,"Sync");this._services=undefined}n.extend(Sync.prototype,s.prototype);Sync.prototype.constructor=Sync;Object.defineProperty(Sync.prototype,"services",{get:function(){this._services=this._services||new o(this);return this._services}});t.exports=Sync},63819:(t,e,i)=>{"use strict";var n=i(90250);var o=i(6611).BrandedChannelList;var s=i(47394).BrandsInformationList;var r=i(62599).CpsList;var c=i(75025).CurrentCallList;var a=i(64351);function TrustedComms(t){a.prototype.constructor.call(this,t,"TrustedComms");this._brandedChannels=undefined;this._brandsInformation=undefined;this._cps=undefined;this._currentCalls=undefined}n.extend(TrustedComms.prototype,a.prototype);TrustedComms.prototype.constructor=TrustedComms;Object.defineProperty(TrustedComms.prototype,"brandedChannels",{get:function(){this._brandedChannels=this._brandedChannels||new o(this);return this._brandedChannels}});Object.defineProperty(TrustedComms.prototype,"brandsInformation",{get:function(){this._brandsInformation=this._brandsInformation||new s(this);return this._brandsInformation}});Object.defineProperty(TrustedComms.prototype,"cps",{get:function(){this._cps=this._cps||new r(this);return this._cps}});Object.defineProperty(TrustedComms.prototype,"currentCalls",{get:function(){this._currentCalls=this._currentCalls||new c(this);return this._currentCalls}});t.exports=TrustedComms},89265:(t,e,i)=>{"use strict";var n=i(90250);var o=i(96714).AssistantList;var s=i(64351);function Understand(t){s.prototype.constructor.call(this,t,"understand");this._assistants=undefined}n.extend(Understand.prototype,s.prototype);Understand.prototype.constructor=Understand;Object.defineProperty(Understand.prototype,"assistants",{get:function(){this._assistants=this._assistants||new o(this);return this._assistants}});t.exports=Understand},87152:(t,e,i)=>{"use strict";var n=i(90250);var o=i(37480).CommandList;var s=i(44607).RatePlanList;var r=i(52633).SimList;var c=i(64351);function Wireless(t){c.prototype.constructor.call(this,t,"wireless");this._commands=undefined;this._ratePlans=undefined;this._sims=undefined}n.extend(Wireless.prototype,c.prototype);Wireless.prototype.constructor=Wireless;Object.defineProperty(Wireless.prototype,"commands",{get:function(){this._commands=this._commands||new o(this);return this._commands}});Object.defineProperty(Wireless.prototype,"ratePlans",{get:function(){this._ratePlans=this._ratePlans||new s(this);return this._ratePlans}});Object.defineProperty(Wireless.prototype,"sims",{get:function(){this._sims=this._sims||new r(this);return this._sims}});t.exports=Wireless},80683:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(18260).DayList;var c=i(51850).ExportCustomJobList;var a=i(33264).JobList;var u=i(60938);var h=i(72142);var f;var p;var d;var l;f=function ExportList(t){function ExportListInstance(t){return ExportListInstance.get(t)}ExportListInstance._version=t;ExportListInstance._solution={};ExportListInstance._jobs=undefined;ExportListInstance.get=function get(t){return new l(this._version,t)};Object.defineProperty(ExportListInstance,"jobs",{get:function jobs(){if(!this._jobs){this._jobs=new a(this._version)}return this._jobs}});ExportListInstance.toJSON=function toJSON(){return this._solution};ExportListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportListInstance};p=function ExportPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,u.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ExportInstance(t,e,i){this._version=t;this.resourceType=e.resource_type;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={resourceType:i||this.resourceType}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.resourceType)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.days=function days(){return this._proxy.days};d.prototype.exportCustomJobs=function exportCustomJobs(){return this._proxy.exportCustomJobs};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ExportContext(t,e){this._version=t;this._solution={resourceType:e};this._uri=`/Exports/${e}`;this._days=undefined;this._exportCustomJobs=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.resourceType))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"days",{get:function(){if(!this._days){this._days=new r(this._version,this._solution.resourceType)}return this._days}});Object.defineProperty(l.prototype,"exportCustomJobs",{get:function(){if(!this._exportCustomJobs){this._exportCustomJobs=new c(this._version,this._solution.resourceType)}return this._exportCustomJobs}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportList:f,ExportPage:p,ExportInstance:d,ExportContext:l}},18260:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DayList(t,e){function DayListInstance(t){return DayListInstance.get(t)}DayListInstance._version=t;DayListInstance._solution={resourceType:e};DayListInstance._uri=`/Exports/${e}/Days`;DayListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DayListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DayListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DayListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DayListInstance.get=function get(t){return new p(this._version,this._solution.resourceType,t)};DayListInstance.toJSON=function toJSON(){return this._solution};DayListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DayListInstance};h=function DayPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.resourceType)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DayInstance(t,e,i,n){this._version=t;this.redirectTo=e.redirect_to;this.day=e.day;this.size=c.integer(e.size);this.createDate=e.create_date;this.friendlyName=e.friendly_name;this.resourceType=e.resource_type;this._context=undefined;this._solution={resourceType:i,day:n||this.day}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.resourceType,this._solution.day)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DayContext(t,e,i){this._version=t;this._solution={resourceType:e,day:i};this._uri=`/Exports/${e}/Days/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.resourceType,this._solution.day))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DayList:u,DayPage:h,DayInstance:f,DayContext:p}},51850:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function ExportCustomJobList(t,e){function ExportCustomJobListInstance(t){return ExportCustomJobListInstance.get(t)}ExportCustomJobListInstance._version=t;ExportCustomJobListInstance._solution={resourceType:e};ExportCustomJobListInstance._uri=`/Exports/${e}/Jobs`;ExportCustomJobListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExportCustomJobListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExportCustomJobListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.startDay)){throw new Error('Required parameter "opts.startDay" missing.')}if(o.isUndefined(t.endDay)){throw new Error('Required parameter "opts.endDay" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=c.of({StartDay:o.get(t,"startDay"),EndDay:o.get(t,"endDay"),FriendlyName:o.get(t,"friendlyName"),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),Email:o.get(t,"email")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.toJSON=function toJSON(){return this._solution};ExportCustomJobListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportCustomJobListInstance};u=function ExportCustomJobPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.resourceType)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExportCustomJobInstance(t,e,i){this._version=t;this.friendlyName=e.friendly_name;this.resourceType=e.resource_type;this.startDay=e.start_day;this.endDay=e.end_day;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.email=e.email;this.jobSid=e.job_sid;this.details=e.details;this._context=undefined;this._solution={resourceType:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportCustomJobList:a,ExportCustomJobPage:u,ExportCustomJobInstance:h}},33264:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function JobList(t){function JobListInstance(t){return JobListInstance.get(t)}JobListInstance._version=t;JobListInstance._solution={};JobListInstance.get=function get(t){return new f(this._version,t)};JobListInstance.toJSON=function toJSON(){return this._solution};JobListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return JobListInstance};u=function JobPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function JobInstance(t,e,i){this._version=t;this.resourceType=e.resource_type;this.friendlyName=e.friendly_name;this.details=e.details;this.startDay=e.start_day;this.endDay=e.end_day;this.jobSid=e.job_sid;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.email=e.email;this.url=e.url;this._context=undefined;this._solution={jobSid:i||this.jobSid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.jobSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.remove=function remove(t){return this._proxy.remove(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function JobContext(t,e){this._version=t;this._solution={jobSid:e};this._uri=`/Exports/Jobs/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.jobSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={JobList:a,JobPage:u,JobInstance:h,JobContext:f}},85387:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function ExportConfigurationList(t){function ExportConfigurationListInstance(t){return ExportConfigurationListInstance.get(t)}ExportConfigurationListInstance._version=t;ExportConfigurationListInstance._solution={};ExportConfigurationListInstance.get=function get(t){return new p(this._version,t)};ExportConfigurationListInstance.toJSON=function toJSON(){return this._solution};ExportConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportConfigurationListInstance};h=function ExportConfigurationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExportConfigurationInstance(t,e,i){this._version=t;this.enabled=e.enabled;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.resourceType=e.resource_type;this.url=e.url;this._context=undefined;this._solution={resourceType:i||this.resourceType}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.resourceType)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ExportConfigurationContext(t,e){this._version=t;this._solution={resourceType:e};this._uri=`/Exports/${e}/Configuration`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.resourceType))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Enabled:c.bool(o.get(t,"enabled")),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.resourceType))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportConfigurationList:u,ExportConfigurationPage:h,ExportConfigurationInstance:f,ExportConfigurationContext:p}},55897:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(59777).CertificateList;var c=i(66020).DeploymentList;var a=i(41268).DeviceList;var u=i(34699).KeyList;var h=i(60938);var f=i(80513);var p=i(72142);var d;var l;var v;var m;d=function FleetList(t){function FleetListInstance(t){return FleetListInstance.get(t)}FleetListInstance._version=t;FleetListInstance._solution={};FleetListInstance._uri=`/Fleets`;FleetListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FleetListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FleetListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.get=function get(t){return new m(this._version,t)};FleetListInstance.toJSON=function toJSON(){return this._solution};FleetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FleetListInstance};l=function FleetPage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,h.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function FleetInstance(t,e,i){this._version=t;this.sid=e.sid;this.url=e.url;this.uniqueName=e.unique_name;this.friendlyName=e.friendly_name;this.accountSid=e.account_sid;this.defaultDeploymentSid=e.default_deployment_sid;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.devices=function devices(){return this._proxy.devices};v.prototype.deployments=function deployments(){return this._proxy.deployments};v.prototype.certificates=function certificates(){return this._proxy.certificates};v.prototype.keys=function keys(){return this._proxy.keys};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function FleetContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Fleets/${e}`;this._devices=undefined;this._deployments=undefined;this._certificates=undefined;this._keys=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),DefaultDeploymentSid:o.get(t,"defaultDeploymentSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"devices",{get:function(){if(!this._devices){this._devices=new a(this._version,this._solution.sid)}return this._devices}});Object.defineProperty(m.prototype,"deployments",{get:function(){if(!this._deployments){this._deployments=new c(this._version,this._solution.sid)}return this._deployments}});Object.defineProperty(m.prototype,"certificates",{get:function(){if(!this._certificates){this._certificates=new r(this._version,this._solution.sid)}return this._certificates}});Object.defineProperty(m.prototype,"keys",{get:function(){if(!this._keys){this._keys=new u(this._version,this._solution.sid)}return this._keys}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FleetList:d,FleetPage:l,FleetInstance:v,FleetContext:m}},59777:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CertificateList(t,e){function CertificateListInstance(t){return CertificateListInstance.get(t)}CertificateListInstance._version=t;CertificateListInstance._solution={fleetSid:e};CertificateListInstance._uri=`/Fleets/${e}/Certificates`;CertificateListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.certificateData)){throw new Error('Required parameter "opts.certificateData" missing.')}var i=n.defer();var s=a.of({CertificateData:o.get(t,"certificateData"),FriendlyName:o.get(t,"friendlyName"),DeviceSid:o.get(t,"deviceSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CertificateListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CertificateListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CertificateListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({DeviceSid:o.get(t,"deviceSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CertificateListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CertificateListInstance.get=function get(t){return new p(this._version,this._solution.fleetSid,t)};CertificateListInstance.toJSON=function toJSON(){return this._solution};CertificateListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CertificateListInstance};h=function CertificatePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.fleetSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CertificateInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.url=e.url;this.friendlyName=e.friendly_name;this.fleetSid=e.fleet_sid;this.accountSid=e.account_sid;this.deviceSid=e.device_sid;this.thumbprint=e.thumbprint;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={fleetSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.fleetSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CertificateContext(t,e,i){this._version=t;this._solution={fleetSid:e,sid:i};this._uri=`/Fleets/${e}/Certificates/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),DeviceSid:o.get(t,"deviceSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CertificateList:u,CertificatePage:h,CertificateInstance:f,CertificateContext:p}},66020:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DeploymentList(t,e){function DeploymentListInstance(t){return DeploymentListInstance.get(t)}DeploymentListInstance._version=t;DeploymentListInstance._solution={fleetSid:e};DeploymentListInstance._uri=`/Fleets/${e}/Deployments`;DeploymentListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),SyncServiceSid:o.get(t,"syncServiceSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DeploymentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DeploymentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.get=function get(t){return new p(this._version,this._solution.fleetSid,t)};DeploymentListInstance.toJSON=function toJSON(){return this._solution};DeploymentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeploymentListInstance};h=function DeploymentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.fleetSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DeploymentInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.url=e.url;this.friendlyName=e.friendly_name;this.fleetSid=e.fleet_sid;this.accountSid=e.account_sid;this.syncServiceSid=e.sync_service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={fleetSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.fleetSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeploymentContext(t,e,i){this._version=t;this._solution={fleetSid:e,sid:i};this._uri=`/Fleets/${e}/Deployments/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),SyncServiceSid:o.get(t,"syncServiceSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeploymentList:u,DeploymentPage:h,DeploymentInstance:f,DeploymentContext:p}},41268:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function DeviceList(t,e){function DeviceListInstance(t){return DeviceListInstance.get(t)}DeviceListInstance._version=t;DeviceListInstance._solution={fleetSid:e};DeviceListInstance._uri=`/Fleets/${e}/Devices`;DeviceListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),Identity:o.get(t,"identity"),DeploymentSid:o.get(t,"deploymentSid"),Enabled:a.bool(o.get(t,"enabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeviceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DeviceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DeviceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({DeploymentSid:o.get(t,"deploymentSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeviceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeviceListInstance.get=function get(t){return new d(this._version,this._solution.fleetSid,t)};DeviceListInstance.toJSON=function toJSON(){return this._solution};DeviceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeviceListInstance};f=function DevicePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.fleetSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeviceInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.url=e.url;this.uniqueName=e.unique_name;this.friendlyName=e.friendly_name;this.fleetSid=e.fleet_sid;this.enabled=e.enabled;this.accountSid=e.account_sid;this.identity=e.identity;this.deploymentSid=e.deployment_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.dateAuthenticated=c.iso8601DateTime(e.date_authenticated);this._context=undefined;this._solution={fleetSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.fleetSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function DeviceContext(t,e,i){this._version=t;this._solution={fleetSid:e,sid:i};this._uri=`/Fleets/${e}/Devices/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Identity:o.get(t,"identity"),DeploymentSid:o.get(t,"deploymentSid"),Enabled:a.bool(o.get(t,"enabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeviceList:h,DevicePage:f,DeviceInstance:p,DeviceContext:d}},34699:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function KeyList(t,e){function KeyListInstance(t){return KeyListInstance.get(t)}KeyListInstance._version=t;KeyListInstance._solution={fleetSid:e};KeyListInstance._uri=`/Fleets/${e}/Keys`;KeyListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),DeviceSid:o.get(t,"deviceSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};KeyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};KeyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};KeyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({DeviceSid:o.get(t,"deviceSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};KeyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};KeyListInstance.get=function get(t){return new p(this._version,this._solution.fleetSid,t)};KeyListInstance.toJSON=function toJSON(){return this._solution};KeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return KeyListInstance};h=function KeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.fleetSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function KeyInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.url=e.url;this.friendlyName=e.friendly_name;this.fleetSid=e.fleet_sid;this.accountSid=e.account_sid;this.deviceSid=e.device_sid;this.secret=e.secret;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={fleetSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.fleetSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function KeyContext(t,e,i){this._version=t;this._solution={fleetSid:e,sid:i};this._uri=`/Fleets/${e}/Keys/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),DeviceSid:o.get(t,"deviceSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={KeyList:u,KeyPage:h,KeyInstance:f,KeyContext:p}},2676:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60310).DependentHostedNumberOrderList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function AuthorizationDocumentList(t){function AuthorizationDocumentListInstance(t){return AuthorizationDocumentListInstance.get(t)}AuthorizationDocumentListInstance._version=t;AuthorizationDocumentListInstance._solution={};AuthorizationDocumentListInstance._uri=`/AuthorizationDocuments`;AuthorizationDocumentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AuthorizationDocumentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AuthorizationDocumentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Email:o.get(t,"email"),Status:o.get(t,"status"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthorizationDocumentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthorizationDocumentListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.hostedNumberOrderSids)){throw new Error('Required parameter "opts.hostedNumberOrderSids" missing.')}if(o.isUndefined(t.addressSid)){throw new Error('Required parameter "opts.addressSid" missing.')}if(o.isUndefined(t.email)){throw new Error('Required parameter "opts.email" missing.')}if(o.isUndefined(t.contactTitle)){throw new Error('Required parameter "opts.contactTitle" missing.')}if(o.isUndefined(t.contactPhoneNumber)){throw new Error('Required parameter "opts.contactPhoneNumber" missing.')}var i=n.defer();var s=h.of({HostedNumberOrderSids:u.map(o.get(t,"hostedNumberOrderSids"),function(t){return t}),AddressSid:o.get(t,"addressSid"),Email:o.get(t,"email"),ContactTitle:o.get(t,"contactTitle"),ContactPhoneNumber:o.get(t,"contactPhoneNumber"),CcEmails:u.map(o.get(t,"ccEmails"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthorizationDocumentListInstance.get=function get(t){return new l(this._version,t)};AuthorizationDocumentListInstance.toJSON=function toJSON(){return this._solution};AuthorizationDocumentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthorizationDocumentListInstance};p=function AuthorizationDocumentPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AuthorizationDocumentInstance(t,e,i){this._version=t;this.sid=e.sid;this.addressSid=e.address_sid;this.status=e.status;this.email=e.email;this.ccEmails=e.cc_emails;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.dependentHostedNumberOrders=function dependentHostedNumberOrders(){return this._proxy.dependentHostedNumberOrders};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function AuthorizationDocumentContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/AuthorizationDocuments/${e}`;this._dependentHostedNumberOrders=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({HostedNumberOrderSids:u.map(o.get(t,"hostedNumberOrderSids"),function(t){return t}),AddressSid:o.get(t,"addressSid"),Email:o.get(t,"email"),CcEmails:u.map(o.get(t,"ccEmails"),function(t){return t}),Status:o.get(t,"status"),ContactTitle:o.get(t,"contactTitle"),ContactPhoneNumber:o.get(t,"contactPhoneNumber")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"dependentHostedNumberOrders",{get:function(){if(!this._dependentHostedNumberOrders){this._dependentHostedNumberOrders=new r(this._version,this._solution.sid)}return this._dependentHostedNumberOrders}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthorizationDocumentList:f,AuthorizationDocumentPage:p,AuthorizationDocumentInstance:d,AuthorizationDocumentContext:l}},60310:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function DependentHostedNumberOrderList(t,e){function DependentHostedNumberOrderListInstance(t){return DependentHostedNumberOrderListInstance.get(t)}DependentHostedNumberOrderListInstance._version=t;DependentHostedNumberOrderListInstance._solution={signingDocumentSid:e};DependentHostedNumberOrderListInstance._uri=`/AuthorizationDocuments/${e}/DependentHostedNumberOrders`;DependentHostedNumberOrderListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DependentHostedNumberOrderListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DependentHostedNumberOrderListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Status:o.get(t,"status"),PhoneNumber:o.get(t,"phoneNumber"),IncomingPhoneNumberSid:o.get(t,"incomingPhoneNumberSid"),FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DependentHostedNumberOrderListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DependentHostedNumberOrderListInstance.toJSON=function toJSON(){return this._solution};DependentHostedNumberOrderListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DependentHostedNumberOrderListInstance};h=function DependentHostedNumberOrderPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.signingDocumentSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DependentHostedNumberOrderInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.incomingPhoneNumberSid=e.incoming_phone_number_sid;this.addressSid=e.address_sid;this.signingDocumentSid=e.signing_document_sid;this.phoneNumber=e.phone_number;this.capabilities=e.capabilities;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.status=e.status;this.failureReason=e.failure_reason;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.verificationAttempts=c.integer(e.verification_attempts);this.email=e.email;this.ccEmails=e.cc_emails;this.verificationType=e.verification_type;this.verificationDocumentSid=e.verification_document_sid;this.extension=e.extension;this.callDelay=c.integer(e.call_delay);this.verificationCode=e.verification_code;this.verificationCallSids=e.verification_call_sids;this._context=undefined;this._solution={signingDocumentSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DependentHostedNumberOrderList:u,DependentHostedNumberOrderPage:h,DependentHostedNumberOrderInstance:f}},95372:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function HostedNumberOrderList(t){function HostedNumberOrderListInstance(t){return HostedNumberOrderListInstance.get(t)}HostedNumberOrderListInstance._version=t;HostedNumberOrderListInstance._solution={};HostedNumberOrderListInstance._uri=`/HostedNumberOrders`;HostedNumberOrderListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};HostedNumberOrderListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};HostedNumberOrderListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Status:o.get(t,"status"),PhoneNumber:o.get(t,"phoneNumber"),IncomingPhoneNumberSid:o.get(t,"incomingPhoneNumberSid"),FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};HostedNumberOrderListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};HostedNumberOrderListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumber)){throw new Error('Required parameter "opts.phoneNumber" missing.')}if(o.isUndefined(t.smsCapability)){throw new Error('Required parameter "opts.smsCapability" missing.')}var i=n.defer();var s=u.of({PhoneNumber:o.get(t,"phoneNumber"),SmsCapability:a.bool(o.get(t,"smsCapability")),AccountSid:o.get(t,"accountSid"),FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),CcEmails:a.map(o.get(t,"ccEmails"),function(t){return t}),SmsUrl:o.get(t,"smsUrl"),SmsMethod:o.get(t,"smsMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),StatusCallbackUrl:o.get(t,"statusCallbackUrl"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),SmsApplicationSid:o.get(t,"smsApplicationSid"),AddressSid:o.get(t,"addressSid"),Email:o.get(t,"email"),VerificationType:o.get(t,"verificationType"),VerificationDocumentSid:o.get(t,"verificationDocumentSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};HostedNumberOrderListInstance.get=function get(t){return new d(this._version,t)};HostedNumberOrderListInstance.toJSON=function toJSON(){return this._solution};HostedNumberOrderListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return HostedNumberOrderListInstance};f=function HostedNumberOrderPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function HostedNumberOrderInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.incomingPhoneNumberSid=e.incoming_phone_number_sid;this.addressSid=e.address_sid;this.signingDocumentSid=e.signing_document_sid;this.phoneNumber=e.phone_number;this.capabilities=e.capabilities;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.status=e.status;this.failureReason=e.failure_reason;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.verificationAttempts=c.integer(e.verification_attempts);this.email=e.email;this.ccEmails=e.cc_emails;this.url=e.url;this.verificationType=e.verification_type;this.verificationDocumentSid=e.verification_document_sid;this.extension=e.extension;this.callDelay=c.integer(e.call_delay);this.verificationCode=e.verification_code;this.verificationCallSids=e.verification_call_sids;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function HostedNumberOrderContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/HostedNumberOrders/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Email:o.get(t,"email"),CcEmails:a.map(o.get(t,"ccEmails"),function(t){return t}),Status:o.get(t,"status"),VerificationCode:o.get(t,"verificationCode"),VerificationType:o.get(t,"verificationType"),VerificationDocumentSid:o.get(t,"verificationDocumentSid"),Extension:o.get(t,"extension"),CallDelay:o.get(t,"callDelay")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={HostedNumberOrderList:h,HostedNumberOrderPage:f,HostedNumberOrderInstance:p,HostedNumberOrderContext:d}},55988:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(71509).AvailableAddOnExtensionList;var c=i(60938);var a=i(72142);var u;var h;var f;var p;u=function AvailableAddOnList(t){function AvailableAddOnListInstance(t){return AvailableAddOnListInstance.get(t)}AvailableAddOnListInstance._version=t;AvailableAddOnListInstance._solution={};AvailableAddOnListInstance._uri=`/AvailableAddOns`;AvailableAddOnListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AvailableAddOnListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AvailableAddOnListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailableAddOnListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailableAddOnListInstance.get=function get(t){return new p(this._version,t)};AvailableAddOnListInstance.toJSON=function toJSON(){return this._solution};AvailableAddOnListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AvailableAddOnListInstance};h=function AvailableAddOnPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,c.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AvailableAddOnInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.description=e.description;this.pricingType=e.pricing_type;this.configurationSchema=e.configuration_schema;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.extensions=function extensions(){return this._proxy.extensions};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AvailableAddOnContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/AvailableAddOns/${e}`;this._extensions=undefined};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(p.prototype,"extensions",{get:function(){if(!this._extensions){this._extensions=new r(this._version,this._solution.sid)}return this._extensions}});p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AvailableAddOnList:u,AvailableAddOnPage:h,AvailableAddOnInstance:f,AvailableAddOnContext:p}},71509:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function AvailableAddOnExtensionList(t,e){function AvailableAddOnExtensionListInstance(t){return AvailableAddOnExtensionListInstance.get(t)}AvailableAddOnExtensionListInstance._version=t;AvailableAddOnExtensionListInstance._solution={availableAddOnSid:e};AvailableAddOnExtensionListInstance._uri=`/AvailableAddOns/${e}/Extensions`;AvailableAddOnExtensionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AvailableAddOnExtensionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AvailableAddOnExtensionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailableAddOnExtensionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailableAddOnExtensionListInstance.get=function get(t){return new f(this._version,this._solution.availableAddOnSid,t)};AvailableAddOnExtensionListInstance.toJSON=function toJSON(){return this._solution};AvailableAddOnExtensionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AvailableAddOnExtensionListInstance};u=function AvailableAddOnExtensionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.availableAddOnSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function AvailableAddOnExtensionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.availableAddOnSid=e.available_add_on_sid;this.friendlyName=e.friendly_name;this.productName=e.product_name;this.uniqueName=e.unique_name;this.url=e.url;this._context=undefined;this._solution={availableAddOnSid:i,sid:n||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.availableAddOnSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AvailableAddOnExtensionContext(t,e,i){this._version=t;this._solution={availableAddOnSid:e,sid:i};this._uri=`/AvailableAddOns/${e}/Extensions/${i}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.availableAddOnSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AvailableAddOnExtensionList:a,AvailableAddOnExtensionPage:u,AvailableAddOnExtensionInstance:h,AvailableAddOnExtensionContext:f}},74874:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(20517).InstalledAddOnExtensionList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function InstalledAddOnList(t){function InstalledAddOnListInstance(t){return InstalledAddOnListInstance.get(t)}InstalledAddOnListInstance._version=t;InstalledAddOnListInstance._solution={};InstalledAddOnListInstance._uri=`/InstalledAddOns`;InstalledAddOnListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.availableAddOnSid)){throw new Error('Required parameter "opts.availableAddOnSid" missing.')}if(o.isUndefined(t.acceptTermsOfService)){throw new Error('Required parameter "opts.acceptTermsOfService" missing.')}var i=n.defer();var s=h.of({AvailableAddOnSid:o.get(t,"availableAddOnSid"),AcceptTermsOfService:u.bool(o.get(t,"acceptTermsOfService")),Configuration:u.object(o.get(t,"configuration")),UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InstalledAddOnListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InstalledAddOnListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InstalledAddOnListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InstalledAddOnListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InstalledAddOnListInstance.get=function get(t){return new l(this._version,t)};InstalledAddOnListInstance.toJSON=function toJSON(){return this._solution};InstalledAddOnListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InstalledAddOnListInstance};p=function InstalledAddOnPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function InstalledAddOnInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.description=e.description;this.configuration=e.configuration;this.uniqueName=e.unique_name;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.extensions=function extensions(){return this._proxy.extensions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function InstalledAddOnContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/InstalledAddOns/${e}`;this._extensions=undefined};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Configuration:u.object(o.get(t,"configuration")),UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"extensions",{get:function(){if(!this._extensions){this._extensions=new r(this._version,this._solution.sid)}return this._extensions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InstalledAddOnList:f,InstalledAddOnPage:p,InstalledAddOnInstance:d,InstalledAddOnContext:l}},20517:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function InstalledAddOnExtensionList(t,e){function InstalledAddOnExtensionListInstance(t){return InstalledAddOnExtensionListInstance.get(t)}InstalledAddOnExtensionListInstance._version=t;InstalledAddOnExtensionListInstance._solution={installedAddOnSid:e};InstalledAddOnExtensionListInstance._uri=`/InstalledAddOns/${e}/Extensions`;InstalledAddOnExtensionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InstalledAddOnExtensionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InstalledAddOnExtensionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InstalledAddOnExtensionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InstalledAddOnExtensionListInstance.get=function get(t){return new p(this._version,this._solution.installedAddOnSid,t)};InstalledAddOnExtensionListInstance.toJSON=function toJSON(){return this._solution};InstalledAddOnExtensionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InstalledAddOnExtensionListInstance};h=function InstalledAddOnExtensionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.installedAddOnSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function InstalledAddOnExtensionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.installedAddOnSid=e.installed_add_on_sid;this.friendlyName=e.friendly_name;this.productName=e.product_name;this.uniqueName=e.unique_name;this.enabled=e.enabled;this.url=e.url;this._context=undefined;this._solution={installedAddOnSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.installedAddOnSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InstalledAddOnExtensionContext(t,e,i){this._version=t;this._solution={installedAddOnSid:e,sid:i};this._uri=`/InstalledAddOns/${e}/Extensions/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.installedAddOnSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.enabled)){throw new Error('Required parameter "opts.enabled" missing.')}var i=n.defer();var s=a.of({Enabled:c.bool(o.get(t,"enabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.installedAddOnSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InstalledAddOnExtensionList:u,InstalledAddOnExtensionPage:h,InstalledAddOnExtensionInstance:f,InstalledAddOnExtensionContext:p}},53087:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(28234).DocumentList;var c=i(60938);var a=i(45068).SyncListList;var u=i(47515).SyncMapList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),WebhookUrl:o.get(t,"webhookUrl"),ReachabilityWebhooksEnabled:f.bool(o.get(t,"reachabilityWebhooksEnabled")),AclEnabled:f.bool(o.get(t,"aclEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new m(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};l=function ServicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.url=e.url;this.webhookUrl=e.webhook_url;this.reachabilityWebhooksEnabled=e.reachability_webhooks_enabled;this.aclEnabled=e.acl_enabled;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.documents=function documents(){return this._proxy.documents};v.prototype.syncLists=function syncLists(){return this._proxy.syncLists};v.prototype.syncMaps=function syncMaps(){return this._proxy.syncMaps};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._documents=undefined;this._syncLists=undefined;this._syncMaps=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({WebhookUrl:o.get(t,"webhookUrl"),FriendlyName:o.get(t,"friendlyName"),ReachabilityWebhooksEnabled:f.bool(o.get(t,"reachabilityWebhooksEnabled")),AclEnabled:f.bool(o.get(t,"aclEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"documents",{get:function(){if(!this._documents){this._documents=new r(this._version,this._solution.sid)}return this._documents}});Object.defineProperty(m.prototype,"syncLists",{get:function(){if(!this._syncLists){this._syncLists=new a(this._version,this._solution.sid)}return this._syncLists}});Object.defineProperty(m.prototype,"syncMaps",{get:function(){if(!this._syncMaps){this._syncMaps=new u(this._version,this._solution.sid)}return this._syncMaps}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:d,ServicePage:l,ServiceInstance:v,ServiceContext:m}},28234:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(58236).DocumentPermissionList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function DocumentList(t,e){function DocumentListInstance(t){return DocumentListInstance.get(t)}DocumentListInstance._version=t;DocumentListInstance._solution={serviceSid:e};DocumentListInstance._uri=`/Services/${e}/Documents`;DocumentListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),Data:u.object(o.get(t,"data"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DocumentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DocumentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};DocumentListInstance.toJSON=function toJSON(){return this._solution};DocumentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DocumentListInstance};p=function DocumentPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function DocumentInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.data=e.data;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.documentPermissions=function documentPermissions(){return this._proxy.documentPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function DocumentContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Documents/${i}`;this._documentPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=h.of({Data:u.object(o.get(t,"data"))});var r=h.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"documentPermissions",{get:function(){if(!this._documentPermissions){this._documentPermissions=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._documentPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DocumentList:f,DocumentPage:p,DocumentInstance:d,DocumentContext:l}},58236:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function DocumentPermissionList(t,e,i){function DocumentPermissionListInstance(t){return DocumentPermissionListInstance.get(t)}DocumentPermissionListInstance._version=t;DocumentPermissionListInstance._solution={serviceSid:e,documentSid:i};DocumentPermissionListInstance._uri=`/Services/${e}/Documents/${i}/Permissions`;DocumentPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DocumentPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DocumentPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.documentSid,t)};DocumentPermissionListInstance.toJSON=function toJSON(){return this._solution};DocumentPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DocumentPermissionListInstance};h=function DocumentPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.documentSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DocumentPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.documentSid=e.document_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,documentSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.documentSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DocumentPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,documentSid:i,identity:n};this._uri=`/Services/${e}/Documents/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.documentSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.documentSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DocumentPermissionList:u,DocumentPermissionPage:h,DocumentPermissionInstance:f,DocumentPermissionContext:p}},45068:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(58940).SyncListItemList;var a=i(14413).SyncListPermissionList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function SyncListList(t,e){function SyncListListInstance(t){return SyncListListInstance.get(t)}SyncListListInstance._version=t;SyncListListInstance._solution={serviceSid:e};SyncListListInstance._uri=`/Services/${e}/Lists`;SyncListListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};SyncListListInstance.toJSON=function toJSON(){return this._solution};SyncListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListListInstance};p=function SyncListPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncListInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.syncListItems=function syncListItems(){return this._proxy.syncListItems};d.prototype.syncListPermissions=function syncListPermissions(){return this._proxy.syncListPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SyncListContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Lists/${i}`;this._syncListItems=undefined;this._syncListPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"syncListItems",{get:function(){if(!this._syncListItems){this._syncListItems=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncListItems}});Object.defineProperty(l.prototype,"syncListPermissions",{get:function(){if(!this._syncListPermissions){this._syncListPermissions=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncListPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListList:f,SyncListPage:p,SyncListInstance:d,SyncListContext:l}},58940:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function SyncListItemList(t,e,i){function SyncListItemListInstance(t){return SyncListItemListInstance.get(t)}SyncListItemListInstance._version=t;SyncListItemListInstance._solution={serviceSid:e,listSid:i};SyncListItemListInstance._uri=`/Services/${e}/Lists/${i}/Items`;SyncListItemListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListItemListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListItemListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),From:o.get(t,"from"),Bounds:o.get(t,"bounds"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.listSid,t)};SyncListItemListInstance.toJSON=function toJSON(){return this._solution};SyncListItemListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListItemListInstance};f=function SyncListItemPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.listSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncListItemInstance(t,e,i,n,o){this._version=t;this.index=c.integer(e.index);this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.listSid=e.list_sid;this.url=e.url;this.revision=e.revision;this.data=e.data;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,listSid:n,index:o||this.index}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.listSid,this._solution.index)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncListItemContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,listSid:i,index:n};this._uri=`/Services/${e}/Lists/${i}/Items/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data"))});var r=u.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListItemList:h,SyncListItemPage:f,SyncListItemInstance:p,SyncListItemContext:d}},14413:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function SyncListPermissionList(t,e,i){function SyncListPermissionListInstance(t){return SyncListPermissionListInstance.get(t)}SyncListPermissionListInstance._version=t;SyncListPermissionListInstance._solution={serviceSid:e,listSid:i};SyncListPermissionListInstance._uri=`/Services/${e}/Lists/${i}/Permissions`;SyncListPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.listSid,t)};SyncListPermissionListInstance.toJSON=function toJSON(){return this._solution};SyncListPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListPermissionListInstance};h=function SyncListPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.listSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SyncListPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.listSid=e.list_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,listSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.listSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncListPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,listSid:i,identity:n};this._uri=`/Services/${e}/Lists/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListPermissionList:u,SyncListPermissionPage:h,SyncListPermissionInstance:f,SyncListPermissionContext:p}},47515:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(76296).SyncMapItemList;var a=i(51290).SyncMapPermissionList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function SyncMapList(t,e){function SyncMapListInstance(t){return SyncMapListInstance.get(t)}SyncMapListInstance._version=t;SyncMapListInstance._solution={serviceSid:e};SyncMapListInstance._uri=`/Services/${e}/Maps`;SyncMapListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};SyncMapListInstance.toJSON=function toJSON(){return this._solution};SyncMapListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapListInstance};p=function SyncMapPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncMapInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.syncMapItems=function syncMapItems(){return this._proxy.syncMapItems};d.prototype.syncMapPermissions=function syncMapPermissions(){return this._proxy.syncMapPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SyncMapContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Maps/${i}`;this._syncMapItems=undefined;this._syncMapPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"syncMapItems",{get:function(){if(!this._syncMapItems){this._syncMapItems=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncMapItems}});Object.defineProperty(l.prototype,"syncMapPermissions",{get:function(){if(!this._syncMapPermissions){this._syncMapPermissions=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncMapPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapList:f,SyncMapPage:p,SyncMapInstance:d,SyncMapContext:l}},76296:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function SyncMapItemList(t,e,i){function SyncMapItemListInstance(t){return SyncMapItemListInstance.get(t)}SyncMapItemListInstance._version=t;SyncMapItemListInstance._solution={serviceSid:e,mapSid:i};SyncMapItemListInstance._uri=`/Services/${e}/Maps/${i}/Items`;SyncMapItemListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.key)){throw new Error('Required parameter "opts.key" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Key:o.get(t,"key"),Data:a.object(o.get(t,"data"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapItemListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapItemListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),From:o.get(t,"from"),Bounds:o.get(t,"bounds"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.mapSid,t)};SyncMapItemListInstance.toJSON=function toJSON(){return this._solution};SyncMapItemListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapItemListInstance};f=function SyncMapItemPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.mapSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncMapItemInstance(t,e,i,n,o){this._version=t;this.key=e.key;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.mapSid=e.map_sid;this.url=e.url;this.revision=e.revision;this.data=e.data;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,mapSid:n,key:o||this.key}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.mapSid,this._solution.key)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncMapItemContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,mapSid:i,key:n};this._uri=`/Services/${e}/Maps/${i}/Items/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data"))});var r=u.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapItemList:h,SyncMapItemPage:f,SyncMapItemInstance:p,SyncMapItemContext:d}},51290:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function SyncMapPermissionList(t,e,i){function SyncMapPermissionListInstance(t){return SyncMapPermissionListInstance.get(t)}SyncMapPermissionListInstance._version=t;SyncMapPermissionListInstance._solution={serviceSid:e,mapSid:i};SyncMapPermissionListInstance._uri=`/Services/${e}/Maps/${i}/Permissions`;SyncMapPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.mapSid,t)};SyncMapPermissionListInstance.toJSON=function toJSON(){return this._solution};SyncMapPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapPermissionListInstance};h=function SyncMapPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.mapSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SyncMapPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.mapSid=e.map_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,mapSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.mapSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncMapPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,mapSid:i,identity:n};this._uri=`/Services/${e}/Maps/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapPermissionList:u,SyncMapPermissionPage:h,SyncMapPermissionInstance:f,SyncMapPermissionContext:p}},6611:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(92290).ChannelList;var c=i(60938);var a=i(72142);var u;var h;var f;var p;u=function BrandedChannelList(t){function BrandedChannelListInstance(t){return BrandedChannelListInstance.get(t)}BrandedChannelListInstance._version=t;BrandedChannelListInstance._solution={};BrandedChannelListInstance.get=function get(t){return new p(this._version,t)};BrandedChannelListInstance.toJSON=function toJSON(){return this._solution};BrandedChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BrandedChannelListInstance};h=function BrandedChannelPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,c.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function BrandedChannelInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.businessSid=e.business_sid;this.brandSid=e.brand_sid;this.sid=e.sid;this.links=e.links;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.channels=function channels(){return this._proxy.channels};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BrandedChannelContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/BrandedChannels/${e}`;this._channels=undefined};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(p.prototype,"channels",{get:function(){if(!this._channels){this._channels=new r(this._version,this._solution.sid)}return this._channels}});p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BrandedChannelList:u,BrandedChannelPage:h,BrandedChannelInstance:f,BrandedChannelContext:p}},92290:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function ChannelList(t,e){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={brandedChannelSid:e};ChannelListInstance._uri=`/BrandedChannels/${e}/Channels`;ChannelListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumberSid)){throw new Error('Required parameter "opts.phoneNumberSid" missing.')}var i=n.defer();var s=c.of({PhoneNumberSid:o.get(t,"phoneNumberSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};u=function ChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.brandedChannelSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ChannelInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.businessSid=e.business_sid;this.brandSid=e.brand_sid;this.brandedChannelSid=e.branded_channel_sid;this.phoneNumberSid=e.phone_number_sid;this.phoneNumber=e.phone_number;this.url=e.url;this._context=undefined;this._solution={brandedChannelSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:a,ChannelPage:u,ChannelInstance:h}},47394:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function BrandsInformationList(t){function BrandsInformationListInstance(t){return BrandsInformationListInstance.get(t)}BrandsInformationListInstance._version=t;BrandsInformationListInstance._solution={};BrandsInformationListInstance.get=function get(){return new p(this._version)};BrandsInformationListInstance.toJSON=function toJSON(){return this._solution};BrandsInformationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BrandsInformationListInstance};h=function BrandsInformationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function BrandsInformationInstance(t,e){this._version=t;this.updateTime=c.iso8601DateTime(e.update_time);this.fileLink=e.file_link;this.fileLinkTtlInSeconds=e.file_link_ttl_in_seconds;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BrandsInformationContext(t){this._version=t;this._solution={};this._uri=`/BrandsInformation`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({"If-None-Match":o.get(t,"ifNoneMatch")});var r=this._version.fetch({uri:this._uri,method:"GET",headers:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BrandsInformationList:u,BrandsInformationPage:h,BrandsInformationInstance:f,BrandsInformationContext:p}},62599:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function CpsList(t){function CpsListInstance(t){return CpsListInstance.get(t)}CpsListInstance._version=t;CpsListInstance._solution={};CpsListInstance.get=function get(){return new f(this._version)};CpsListInstance.toJSON=function toJSON(){return this._solution};CpsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CpsListInstance};u=function CpsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function CpsInstance(t,e){this._version=t;this.cpsUrl=e.cps_url;this.phoneNumber=e.phone_number;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version)}return this._context}});h.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CpsContext(t){this._version=t;this._solution={};this._uri=`/CPS`};f.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({"X-Xcnam-Sensitive-Phone-Number":o.get(t,"xXcnamSensitivePhoneNumber")});var r=this._version.fetch({uri:this._uri,method:"GET",headers:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CpsList:a,CpsPage:u,CpsInstance:h,CpsContext:f}},75025:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CurrentCallList(t){function CurrentCallListInstance(t){return CurrentCallListInstance.get(t)}CurrentCallListInstance._version=t;CurrentCallListInstance._solution={};CurrentCallListInstance.get=function get(){return new p(this._version)};CurrentCallListInstance.toJSON=function toJSON(){return this._solution};CurrentCallListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CurrentCallListInstance};h=function CurrentCallPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CurrentCallInstance(t,e){this._version=t;this.bgColor=e.bg_color;this.caller=e.caller;this.createdAt=c.iso8601DateTime(e.created_at);this.fontColor=e.font_color;this.from=e.from;this.logo=e.logo;this.manager=e.manager;this.reason=e.reason;this.shieldImg=e.shield_img;this.sid=e.sid;this.status=e.status;this.to=e.to;this.url=e.url;this.useCase=e.use_case;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CurrentCallContext(t){this._version=t;this._solution={};this._uri=`/CurrentCall`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({"X-Xcnam-Sensitive-Phone-Number-From":o.get(t,"xXcnamSensitivePhoneNumberFrom"),"X-Xcnam-Sensitive-Phone-Number-To":o.get(t,"xXcnamSensitivePhoneNumberTo")});var r=this._version.fetch({uri:this._uri,method:"GET",headers:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CurrentCallList:u,CurrentCallPage:h,CurrentCallInstance:f,CurrentCallContext:p}},96714:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(51746).AssistantFallbackActionsList;var c=i(33903).AssistantInitiationActionsList;var a=i(96381).DialogueList;var u=i(40281).FieldTypeList;var h=i(80365).ModelBuildList;var f=i(60938);var p=i(60731).QueryList;var d=i(70387).StyleSheetList;var l=i(75994).TaskList;var v=i(80513);var m=i(6372);var _=i(72142);var g;var y;var S;var b;g=function AssistantList(t){function AssistantListInstance(t){return AssistantListInstance.get(t)}AssistantListInstance._version=t;AssistantListInstance._solution={};AssistantListInstance._uri=`/Assistants`;AssistantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssistantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssistantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({FriendlyName:o.get(t,"friendlyName"),LogQueries:m.bool(o.get(t,"logQueries")),UniqueName:o.get(t,"uniqueName"),CallbackUrl:o.get(t,"callbackUrl"),CallbackEvents:o.get(t,"callbackEvents"),FallbackActions:m.object(o.get(t,"fallbackActions")),InitiationActions:m.object(o.get(t,"initiationActions")),StyleSheet:m.object(o.get(t,"styleSheet"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new S(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.get=function get(t){return new b(this._version,t)};AssistantListInstance.toJSON=function toJSON(){return this._solution};AssistantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssistantListInstance};y=function AssistantPage(t,e,i){this._solution=i;f.prototype.constructor.call(this,t,e,this._solution)};o.extend(y.prototype,f.prototype);y.prototype.constructor=y;y.prototype.getInstance=function getInstance(t){return new S(this._version,t)};y.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};S=function AssistantInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.dateCreated=v.iso8601DateTime(e.date_created);this.dateUpdated=v.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.latestModelBuildSid=e.latest_model_build_sid;this.links=e.links;this.logQueries=e.log_queries;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this.callbackUrl=e.callback_url;this.callbackEvents=e.callback_events;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(S.prototype,"_proxy",{get:function(){if(!this._context){this._context=new b(this._version,this._solution.sid)}return this._context}});S.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};S.prototype.update=function update(t,e){return this._proxy.update(t,e)};S.prototype.remove=function remove(t){return this._proxy.remove(t)};S.prototype.fieldTypes=function fieldTypes(){return this._proxy.fieldTypes};S.prototype.tasks=function tasks(){return this._proxy.tasks};S.prototype.modelBuilds=function modelBuilds(){return this._proxy.modelBuilds};S.prototype.queries=function queries(){return this._proxy.queries};S.prototype.assistantFallbackActions=function assistantFallbackActions(){return this._proxy.assistantFallbackActions};S.prototype.assistantInitiationActions=function assistantInitiationActions(){return this._proxy.assistantInitiationActions};S.prototype.dialogues=function dialogues(){return this._proxy.dialogues};S.prototype.styleSheet=function styleSheet(){return this._proxy.styleSheet};S.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};S.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};b=function AssistantContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Assistants/${e}`;this._fieldTypes=undefined;this._tasks=undefined;this._modelBuilds=undefined;this._queries=undefined;this._assistantFallbackActions=undefined;this._assistantInitiationActions=undefined;this._dialogues=undefined;this._styleSheet=undefined};b.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new S(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};b.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({FriendlyName:o.get(t,"friendlyName"),LogQueries:m.bool(o.get(t,"logQueries")),UniqueName:o.get(t,"uniqueName"),CallbackUrl:o.get(t,"callbackUrl"),CallbackEvents:o.get(t,"callbackEvents"),FallbackActions:m.object(o.get(t,"fallbackActions")),InitiationActions:m.object(o.get(t,"initiationActions")),StyleSheet:m.object(o.get(t,"styleSheet"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new S(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};b.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(b.prototype,"fieldTypes",{get:function(){if(!this._fieldTypes){this._fieldTypes=new u(this._version,this._solution.sid)}return this._fieldTypes}});Object.defineProperty(b.prototype,"tasks",{get:function(){if(!this._tasks){this._tasks=new l(this._version,this._solution.sid)}return this._tasks}});Object.defineProperty(b.prototype,"modelBuilds",{get:function(){if(!this._modelBuilds){this._modelBuilds=new h(this._version,this._solution.sid)}return this._modelBuilds}});Object.defineProperty(b.prototype,"queries",{get:function(){if(!this._queries){this._queries=new p(this._version,this._solution.sid)}return this._queries}});Object.defineProperty(b.prototype,"assistantFallbackActions",{get:function(){if(!this._assistantFallbackActions){this._assistantFallbackActions=new r(this._version,this._solution.sid)}return this._assistantFallbackActions}});Object.defineProperty(b.prototype,"assistantInitiationActions",{get:function(){if(!this._assistantInitiationActions){this._assistantInitiationActions=new c(this._version,this._solution.sid)}return this._assistantInitiationActions}});Object.defineProperty(b.prototype,"dialogues",{get:function(){if(!this._dialogues){this._dialogues=new a(this._version,this._solution.sid)}return this._dialogues}});Object.defineProperty(b.prototype,"styleSheet",{get:function(){if(!this._styleSheet){this._styleSheet=new d(this._version,this._solution.sid)}return this._styleSheet}});b.prototype.toJSON=function toJSON(){return this._solution};b.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssistantList:g,AssistantPage:y,AssistantInstance:S,AssistantContext:b}},51746:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function AssistantFallbackActionsList(t,e){function AssistantFallbackActionsListInstance(t){return AssistantFallbackActionsListInstance.get(t)}AssistantFallbackActionsListInstance._version=t;AssistantFallbackActionsListInstance._solution={assistantSid:e};AssistantFallbackActionsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid)};AssistantFallbackActionsListInstance.toJSON=function toJSON(){return this._solution};AssistantFallbackActionsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssistantFallbackActionsListInstance};h=function AssistantFallbackActionsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AssistantFallbackActionsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AssistantFallbackActionsContext(t,e){this._version=t;this._solution={assistantSid:e};this._uri=`/Assistants/${e}/FallbackActions`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FallbackActions:c.object(o.get(t,"fallbackActions"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssistantFallbackActionsList:u,AssistantFallbackActionsPage:h,AssistantFallbackActionsInstance:f,AssistantFallbackActionsContext:p}},33903:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function AssistantInitiationActionsList(t,e){function AssistantInitiationActionsListInstance(t){return AssistantInitiationActionsListInstance.get(t)}AssistantInitiationActionsListInstance._version=t;AssistantInitiationActionsListInstance._solution={assistantSid:e};AssistantInitiationActionsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid)};AssistantInitiationActionsListInstance.toJSON=function toJSON(){return this._solution};AssistantInitiationActionsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssistantInitiationActionsListInstance};h=function AssistantInitiationActionsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AssistantInitiationActionsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AssistantInitiationActionsContext(t,e){this._version=t;this._solution={assistantSid:e};this._uri=`/Assistants/${e}/InitiationActions`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({InitiationActions:c.object(o.get(t,"initiationActions"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssistantInitiationActionsList:u,AssistantInitiationActionsPage:h,AssistantInitiationActionsInstance:f,AssistantInitiationActionsContext:p}},96381:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function DialogueList(t,e){function DialogueListInstance(t){return DialogueListInstance.get(t)}DialogueListInstance._version=t;DialogueListInstance._solution={assistantSid:e};DialogueListInstance.get=function get(t){return new f(this._version,this._solution.assistantSid,t)};DialogueListInstance.toJSON=function toJSON(){return this._solution};DialogueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DialogueListInstance};u=function DialoguePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.assistantSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function DialogueInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.data=e.data;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DialogueContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Dialogues/${i}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DialogueList:a,DialoguePage:u,DialogueInstance:h,DialogueContext:f}},40281:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(47746).FieldValueList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function FieldTypeList(t,e){function FieldTypeListInstance(t){return FieldTypeListInstance.get(t)}FieldTypeListInstance._version=t;FieldTypeListInstance._solution={assistantSid:e};FieldTypeListInstance._uri=`/Assistants/${e}/FieldTypes`;FieldTypeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldTypeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldTypeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.get=function get(t){return new d(this._version,this._solution.assistantSid,t)};FieldTypeListInstance.toJSON=function toJSON(){return this._solution};FieldTypeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldTypeListInstance};f=function FieldTypePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.assistantSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldTypeInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.links=e.links;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fieldValues=function fieldValues(){return this._proxy.fieldValues};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FieldTypeContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/FieldTypes/${i}`;this._fieldValues=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"fieldValues",{get:function(){if(!this._fieldValues){this._fieldValues=new r(this._version,this._solution.assistantSid,this._solution.sid)}return this._fieldValues}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldTypeList:h,FieldTypePage:f,FieldTypeInstance:p,FieldTypeContext:d}},47746:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FieldValueList(t,e,i){function FieldValueListInstance(t){return FieldValueListInstance.get(t)}FieldValueListInstance._version=t;FieldValueListInstance._solution={assistantSid:e,fieldTypeSid:i};FieldValueListInstance._uri=`/Assistants/${e}/FieldTypes/${i}/FieldValues`;FieldValueListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldValueListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldValueListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.value)){throw new Error('Required parameter "opts.value" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),Value:o.get(t,"value"),SynonymOf:o.get(t,"synonymOf")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.fieldTypeSid,t)};FieldValueListInstance.toJSON=function toJSON(){return this._solution};FieldValueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldValueListInstance};h=function FieldValuePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FieldValueInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.fieldTypeSid=e.field_type_sid;this.language=e.language;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.value=e.value;this.url=e.url;this.synonymOf=e.synonym_of;this._context=undefined;this._solution={assistantSid:i,fieldTypeSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldValueContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,fieldTypeSid:i,sid:n};this._uri=`/Assistants/${e}/FieldTypes/${i}/FieldValues/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldValueList:u,FieldValuePage:h,FieldValueInstance:f,FieldValueContext:p}},80365:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ModelBuildList(t,e){function ModelBuildListInstance(t){return ModelBuildListInstance.get(t)}ModelBuildListInstance._version=t;ModelBuildListInstance._solution={assistantSid:e};ModelBuildListInstance._uri=`/Assistants/${e}/ModelBuilds`;ModelBuildListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ModelBuildListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ModelBuildListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({StatusCallback:o.get(t,"statusCallback"),UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,t)};ModelBuildListInstance.toJSON=function toJSON(){return this._solution};ModelBuildListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ModelBuildListInstance};h=function ModelBuildPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ModelBuildInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.assistantSid=e.assistant_sid;this.sid=e.sid;this.status=e.status;this.uniqueName=e.unique_name;this.url=e.url;this.buildDuration=c.integer(e.build_duration);this.errorCode=c.integer(e.error_code);this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ModelBuildContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/ModelBuilds/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ModelBuildList:u,ModelBuildPage:h,ModelBuildInstance:f,ModelBuildContext:p}},60731:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function QueryList(t,e){function QueryListInstance(t){return QueryListInstance.get(t)}QueryListInstance._version=t;QueryListInstance._solution={assistantSid:e};QueryListInstance._uri=`/Assistants/${e}/Queries`;QueryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};QueryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};QueryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),ModelBuild:o.get(t,"modelBuild"),Status:o.get(t,"status"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.query)){throw new Error('Required parameter "opts.query" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),Query:o.get(t,"query"),Tasks:o.get(t,"tasks"),ModelBuild:o.get(t,"modelBuild"),Field:o.get(t,"field")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,t)};QueryListInstance.toJSON=function toJSON(){return this._solution};QueryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return QueryListInstance};h=function QueryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function QueryInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.results=e.results;this.language=e.language;this.modelBuildSid=e.model_build_sid;this.query=e.query;this.sampleSid=e.sample_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.status=e.status;this.url=e.url;this.sourceChannel=e.source_channel;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function QueryContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Queries/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({SampleSid:o.get(t,"sampleSid"),Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={QueryList:u,QueryPage:h,QueryInstance:f,QueryContext:p}},70387:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function StyleSheetList(t,e){function StyleSheetListInstance(t){return StyleSheetListInstance.get(t)}StyleSheetListInstance._version=t;StyleSheetListInstance._solution={assistantSid:e};StyleSheetListInstance.get=function get(){return new p(this._version,this._solution.assistantSid)};StyleSheetListInstance.toJSON=function toJSON(){return this._solution};StyleSheetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return StyleSheetListInstance};h=function StyleSheetPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function StyleSheetInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function StyleSheetContext(t,e){this._version=t;this._solution={assistantSid:e};this._uri=`/Assistants/${e}/StyleSheet`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({StyleSheet:c.object(o.get(t,"styleSheet"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={StyleSheetList:u,StyleSheetPage:h,StyleSheetInstance:f,StyleSheetContext:p}},75994:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(74686).FieldList;var c=i(60938);var a=i(98401).SampleList;var u=i(47050).TaskActionsList;var h=i(48520).TaskStatisticsList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function TaskList(t,e){function TaskListInstance(t){return TaskListInstance.get(t)}TaskListInstance._version=t;TaskListInstance._solution={assistantSid:e};TaskListInstance._uri=`/Assistants/${e}/Tasks`;TaskListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=d.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),Actions:p.object(o.get(t,"actions")),ActionsUrl:o.get(t,"actionsUrl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.get=function get(t){return new _(this._version,this._solution.assistantSid,t)};TaskListInstance.toJSON=function toJSON(){return this._solution};TaskListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskListInstance};v=function TaskPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,c.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t,this._solution.assistantSid)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function TaskInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.links=e.links;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.actionsUrl=e.actions_url;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.fields=function fields(){return this._proxy.fields};m.prototype.samples=function samples(){return this._proxy.samples};m.prototype.taskActions=function taskActions(){return this._proxy.taskActions};m.prototype.statistics=function statistics(){return this._proxy.statistics};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function TaskContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Tasks/${i}`;this._fields=undefined;this._samples=undefined;this._taskActions=undefined;this._statistics=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Actions:p.object(o.get(t,"actions")),ActionsUrl:o.get(t,"actionsUrl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(_.prototype,"fields",{get:function(){if(!this._fields){this._fields=new r(this._version,this._solution.assistantSid,this._solution.sid)}return this._fields}});Object.defineProperty(_.prototype,"samples",{get:function(){if(!this._samples){this._samples=new a(this._version,this._solution.assistantSid,this._solution.sid)}return this._samples}});Object.defineProperty(_.prototype,"taskActions",{get:function(){if(!this._taskActions){this._taskActions=new u(this._version,this._solution.assistantSid,this._solution.sid)}return this._taskActions}});Object.defineProperty(_.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new h(this._version,this._solution.assistantSid,this._solution.sid)}return this._statistics}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskList:l,TaskPage:v,TaskInstance:m,TaskContext:_}},74686:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FieldList(t,e,i){function FieldListInstance(t){return FieldListInstance.get(t)}FieldListInstance._version=t;FieldListInstance._solution={assistantSid:e,taskSid:i};FieldListInstance._uri=`/Assistants/${e}/Tasks/${i}/Fields`;FieldListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.fieldType)){throw new Error('Required parameter "opts.fieldType" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=a.of({FieldType:o.get(t,"fieldType"),UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.taskSid,t)};FieldListInstance.toJSON=function toJSON(){return this._solution};FieldListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldListInstance};h=function FieldPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FieldInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.fieldType=e.field_type;this.taskSid=e.task_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,taskSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,taskSid:i,sid:n};this._uri=`/Assistants/${e}/Tasks/${i}/Fields/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldList:u,FieldPage:h,FieldInstance:f,FieldContext:p}},98401:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SampleList(t,e,i){function SampleListInstance(t){return SampleListInstance.get(t)}SampleListInstance._version=t;SampleListInstance._solution={assistantSid:e,taskSid:i};SampleListInstance._uri=`/Assistants/${e}/Tasks/${i}/Samples`;SampleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SampleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SampleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.taggedText)){throw new Error('Required parameter "opts.taggedText" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),TaggedText:o.get(t,"taggedText"),SourceChannel:o.get(t,"sourceChannel")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.taskSid,t)};SampleListInstance.toJSON=function toJSON(){return this._solution};SampleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SampleListInstance};h=function SamplePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SampleInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.taskSid=e.task_sid;this.language=e.language;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.taggedText=e.tagged_text;this.url=e.url;this.sourceChannel=e.source_channel;this._context=undefined;this._solution={assistantSid:i,taskSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SampleContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,taskSid:i,sid:n};this._uri=`/Assistants/${e}/Tasks/${i}/Samples/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),TaggedText:o.get(t,"taggedText"),SourceChannel:o.get(t,"sourceChannel")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SampleList:u,SamplePage:h,SampleInstance:f,SampleContext:p}},47050:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function TaskActionsList(t,e,i){function TaskActionsListInstance(t){return TaskActionsListInstance.get(t)}TaskActionsListInstance._version=t;TaskActionsListInstance._solution={assistantSid:e,taskSid:i};TaskActionsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid,this._solution.taskSid)};TaskActionsListInstance.toJSON=function toJSON(){return this._solution};TaskActionsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskActionsListInstance};h=function TaskActionsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskActionsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.taskSid=e.task_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i,taskSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskActionsContext(t,e,i){this._version=t;this._solution={assistantSid:e,taskSid:i};this._uri=`/Assistants/${e}/Tasks/${i}/Actions`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Actions:c.object(o.get(t,"actions"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskActionsList:u,TaskActionsPage:h,TaskActionsInstance:f,TaskActionsContext:p}},48520:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TaskStatisticsList(t,e,i){function TaskStatisticsListInstance(t){return TaskStatisticsListInstance.get(t)}TaskStatisticsListInstance._version=t;TaskStatisticsListInstance._solution={assistantSid:e,taskSid:i};TaskStatisticsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid,this._solution.taskSid)};TaskStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskStatisticsListInstance};h=function TaskStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.taskSid=e.task_sid;this.samplesCount=c.integer(e.samples_count);this.fieldsCount=c.integer(e.fields_count);this.url=e.url;this._context=undefined;this._solution={assistantSid:i,taskSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskStatisticsContext(t,e,i){this._version=t;this._solution={assistantSid:e,taskSid:i};this._uri=`/Assistants/${e}/Tasks/${i}/Statistics`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskStatisticsList:u,TaskStatisticsPage:h,TaskStatisticsInstance:f,TaskStatisticsContext:p}},37480:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CommandList(t){function CommandListInstance(t){return CommandListInstance.get(t)}CommandListInstance._version=t;CommandListInstance._solution={};CommandListInstance._uri=`/Commands`;CommandListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CommandListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CommandListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Device:o.get(t,"device"),Sim:o.get(t,"sim"),Status:o.get(t,"status"),Direction:o.get(t,"direction"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.command)){throw new Error('Required parameter "opts.command" missing.')}var i=n.defer();var s=a.of({Command:o.get(t,"command"),Device:o.get(t,"device"),Sim:o.get(t,"sim"),CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl"),CommandMode:o.get(t,"commandMode"),IncludeSid:o.get(t,"includeSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.get=function get(t){return new p(this._version,t)};CommandListInstance.toJSON=function toJSON(){return this._solution};CommandListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CommandListInstance};h=function CommandPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CommandInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.deviceSid=e.device_sid;this.simSid=e.sim_sid;this.command=e.command;this.commandMode=e.command_mode;this.status=e.status;this.direction=e.direction;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CommandContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Commands/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CommandList:u,CommandPage:h,CommandInstance:f,CommandContext:p}},44607:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RatePlanList(t){function RatePlanListInstance(t){return RatePlanListInstance.get(t)}RatePlanListInstance._version=t;RatePlanListInstance._solution={};RatePlanListInstance._uri=`/RatePlans`;RatePlanListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RatePlanListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RatePlanListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),DataEnabled:a.bool(o.get(t,"dataEnabled")),DataLimit:o.get(t,"dataLimit"),DataMetering:o.get(t,"dataMetering"),MessagingEnabled:a.bool(o.get(t,"messagingEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),CommandsEnabled:a.bool(o.get(t,"commandsEnabled")),NationalRoamingEnabled:a.bool(o.get(t,"nationalRoamingEnabled")),InternationalRoaming:a.map(o.get(t,"internationalRoaming"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.get=function get(t){return new d(this._version,t)};RatePlanListInstance.toJSON=function toJSON(){return this._solution};RatePlanListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RatePlanListInstance};f=function RatePlanPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RatePlanInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dataEnabled=e.data_enabled;this.dataMetering=e.data_metering;this.dataLimit=c.integer(e.data_limit);this.messagingEnabled=e.messaging_enabled;this.voiceEnabled=e.voice_enabled;this.nationalRoamingEnabled=e.national_roaming_enabled;this.internationalRoaming=e.international_roaming;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RatePlanContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RatePlans/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RatePlanList:h,RatePlanPage:f,RatePlanInstance:p,RatePlanContext:d}},52633:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(3593).UsageList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function SimList(t){function SimListInstance(t){return SimListInstance.get(t)}SimListInstance._version=t;SimListInstance._solution={};SimListInstance._uri=`/Sims`;SimListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SimListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SimListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Status:o.get(t,"status"),Iccid:o.get(t,"iccid"),RatePlan:o.get(t,"ratePlan"),EId:o.get(t,"eId"),SimRegistrationCode:o.get(t,"simRegistrationCode"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.get=function get(t){return new d(this._version,t)};SimListInstance.toJSON=function toJSON(){return this._solution};SimListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SimListInstance};f=function SimPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SimInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.ratePlanSid=e.rate_plan_sid;this.friendlyName=e.friendly_name;this.iccid=e.iccid;this.eId=e.e_id;this.status=e.status;this.commandsCallbackUrl=e.commands_callback_url;this.commandsCallbackMethod=e.commands_callback_method;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.usage=function usage(){return this._proxy.usage};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SimContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Sims/${e}`;this._usage=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl"),FriendlyName:o.get(t,"friendlyName"),RatePlan:o.get(t,"ratePlan"),Status:o.get(t,"status"),CommandsCallbackMethod:o.get(t,"commandsCallbackMethod"),CommandsCallbackUrl:o.get(t,"commandsCallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"usage",{get:function(){if(!this._usage){this._usage=new c(this._version,this._solution.sid)}return this._usage}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SimList:h,SimPage:f,SimInstance:p,SimContext:d}},3593:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function UsageList(t,e){function UsageListInstance(t){return UsageListInstance.get(t)}UsageListInstance._version=t;UsageListInstance._solution={simSid:e};UsageListInstance.get=function get(){return new f(this._version,this._solution.simSid)};UsageListInstance.toJSON=function toJSON(){return this._solution};UsageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UsageListInstance};u=function UsagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.simSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function UsageInstance(t,e,i){this._version=t;this.simSid=e.sim_sid;this.simUniqueName=e.sim_unique_name;this.accountSid=e.account_sid;this.period=e.period;this.commandsUsage=e.commands_usage;this.commandsCosts=e.commands_costs;this.dataUsage=e.data_usage;this.dataCosts=e.data_costs;this.url=e.url;this._context=undefined;this._solution={simSid:i}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.simSid)}return this._context}});h.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UsageContext(t,e){this._version=t;this._solution={simSid:e};this._uri=`/Sims/${e}/Usage`};f.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({End:o.get(t,"end"),Start:o.get(t,"start")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution.simSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UsageList:a,UsagePage:u,UsageInstance:h,UsageContext:f}},49274:(t,e,i)=>{"use strict";var n=i(90250);var o=i(18127).MessagingList;var s=i(23755).PhoneNumberList;var r=i(64351);var c=i(43878).VoiceList;function V1(t){r.prototype.constructor.call(this,t,"v1");this._messaging=undefined;this._phoneNumbers=undefined;this._voice=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"messaging",{get:function(){this._messaging=this._messaging||new o(this);return this._messaging}});Object.defineProperty(V1.prototype,"phoneNumbers",{get:function(){this._phoneNumbers=this._phoneNumbers||new s(this);return this._phoneNumbers}});Object.defineProperty(V1.prototype,"voice",{get:function(){this._voice=this._voice||new c(this);return this._voice}});t.exports=V1},27068:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64351);var s=i(55726).VoiceList;function V2(t){o.prototype.constructor.call(this,t,"v2");this._voice=undefined}n.extend(V2.prototype,o.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"voice",{get:function(){this._voice=this._voice||new s(this);return this._voice}});t.exports=V2},18127:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(61788).CountryList;var r=i(60938);var c;var a;var u;c=function MessagingList(t){function MessagingListInstance(t){return MessagingListInstance.get(t)}MessagingListInstance._version=t;MessagingListInstance._solution={};MessagingListInstance._countries=undefined;Object.defineProperty(MessagingListInstance,"countries",{get:function countries(){if(!this._countries){this._countries=new s(this._version)}return this._countries}});MessagingListInstance.toJSON=function toJSON(){return this._solution};MessagingListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return MessagingListInstance};a=function MessagingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};n.extend(a.prototype,r.prototype);a.prototype.constructor=a;a.prototype.getInstance=function getInstance(t){return new u(this._version,t)};a.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};a.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};u=function MessagingInstance(t,e){this._version=t;this.name=e.name;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={}};u.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};u.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};t.exports={MessagingList:c,MessagingPage:a,MessagingInstance:u}},61788:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function CountryList(t){function CountryListInstance(t){return CountryListInstance.get(t)}CountryListInstance._version=t;CountryListInstance._solution={};CountryListInstance._uri=`/Messaging/Countries`;CountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.get=function get(t){return new f(this._version,t)};CountryListInstance.toJSON=function toJSON(){return this._solution};CountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CountryListInstance};u=function CountryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function CountryInstance(t,e,i){this._version=t;this.country=e.country;this.isoCountry=e.iso_country;this.outboundSmsPrices=e.outbound_sms_prices;this.inboundSmsPrices=e.inbound_sms_prices;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={isoCountry:i||this.isoCountry}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.isoCountry)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CountryContext(t,e){this._version=t;this._solution={isoCountry:e};this._uri=`/Messaging/Countries/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.isoCountry))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CountryList:a,CountryPage:u,CountryInstance:h,CountryContext:f}},23755:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(939).CountryList;var r=i(60938);var c;var a;var u;c=function PhoneNumberList(t){function PhoneNumberListInstance(t){return PhoneNumberListInstance.get(t)}PhoneNumberListInstance._version=t;PhoneNumberListInstance._solution={};PhoneNumberListInstance._countries=undefined;Object.defineProperty(PhoneNumberListInstance,"countries",{get:function countries(){if(!this._countries){this._countries=new s(this._version)}return this._countries}});PhoneNumberListInstance.toJSON=function toJSON(){return this._solution};PhoneNumberListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return PhoneNumberListInstance};a=function PhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};n.extend(a.prototype,r.prototype);a.prototype.constructor=a;a.prototype.getInstance=function getInstance(t){return new u(this._version,t)};a.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};a.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};u=function PhoneNumberInstance(t,e){this._version=t;this.name=e.name;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={}};u.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};u.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};t.exports={PhoneNumberList:c,PhoneNumberPage:a,PhoneNumberInstance:u}},939:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function CountryList(t){function CountryListInstance(t){return CountryListInstance.get(t)}CountryListInstance._version=t;CountryListInstance._solution={};CountryListInstance._uri=`/PhoneNumbers/Countries`;CountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.get=function get(t){return new f(this._version,t)};CountryListInstance.toJSON=function toJSON(){return this._solution};CountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CountryListInstance};u=function CountryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function CountryInstance(t,e,i){this._version=t;this.country=e.country;this.isoCountry=e.iso_country;this.phoneNumberPrices=e.phone_number_prices;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={isoCountry:i||this.isoCountry}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.isoCountry)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CountryContext(t,e){this._version=t;this._solution={isoCountry:e};this._uri=`/PhoneNumbers/Countries/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.isoCountry))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CountryList:a,CountryPage:u,CountryInstance:h,CountryContext:f}},43878:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(35533).CountryList;var r=i(24475).NumberList;var c=i(60938);var a;var u;var h;a=function VoiceList(t){function VoiceListInstance(t){return VoiceListInstance.get(t)}VoiceListInstance._version=t;VoiceListInstance._solution={};VoiceListInstance._numbers=undefined;VoiceListInstance._countries=undefined;Object.defineProperty(VoiceListInstance,"numbers",{get:function numbers(){if(!this._numbers){this._numbers=new r(this._version)}return this._numbers}});Object.defineProperty(VoiceListInstance,"countries",{get:function countries(){if(!this._countries){this._countries=new s(this._version)}return this._countries}});VoiceListInstance.toJSON=function toJSON(){return this._solution};VoiceListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return VoiceListInstance};u=function VoicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};n.extend(u.prototype,c.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};u.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};h=function VoiceInstance(t,e){this._version=t;this.name=e.name;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={}};h.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};h.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};t.exports={VoiceList:a,VoicePage:u,VoiceInstance:h}},35533:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function CountryList(t){function CountryListInstance(t){return CountryListInstance.get(t)}CountryListInstance._version=t;CountryListInstance._solution={};CountryListInstance._uri=`/Voice/Countries`;CountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.get=function get(t){return new f(this._version,t)};CountryListInstance.toJSON=function toJSON(){return this._solution};CountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CountryListInstance};u=function CountryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function CountryInstance(t,e,i){this._version=t;this.country=e.country;this.isoCountry=e.iso_country;this.outboundPrefixPrices=e.outbound_prefix_prices;this.inboundCallPrices=e.inbound_call_prices;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={isoCountry:i||this.isoCountry}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.isoCountry)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CountryContext(t,e){this._version=t;this._solution={isoCountry:e};this._uri=`/Voice/Countries/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.isoCountry))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CountryList:a,CountryPage:u,CountryInstance:h,CountryContext:f}},24475:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function NumberList(t){function NumberListInstance(t){return NumberListInstance.get(t)}NumberListInstance._version=t;NumberListInstance._solution={};NumberListInstance.get=function get(t){return new f(this._version,t)};NumberListInstance.toJSON=function toJSON(){return this._solution};NumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NumberListInstance};u=function NumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function NumberInstance(t,e,i){this._version=t;this.number=e.number;this.country=e.country;this.isoCountry=e.iso_country;this.outboundCallPrice=e.outbound_call_price;this.inboundCallPrice=e.inbound_call_price;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={number:i||this.number}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.number)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NumberContext(t,e){this._version=t;this._solution={number:e};this._uri=`/Voice/Numbers/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.number))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NumberList:a,NumberPage:u,NumberInstance:h,NumberContext:f}},55726:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(37100).CountryList;var r=i(83009).NumberList;var c=i(60938);var a;var u;var h;a=function VoiceList(t){function VoiceListInstance(t){return VoiceListInstance.get(t)}VoiceListInstance._version=t;VoiceListInstance._solution={};VoiceListInstance._countries=undefined;VoiceListInstance._numbers=undefined;Object.defineProperty(VoiceListInstance,"countries",{get:function countries(){if(!this._countries){this._countries=new s(this._version)}return this._countries}});Object.defineProperty(VoiceListInstance,"numbers",{get:function numbers(){if(!this._numbers){this._numbers=new r(this._version)}return this._numbers}});VoiceListInstance.toJSON=function toJSON(){return this._solution};VoiceListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return VoiceListInstance};u=function VoicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};n.extend(u.prototype,c.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};u.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};h=function VoiceInstance(t,e){this._version=t;this.name=e.name;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={}};h.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};h.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};t.exports={VoiceList:a,VoicePage:u,VoiceInstance:h}},37100:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function CountryList(t){function CountryListInstance(t){return CountryListInstance.get(t)}CountryListInstance._version=t;CountryListInstance._solution={};CountryListInstance._uri=`/Voice/Countries`;CountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.get=function get(t){return new f(this._version,t)};CountryListInstance.toJSON=function toJSON(){return this._solution};CountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CountryListInstance};u=function CountryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function CountryInstance(t,e,i){this._version=t;this.country=e.country;this.isoCountry=e.iso_country;this.outboundPrefixPrices=e.outbound_prefix_prices;this.inboundCallPrices=e.inbound_call_prices;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={isoCountry:i||this.isoCountry}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.isoCountry)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CountryContext(t,e){this._version=t;this._solution={isoCountry:e};this._uri=`/Voice/Countries/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.isoCountry))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CountryList:a,CountryPage:u,CountryInstance:h,CountryContext:f}},83009:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function NumberList(t){function NumberListInstance(t){return NumberListInstance.get(t)}NumberListInstance._version=t;NumberListInstance._solution={};NumberListInstance.get=function get(t){return new f(this._version,t)};NumberListInstance.toJSON=function toJSON(){return this._solution};NumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NumberListInstance};u=function NumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function NumberInstance(t,e,i){this._version=t;this.destinationNumber=e.destination_number;this.originationNumber=e.origination_number;this.country=e.country;this.isoCountry=e.iso_country;this.outboundCallPrices=e.outbound_call_prices;this.inboundCallPrice=e.inbound_call_price;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={destinationNumber:i||this.destinationNumber}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.destinationNumber)}return this._context}});h.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NumberContext(t,e){this._version=t;this._solution={destinationNumber:e};this._uri=`/Voice/Numbers/${e}`};f.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({OriginationNumber:o.get(t,"originationNumber")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution.destinationNumber))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NumberList:a,NumberPage:u,NumberInstance:h,NumberContext:f}},3986:(t,e,i)=>{"use strict";var n=i(90250);var o=i(44606).ServiceList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._services=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new o(this);return this._services}});t.exports=V1},44606:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(70694).PhoneNumberList;var a=i(1232).SessionList;var u=i(16320).ShortCodeList;var h=i(80513);var f=i(72142);var p;var d;var l;var v;p=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=f.of({UniqueName:o.get(t,"uniqueName"),DefaultTtl:o.get(t,"defaultTtl"),CallbackUrl:o.get(t,"callbackUrl"),GeoMatchLevel:o.get(t,"geoMatchLevel"),NumberSelectionBehavior:o.get(t,"numberSelectionBehavior"),InterceptCallbackUrl:o.get(t,"interceptCallbackUrl"),OutOfSessionCallbackUrl:o.get(t,"outOfSessionCallbackUrl"),ChatInstanceSid:o.get(t,"chatInstanceSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new v(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};d=function ServicePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,r.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.chatInstanceSid=e.chat_instance_sid;this.callbackUrl=e.callback_url;this.defaultTtl=h.integer(e.default_ttl);this.numberSelectionBehavior=e.number_selection_behavior;this.geoMatchLevel=e.geo_match_level;this.interceptCallbackUrl=e.intercept_callback_url;this.outOfSessionCallbackUrl=e.out_of_session_callback_url;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.sessions=function sessions(){return this._proxy.sessions};l.prototype.phoneNumbers=function phoneNumbers(){return this._proxy.phoneNumbers};l.prototype.shortCodes=function shortCodes(){return this._proxy.shortCodes};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._sessions=undefined;this._phoneNumbers=undefined;this._shortCodes=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({UniqueName:o.get(t,"uniqueName"),DefaultTtl:o.get(t,"defaultTtl"),CallbackUrl:o.get(t,"callbackUrl"),GeoMatchLevel:o.get(t,"geoMatchLevel"),NumberSelectionBehavior:o.get(t,"numberSelectionBehavior"),InterceptCallbackUrl:o.get(t,"interceptCallbackUrl"),OutOfSessionCallbackUrl:o.get(t,"outOfSessionCallbackUrl"),ChatInstanceSid:o.get(t,"chatInstanceSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"sessions",{get:function(){if(!this._sessions){this._sessions=new a(this._version,this._solution.sid)}return this._sessions}});Object.defineProperty(v.prototype,"phoneNumbers",{get:function(){if(!this._phoneNumbers){this._phoneNumbers=new c(this._version,this._solution.sid)}return this._phoneNumbers}});Object.defineProperty(v.prototype,"shortCodes",{get:function(){if(!this._shortCodes){this._shortCodes=new u(this._version,this._solution.sid)}return this._shortCodes}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:p,ServicePage:d,ServiceInstance:l,ServiceContext:v}},70694:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function PhoneNumberList(t,e){function PhoneNumberListInstance(t){return PhoneNumberListInstance.get(t)}PhoneNumberListInstance._version=t;PhoneNumberListInstance._solution={serviceSid:e};PhoneNumberListInstance._uri=`/Services/${e}/PhoneNumbers`;PhoneNumberListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Sid:o.get(t,"sid"),PhoneNumber:o.get(t,"phoneNumber"),IsReserved:a.bool(o.get(t,"isReserved"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PhoneNumberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PhoneNumberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};PhoneNumberListInstance.toJSON=function toJSON(){return this._solution};PhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PhoneNumberListInstance};f=function PhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PhoneNumberInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.phoneNumber=e.phone_number;this.friendlyName=e.friendly_name;this.isoCountry=e.iso_country;this.capabilities=e.capabilities;this.url=e.url;this.isReserved=e.is_reserved;this.inUse=c.integer(e.in_use);this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function PhoneNumberContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/PhoneNumbers/${i}`};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({IsReserved:a.bool(o.get(t,"isReserved"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PhoneNumberList:h,PhoneNumberPage:f,PhoneNumberInstance:p,PhoneNumberContext:d}},1232:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(887).InteractionList;var c=i(60938);var a=i(32630).ParticipantList;var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function SessionList(t,e){function SessionListInstance(t){return SessionListInstance.get(t)}SessionListInstance._version=t;SessionListInstance._solution={serviceSid:e};SessionListInstance._uri=`/Services/${e}/Sessions`;SessionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SessionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SessionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SessionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SessionListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({UniqueName:o.get(t,"uniqueName"),DateExpiry:h.iso8601DateTime(o.get(t,"dateExpiry")),Ttl:o.get(t,"ttl"),Mode:o.get(t,"mode"),Status:o.get(t,"status"),Participants:h.map(o.get(t,"participants"),function(t){return h.object(t)}),FailOnParticipantConflict:h.bool(o.get(t,"failOnParticipantConflict"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SessionListInstance.get=function get(t){return new v(this._version,this._solution.serviceSid,t)};SessionListInstance.toJSON=function toJSON(){return this._solution};SessionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SessionListInstance};d=function SessionPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,c.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.serviceSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SessionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.dateStarted=u.iso8601DateTime(e.date_started);this.dateEnded=u.iso8601DateTime(e.date_ended);this.dateLastInteraction=u.iso8601DateTime(e.date_last_interaction);this.dateExpiry=u.iso8601DateTime(e.date_expiry);this.uniqueName=e.unique_name;this.status=e.status;this.closedReason=e.closed_reason;this.ttl=u.integer(e.ttl);this.mode=e.mode;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.interactions=function interactions(){return this._proxy.interactions};l.prototype.participants=function participants(){return this._proxy.participants};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function SessionContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Sessions/${i}`;this._interactions=undefined;this._participants=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({DateExpiry:h.iso8601DateTime(o.get(t,"dateExpiry")),Ttl:o.get(t,"ttl"),Status:o.get(t,"status"),FailOnParticipantConflict:h.bool(o.get(t,"failOnParticipantConflict"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"interactions",{get:function(){if(!this._interactions){this._interactions=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._interactions}});Object.defineProperty(v.prototype,"participants",{get:function(){if(!this._participants){this._participants=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._participants}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SessionList:p,SessionPage:d,SessionInstance:l,SessionContext:v}},887:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function InteractionList(t,e,i){function InteractionListInstance(t){return InteractionListInstance.get(t)}InteractionListInstance._version=t;InteractionListInstance._solution={serviceSid:e,sessionSid:i};InteractionListInstance._uri=`/Services/${e}/Sessions/${i}/Interactions`;InteractionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InteractionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InteractionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InteractionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InteractionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.sessionSid,t)};InteractionListInstance.toJSON=function toJSON(){return this._solution};InteractionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InteractionListInstance};h=function InteractionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.sessionSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function InteractionInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.sessionSid=e.session_sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.data=e.data;this.type=e.type;this.inboundParticipantSid=e.inbound_participant_sid;this.inboundResourceSid=e.inbound_resource_sid;this.inboundResourceStatus=e.inbound_resource_status;this.inboundResourceType=e.inbound_resource_type;this.inboundResourceUrl=e.inbound_resource_url;this.outboundParticipantSid=e.outbound_participant_sid;this.outboundResourceSid=e.outbound_resource_sid;this.outboundResourceStatus=e.outbound_resource_status;this.outboundResourceType=e.outbound_resource_type;this.outboundResourceUrl=e.outbound_resource_url;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sessionSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InteractionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,sessionSid:i,sid:n};this._uri=`/Services/${e}/Sessions/${i}/Interactions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InteractionList:u,InteractionPage:h,InteractionInstance:f,InteractionContext:p}},32630:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(98550).MessageInteractionList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function ParticipantList(t,e,i){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={serviceSid:e,sessionSid:i};ParticipantListInstance._uri=`/Services/${e}/Sessions/${i}/Participants`;ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identifier)){throw new Error('Required parameter "opts.identifier" missing.')}var i=n.defer();var s=h.of({Identifier:o.get(t,"identifier"),FriendlyName:o.get(t,"friendlyName"),ProxyIdentifier:o.get(t,"proxyIdentifier"),ProxyIdentifierSid:o.get(t,"proxyIdentifierSid"),FailOnParticipantConflict:u.bool(o.get(t,"failOnParticipantConflict"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,this._solution.sessionSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};p=function ParticipantPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid,this._solution.sessionSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ParticipantInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.sessionSid=e.session_sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.identifier=e.identifier;this.proxyIdentifier=e.proxy_identifier;this.proxyIdentifierSid=e.proxy_identifier_sid;this.dateDeleted=a.iso8601DateTime(e.date_deleted);this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sessionSid:n,sid:o||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.messageInteractions=function messageInteractions(){return this._proxy.messageInteractions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ParticipantContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,sessionSid:i,sid:n};this._uri=`/Services/${e}/Sessions/${i}/Participants/${n}`;this._messageInteractions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"messageInteractions",{get:function(){if(!this._messageInteractions){this._messageInteractions=new r(this._version,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid)}return this._messageInteractions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:f,ParticipantPage:p,ParticipantInstance:d,ParticipantContext:l}},98550:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MessageInteractionList(t,e,i,r){function MessageInteractionListInstance(t){return MessageInteractionListInstance.get(t)}MessageInteractionListInstance._version=t;MessageInteractionListInstance._solution={serviceSid:e,sessionSid:i,participantSid:r};MessageInteractionListInstance._uri=`/Services/${e}/Sessions/${i}/Participants/${r}/MessageInteractions`;MessageInteractionListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Body:o.get(t,"body"),MediaUrl:a.map(o.get(t,"mediaUrl"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.participantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageInteractionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageInteractionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageInteractionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageInteractionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageInteractionListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.sessionSid,this._solution.participantSid,t)};MessageInteractionListInstance.toJSON=function toJSON(){return this._solution};MessageInteractionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageInteractionListInstance};f=function MessageInteractionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.participantSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessageInteractionInstance(t,e,i,n,o,s){this._version=t;this.sid=e.sid;this.sessionSid=e.session_sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.data=e.data;this.type=e.type;this.participantSid=e.participant_sid;this.inboundParticipantSid=e.inbound_participant_sid;this.inboundResourceSid=e.inbound_resource_sid;this.inboundResourceStatus=e.inbound_resource_status;this.inboundResourceType=e.inbound_resource_type;this.inboundResourceUrl=e.inbound_resource_url;this.outboundParticipantSid=e.outbound_participant_sid;this.outboundResourceSid=e.outbound_resource_sid;this.outboundResourceStatus=e.outbound_resource_status;this.outboundResourceType=e.outbound_resource_type;this.outboundResourceUrl=e.outbound_resource_url;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sessionSid:n,participantSid:o,sid:s||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sessionSid,this._solution.participantSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MessageInteractionContext(t,e,i,n,o){this._version=t;this._solution={serviceSid:e,sessionSid:i,participantSid:n,sid:o};this._uri=`/Services/${e}/Sessions/${i}/Participants/${n}/MessageInteractions/${o}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.participantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageInteractionList:h,MessageInteractionPage:f,MessageInteractionInstance:p,MessageInteractionContext:d}},16320:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ShortCodeList(t,e){function ShortCodeListInstance(t){return ShortCodeListInstance.get(t)}ShortCodeListInstance._version=t;ShortCodeListInstance._solution={serviceSid:e};ShortCodeListInstance._uri=`/Services/${e}/ShortCodes`;ShortCodeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.sid)){throw new Error('Required parameter "opts.sid" missing.')}var i=n.defer();var s=u.of({Sid:o.get(t,"sid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ShortCodeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ShortCodeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};ShortCodeListInstance.toJSON=function toJSON(){return this._solution};ShortCodeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ShortCodeListInstance};f=function ShortCodePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ShortCodeInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.shortCode=e.short_code;this.isoCountry=e.iso_country;this.capabilities=e.capabilities;this.url=e.url;this.isReserved=e.is_reserved;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ShortCodeContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/ShortCodes/${i}`};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({IsReserved:a.bool(o.get(t,"isReserved"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ShortCodeList:h,ShortCodePage:f,ShortCodeInstance:p,ShortCodeContext:d}},98995:(t,e,i)=>{"use strict";var n=i(90250);var o=i(39178).ServiceList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._services=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new o(this);return this._services}});t.exports=V1},39178:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(66898).AssetList;var c=i(7439).BuildList;var a=i(83150).EnvironmentList;var u=i(12904).FunctionList;var h=i(60938);var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=d.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),IncludeCredentials:p.bool(o.get(t,"includeCredentials")),UiEditable:p.bool(o.get(t,"uiEditable"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new _(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};v=function ServicePage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,h.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.includeCredentials=e.include_credentials;this.uiEditable=e.ui_editable;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.environments=function environments(){return this._proxy.environments};m.prototype.functions=function functions(){return this._proxy.functions};m.prototype.assets=function assets(){return this._proxy.assets};m.prototype.builds=function builds(){return this._proxy.builds};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._environments=undefined;this._functions=undefined;this._assets=undefined;this._builds=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({IncludeCredentials:p.bool(o.get(t,"includeCredentials")),FriendlyName:o.get(t,"friendlyName"),UiEditable:p.bool(o.get(t,"uiEditable"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"environments",{get:function(){if(!this._environments){this._environments=new a(this._version,this._solution.sid)}return this._environments}});Object.defineProperty(_.prototype,"functions",{get:function(){if(!this._functions){this._functions=new u(this._version,this._solution.sid)}return this._functions}});Object.defineProperty(_.prototype,"assets",{get:function(){if(!this._assets){this._assets=new r(this._version,this._solution.sid)}return this._assets}});Object.defineProperty(_.prototype,"builds",{get:function(){if(!this._builds){this._builds=new c(this._version,this._solution.sid)}return this._builds}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:l,ServicePage:v,ServiceInstance:m,ServiceContext:_}},66898:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(39157).AssetVersionList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function AssetList(t,e){function AssetListInstance(t){return AssetListInstance.get(t)}AssetListInstance._version=t;AssetListInstance._solution={serviceSid:e};AssetListInstance._uri=`/Services/${e}/Assets`;AssetListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssetListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssetListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssetListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssetListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssetListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};AssetListInstance.toJSON=function toJSON(){return this._solution};AssetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssetListInstance};f=function AssetPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AssetInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.assetVersions=function assetVersions(){return this._proxy.assetVersions};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AssetContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Assets/${i}`;this._assetVersions=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"assetVersions",{get:function(){if(!this._assetVersions){this._assetVersions=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._assetVersions}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssetList:h,AssetPage:f,AssetInstance:p,AssetContext:d}},39157:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AssetVersionList(t,e,i){function AssetVersionListInstance(t){return AssetVersionListInstance.get(t)}AssetVersionListInstance._version=t;AssetVersionListInstance._solution={serviceSid:e,assetSid:i};AssetVersionListInstance._uri=`/Services/${e}/Assets/${i}/Versions`;AssetVersionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssetVersionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssetVersionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssetVersionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssetVersionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.assetSid,t)};AssetVersionListInstance.toJSON=function toJSON(){return this._solution};AssetVersionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssetVersionListInstance};h=function AssetVersionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.assetSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AssetVersionInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.assetSid=e.asset_sid;this.path=e.path;this.visibility=e.visibility;this.dateCreated=c.iso8601DateTime(e.date_created);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,assetSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.assetSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AssetVersionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,assetSid:i,sid:n};this._uri=`/Services/${e}/Assets/${i}/Versions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.assetSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssetVersionList:u,AssetVersionPage:h,AssetVersionInstance:f,AssetVersionContext:p}},7439:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(13455).BuildStatusList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function BuildList(t,e){function BuildListInstance(t){return BuildListInstance.get(t)}BuildListInstance._version=t;BuildListInstance._solution={serviceSid:e};BuildListInstance._uri=`/Services/${e}/Builds`;BuildListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BuildListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BuildListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BuildListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BuildListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({AssetVersions:u.map(o.get(t,"assetVersions"),function(t){return t}),FunctionVersions:u.map(o.get(t,"functionVersions"),function(t){return t}),Dependencies:o.get(t,"dependencies")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BuildListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};BuildListInstance.toJSON=function toJSON(){return this._solution};BuildListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BuildListInstance};p=function BuildPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BuildInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.status=e.status;this.assetVersions=e.asset_versions;this.functionVersions=e.function_versions;this.dependencies=e.dependencies;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.buildStatus=function buildStatus(){return this._proxy.buildStatus};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function BuildContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Builds/${i}`;this._buildStatus=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"buildStatus",{get:function(){if(!this._buildStatus){this._buildStatus=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._buildStatus}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BuildList:f,BuildPage:p,BuildInstance:d,BuildContext:l}},13455:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function BuildStatusList(t,e,i){function BuildStatusListInstance(t){return BuildStatusListInstance.get(t)}BuildStatusListInstance._version=t;BuildStatusListInstance._solution={serviceSid:e,sid:i};BuildStatusListInstance.get=function get(){return new f(this._version,this._solution.serviceSid,this._solution.sid)};BuildStatusListInstance.toJSON=function toJSON(){return this._solution};BuildStatusListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BuildStatusListInstance};u=function BuildStatusPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.serviceSid,this._solution.sid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function BuildStatusInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.status=e.status;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function BuildStatusContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Builds/${i}/Status`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BuildStatusList:a,BuildStatusPage:u,BuildStatusInstance:h,BuildStatusContext:f}},83150:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(31897).DeploymentList;var c=i(64772).LogList;var a=i(60938);var u=i(6554).VariableList;var h=i(80513);var f=i(72142);var p;var d;var l;var v;p=function EnvironmentList(t,e){function EnvironmentListInstance(t){return EnvironmentListInstance.get(t)}EnvironmentListInstance._version=t;EnvironmentListInstance._solution={serviceSid:e};EnvironmentListInstance._uri=`/Services/${e}/Environments`;EnvironmentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EnvironmentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EnvironmentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EnvironmentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EnvironmentListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=f.of({UniqueName:o.get(t,"uniqueName"),DomainSuffix:o.get(t,"domainSuffix")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EnvironmentListInstance.get=function get(t){return new v(this._version,this._solution.serviceSid,t)};EnvironmentListInstance.toJSON=function toJSON(){return this._solution};EnvironmentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EnvironmentListInstance};d=function EnvironmentPage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,a.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.serviceSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function EnvironmentInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.buildSid=e.build_sid;this.uniqueName=e.unique_name;this.domainSuffix=e.domain_suffix;this.domainName=e.domain_name;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.variables=function variables(){return this._proxy.variables};l.prototype.deployments=function deployments(){return this._proxy.deployments};l.prototype.logs=function logs(){return this._proxy.logs};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function EnvironmentContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Environments/${i}`;this._variables=undefined;this._deployments=undefined;this._logs=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(v.prototype,"variables",{get:function(){if(!this._variables){this._variables=new u(this._version,this._solution.serviceSid,this._solution.sid)}return this._variables}});Object.defineProperty(v.prototype,"deployments",{get:function(){if(!this._deployments){this._deployments=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._deployments}});Object.defineProperty(v.prototype,"logs",{get:function(){if(!this._logs){this._logs=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._logs}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EnvironmentList:p,EnvironmentPage:d,EnvironmentInstance:l,EnvironmentContext:v}},31897:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DeploymentList(t,e,i){function DeploymentListInstance(t){return DeploymentListInstance.get(t)}DeploymentListInstance._version=t;DeploymentListInstance._solution={serviceSid:e,environmentSid:i};DeploymentListInstance._uri=`/Services/${e}/Environments/${i}/Deployments`;DeploymentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DeploymentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DeploymentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({BuildSid:o.get(t,"buildSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.environmentSid,t)};DeploymentListInstance.toJSON=function toJSON(){return this._solution};DeploymentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeploymentListInstance};h=function DeploymentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DeploymentInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.environmentSid=e.environment_sid;this.buildSid=e.build_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,environmentSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeploymentContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,environmentSid:i,sid:n};this._uri=`/Services/${e}/Environments/${i}/Deployments/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeploymentList:u,DeploymentPage:h,DeploymentInstance:f,DeploymentContext:p}},64772:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function LogList(t,e,i){function LogListInstance(t){return LogListInstance.get(t)}LogListInstance._version=t;LogListInstance._solution={serviceSid:e,environmentSid:i};LogListInstance._uri=`/Services/${e}/Environments/${i}/Logs`;LogListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};LogListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};LogListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FunctionSid:o.get(t,"functionSid"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),EndDate:a.iso8601DateTime(o.get(t,"endDate")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LogListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LogListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.environmentSid,t)};LogListInstance.toJSON=function toJSON(){return this._solution};LogListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return LogListInstance};f=function LogPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.environmentSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function LogInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.environmentSid=e.environment_sid;this.buildSid=e.build_sid;this.deploymentSid=e.deployment_sid;this.functionSid=e.function_sid;this.requestSid=e.request_sid;this.level=e.level;this.message=e.message;this.dateCreated=c.iso8601DateTime(e.date_created);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,environmentSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function LogContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,environmentSid:i,sid:n};this._uri=`/Services/${e}/Environments/${i}/Logs/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={LogList:h,LogPage:f,LogInstance:p,LogContext:d}},6554:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function VariableList(t,e,i){function VariableListInstance(t){return VariableListInstance.get(t)}VariableListInstance._version=t;VariableListInstance._solution={serviceSid:e,environmentSid:i};VariableListInstance._uri=`/Services/${e}/Environments/${i}/Variables`;VariableListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};VariableListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};VariableListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VariableListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VariableListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.key)){throw new Error('Required parameter "opts.key" missing.')}if(o.isUndefined(t.value)){throw new Error('Required parameter "opts.value" missing.')}var i=n.defer();var s=a.of({Key:o.get(t,"key"),Value:o.get(t,"value")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VariableListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.environmentSid,t)};VariableListInstance.toJSON=function toJSON(){return this._solution};VariableListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return VariableListInstance};h=function VariablePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function VariableInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.environmentSid=e.environment_sid;this.key=e.key;this.value=e.value;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,environmentSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function VariableContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,environmentSid:i,sid:n};this._uri=`/Services/${e}/Environments/${i}/Variables/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Key:o.get(t,"key"),Value:o.get(t,"value")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={VariableList:u,VariablePage:h,VariableInstance:f,VariableContext:p}},12904:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(19215).FunctionVersionList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function FunctionList(t,e){function FunctionListInstance(t){return FunctionListInstance.get(t)}FunctionListInstance._version=t;FunctionListInstance._solution={serviceSid:e};FunctionListInstance._uri=`/Services/${e}/Functions`;FunctionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FunctionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FunctionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FunctionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FunctionListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FunctionListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};FunctionListInstance.toJSON=function toJSON(){return this._solution};FunctionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FunctionListInstance};f=function FunctionPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FunctionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.functionVersions=function functionVersions(){return this._proxy.functionVersions};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FunctionContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Functions/${i}`;this._functionVersions=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"functionVersions",{get:function(){if(!this._functionVersions){this._functionVersions=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._functionVersions}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FunctionList:h,FunctionPage:f,FunctionInstance:p,FunctionContext:d}},19215:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(42926).FunctionVersionContentList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function FunctionVersionList(t,e,i){function FunctionVersionListInstance(t){return FunctionVersionListInstance.get(t)}FunctionVersionListInstance._version=t;FunctionVersionListInstance._solution={serviceSid:e,functionSid:i};FunctionVersionListInstance._uri=`/Services/${e}/Functions/${i}/Versions`;FunctionVersionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FunctionVersionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FunctionVersionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FunctionVersionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FunctionVersionListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.functionSid,t)};FunctionVersionListInstance.toJSON=function toJSON(){return this._solution};FunctionVersionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FunctionVersionListInstance};f=function FunctionVersionPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.functionSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FunctionVersionInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.functionSid=e.function_sid;this.path=e.path;this.visibility=e.visibility;this.dateCreated=a.iso8601DateTime(e.date_created);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,functionSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.functionSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.functionVersionContent=function functionVersionContent(){return this._proxy.functionVersionContent};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FunctionVersionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,functionSid:i,sid:n};this._uri=`/Services/${e}/Functions/${i}/Versions/${n}`;this._functionVersionContent=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.functionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"functionVersionContent",{get:function(){if(!this._functionVersionContent){this._functionVersionContent=new r(this._version,this._solution.serviceSid,this._solution.functionSid,this._solution.sid)}return this._functionVersionContent}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FunctionVersionList:h,FunctionVersionPage:f,FunctionVersionInstance:p,FunctionVersionContext:d}},42926:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function FunctionVersionContentList(t,e,i,n){function FunctionVersionContentListInstance(t){return FunctionVersionContentListInstance.get(t)}FunctionVersionContentListInstance._version=t;FunctionVersionContentListInstance._solution={serviceSid:e,functionSid:i,sid:n};FunctionVersionContentListInstance.get=function get(){return new f(this._version,this._solution.serviceSid,this._solution.functionSid,this._solution.sid)};FunctionVersionContentListInstance.toJSON=function toJSON(){return this._solution};FunctionVersionContentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FunctionVersionContentListInstance};u=function FunctionVersionContentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.serviceSid,this._solution.functionSid,this._solution.sid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function FunctionVersionContentInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.functionSid=e.function_sid;this.content=e.content;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,functionSid:n,sid:o}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.serviceSid,this._solution.functionSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FunctionVersionContentContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,functionSid:i,sid:n};this._uri=`/Services/${e}/Functions/${i}/Versions/${n}/Content`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.serviceSid,this._solution.functionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FunctionVersionContentList:a,FunctionVersionContentPage:u,FunctionVersionContentInstance:h,FunctionVersionContentContext:f}},67727:(t,e,i)=>{"use strict";var n=i(90250);var o=i(29549).FlowList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._flows=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"flows",{get:function(){this._flows=this._flows||new o(this);return this._flows}});t.exports=V1},81292:(t,e,i)=>{"use strict";var n=i(90250);var o=i(73635).FlowList;var s=i(75398).FlowValidateList;var r=i(64351);function V2(t){r.prototype.constructor.call(this,t,"v2");this._flows=undefined;this._flowValidate=undefined}n.extend(V2.prototype,r.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"flows",{get:function(){this._flows=this._flows||new o(this);return this._flows}});Object.defineProperty(V2.prototype,"flowValidate",{get:function(){this._flowValidate=this._flowValidate||new s(this);return this._flowValidate}});t.exports=V2},29549:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(21790).EngagementList;var c=i(42890).ExecutionList;var a=i(60938);var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function FlowList(t){function FlowListInstance(t){return FlowListInstance.get(t)}FlowListInstance._version=t;FlowListInstance._solution={};FlowListInstance._uri=`/Flows`;FlowListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FlowListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FlowListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowListInstance.get=function get(t){return new l(this._version,t)};FlowListInstance.toJSON=function toJSON(){return this._solution};FlowListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlowListInstance};p=function FlowPage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,a.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FlowInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.status=e.status;this.version=u.integer(e.version);this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.engagements=function engagements(){return this._proxy.engagements};d.prototype.executions=function executions(){return this._proxy.executions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function FlowContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Flows/${e}`;this._engagements=undefined;this._executions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"engagements",{get:function(){if(!this._engagements){this._engagements=new r(this._version,this._solution.sid)}return this._engagements}});Object.defineProperty(l.prototype,"executions",{get:function(){if(!this._executions){this._executions=new c(this._version,this._solution.sid)}return this._executions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlowList:f,FlowPage:p,FlowInstance:d,FlowContext:l}},21790:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(83312).EngagementContextList;var c=i(60938);var a=i(59167).StepList;var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function EngagementList(t,e){function EngagementListInstance(t){return EngagementListInstance.get(t)}EngagementListInstance._version=t;EngagementListInstance._solution={flowSid:e};EngagementListInstance._uri=`/Flows/${e}/Engagements`;EngagementListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EngagementListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EngagementListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EngagementListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EngagementListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.from)){throw new Error('Required parameter "opts.from" missing.')}var i=n.defer();var s=f.of({To:o.get(t,"to"),From:o.get(t,"from"),Parameters:h.object(o.get(t,"parameters"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EngagementListInstance.get=function get(t){return new v(this._version,this._solution.flowSid,t)};EngagementListInstance.toJSON=function toJSON(){return this._solution};EngagementListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EngagementListInstance};d=function EngagementPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,c.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.flowSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function EngagementInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.contactSid=e.contact_sid;this.contactChannelAddress=e.contact_channel_address;this.context=e.context;this.status=e.status;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.flowSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.steps=function steps(){return this._proxy.steps};l.prototype.engagementContext=function engagementContext(){return this._proxy.engagementContext};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function EngagementContext(t,e,i){this._version=t;this._solution={flowSid:e,sid:i};this._uri=`/Flows/${e}/Engagements/${i}`;this._steps=undefined;this._engagementContext=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(v.prototype,"steps",{get:function(){if(!this._steps){this._steps=new a(this._version,this._solution.flowSid,this._solution.sid)}return this._steps}});Object.defineProperty(v.prototype,"engagementContext",{get:function(){if(!this._engagementContext){this._engagementContext=new r(this._version,this._solution.flowSid,this._solution.sid)}return this._engagementContext}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EngagementList:p,EngagementPage:d,EngagementInstance:l,EngagementContext:v}},83312:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function EngagementContextList(t,e,i){function EngagementContextListInstance(t){return EngagementContextListInstance.get(t)}EngagementContextListInstance._version=t;EngagementContextListInstance._solution={flowSid:e,engagementSid:i};EngagementContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.engagementSid)};EngagementContextListInstance.toJSON=function toJSON(){return this._solution};EngagementContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EngagementContextListInstance};u=function EngagementContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.engagementSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function EngagementContextInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.engagementSid=e.engagement_sid;this.flowSid=e.flow_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,engagementSid:n}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.engagementSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function EngagementContextContext(t,e,i){this._version=t;this._solution={flowSid:e,engagementSid:i};this._uri=`/Flows/${e}/Engagements/${i}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.engagementSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EngagementContextList:a,EngagementContextPage:u,EngagementContextInstance:h,EngagementContextContext:f}},59167:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(40056).StepContextList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function StepList(t,e,i){function StepListInstance(t){return StepListInstance.get(t)}StepListInstance._version=t;StepListInstance._solution={flowSid:e,engagementSid:i};StepListInstance._uri=`/Flows/${e}/Engagements/${i}/Steps`;StepListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};StepListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};StepListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};StepListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};StepListInstance.get=function get(t){return new d(this._version,this._solution.flowSid,this._solution.engagementSid,t)};StepListInstance.toJSON=function toJSON(){return this._solution};StepListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return StepListInstance};f=function StepPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.flowSid,this._solution.engagementSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function StepInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.engagementSid=e.engagement_sid;this.name=e.name;this.context=e.context;this.transitionedFrom=e.transitioned_from;this.transitionedTo=e.transitioned_to;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,engagementSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.flowSid,this._solution.engagementSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.stepContext=function stepContext(){return this._proxy.stepContext};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function StepContext(t,e,i,n){this._version=t;this._solution={flowSid:e,engagementSid:i,sid:n};this._uri=`/Flows/${e}/Engagements/${i}/Steps/${n}`;this._stepContext=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.flowSid,this._solution.engagementSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"stepContext",{get:function(){if(!this._stepContext){this._stepContext=new c(this._version,this._solution.flowSid,this._solution.engagementSid,this._solution.sid)}return this._stepContext}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={StepList:h,StepPage:f,StepInstance:p,StepContext:d}},40056:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function StepContextList(t,e,i,n){function StepContextListInstance(t){return StepContextListInstance.get(t)}StepContextListInstance._version=t;StepContextListInstance._solution={flowSid:e,engagementSid:i,stepSid:n};StepContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.engagementSid,this._solution.stepSid)};StepContextListInstance.toJSON=function toJSON(){return this._solution};StepContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return StepContextListInstance};u=function StepContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.engagementSid,this._solution.stepSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function StepContextInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.engagementSid=e.engagement_sid;this.flowSid=e.flow_sid;this.stepSid=e.step_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,engagementSid:n,stepSid:o}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.engagementSid,this._solution.stepSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function StepContextContext(t,e,i,n){this._version=t;this._solution={flowSid:e,engagementSid:i,stepSid:n};this._uri=`/Flows/${e}/Engagements/${i}/Steps/${n}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.engagementSid,this._solution.stepSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={StepContextList:a,StepContextPage:u,StepContextInstance:h,StepContextContext:f}},42890:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(77572).ExecutionContextList;var c=i(99857).ExecutionStepList;var a=i(60938);var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function ExecutionList(t,e){function ExecutionListInstance(t){return ExecutionListInstance.get(t)}ExecutionListInstance._version=t;ExecutionListInstance._solution={flowSid:e};ExecutionListInstance._uri=`/Flows/${e}/Executions`;ExecutionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExecutionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExecutionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({DateCreatedFrom:h.iso8601DateTime(o.get(t,"dateCreatedFrom")),DateCreatedTo:h.iso8601DateTime(o.get(t,"dateCreatedTo")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.from)){throw new Error('Required parameter "opts.from" missing.')}var i=n.defer();var s=f.of({To:o.get(t,"to"),From:o.get(t,"from"),Parameters:h.object(o.get(t,"parameters"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.get=function get(t){return new v(this._version,this._solution.flowSid,t)};ExecutionListInstance.toJSON=function toJSON(){return this._solution};ExecutionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionListInstance};d=function ExecutionPage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,a.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.flowSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ExecutionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.contactSid=e.contact_sid;this.contactChannelAddress=e.contact_channel_address;this.context=e.context;this.status=e.status;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.flowSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.steps=function steps(){return this._proxy.steps};l.prototype.executionContext=function executionContext(){return this._proxy.executionContext};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ExecutionContext(t,e,i){this._version=t;this._solution={flowSid:e,sid:i};this._uri=`/Flows/${e}/Executions/${i}`;this._steps=undefined;this._executionContext=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=f.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"steps",{get:function(){if(!this._steps){this._steps=new c(this._version,this._solution.flowSid,this._solution.sid)}return this._steps}});Object.defineProperty(v.prototype,"executionContext",{get:function(){if(!this._executionContext){this._executionContext=new r(this._version,this._solution.flowSid,this._solution.sid)}return this._executionContext}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionList:p,ExecutionPage:d,ExecutionInstance:l,ExecutionContext:v}},77572:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function ExecutionContextList(t,e,i){function ExecutionContextListInstance(t){return ExecutionContextListInstance.get(t)}ExecutionContextListInstance._version=t;ExecutionContextListInstance._solution={flowSid:e,executionSid:i};ExecutionContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.executionSid)};ExecutionContextListInstance.toJSON=function toJSON(){return this._solution};ExecutionContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionContextListInstance};u=function ExecutionContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.executionSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExecutionContextInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.flowSid=e.flow_sid;this.executionSid=e.execution_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,executionSid:n}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.executionSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExecutionContextContext(t,e,i){this._version=t;this._solution={flowSid:e,executionSid:i};this._uri=`/Flows/${e}/Executions/${i}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.executionSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionContextList:a,ExecutionContextPage:u,ExecutionContextInstance:h,ExecutionContextContext:f}},99857:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(5436).ExecutionStepContextList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function ExecutionStepList(t,e,i){function ExecutionStepListInstance(t){return ExecutionStepListInstance.get(t)}ExecutionStepListInstance._version=t;ExecutionStepListInstance._solution={flowSid:e,executionSid:i};ExecutionStepListInstance._uri=`/Flows/${e}/Executions/${i}/Steps`;ExecutionStepListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExecutionStepListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExecutionStepListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionStepListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionStepListInstance.get=function get(t){return new d(this._version,this._solution.flowSid,this._solution.executionSid,t)};ExecutionStepListInstance.toJSON=function toJSON(){return this._solution};ExecutionStepListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionStepListInstance};f=function ExecutionStepPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.flowSid,this._solution.executionSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ExecutionStepInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.executionSid=e.execution_sid;this.name=e.name;this.context=e.context;this.transitionedFrom=e.transitioned_from;this.transitionedTo=e.transitioned_to;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,executionSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.stepContext=function stepContext(){return this._proxy.stepContext};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ExecutionStepContext(t,e,i,n){this._version=t;this._solution={flowSid:e,executionSid:i,sid:n};this._uri=`/Flows/${e}/Executions/${i}/Steps/${n}`;this._stepContext=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"stepContext",{get:function(){if(!this._stepContext){this._stepContext=new r(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.sid)}return this._stepContext}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionStepList:h,ExecutionStepPage:f,ExecutionStepInstance:p,ExecutionStepContext:d}},5436:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function ExecutionStepContextList(t,e,i,n){function ExecutionStepContextListInstance(t){return ExecutionStepContextListInstance.get(t)}ExecutionStepContextListInstance._version=t;ExecutionStepContextListInstance._solution={flowSid:e,executionSid:i,stepSid:n};ExecutionStepContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)};ExecutionStepContextListInstance.toJSON=function toJSON(){return this._solution};ExecutionStepContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionStepContextListInstance};u=function ExecutionStepContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExecutionStepContextInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.executionSid=e.execution_sid;this.flowSid=e.flow_sid;this.stepSid=e.step_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,executionSid:n,stepSid:o}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExecutionStepContextContext(t,e,i,n){this._version=t;this._solution={flowSid:e,executionSid:i,stepSid:n};this._uri=`/Flows/${e}/Executions/${i}/Steps/${n}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionStepContextList:a,ExecutionStepContextPage:u,ExecutionStepContextInstance:h,ExecutionStepContextContext:f}},73635:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(38271).ExecutionList;var c=i(48384).FlowRevisionList;var a=i(83958).FlowTestUserList;var u=i(60938);var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function FlowList(t){function FlowListInstance(t){return FlowListInstance.get(t)}FlowListInstance._version=t;FlowListInstance._solution={};FlowListInstance._uri=`/Flows`;FlowListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}if(o.isUndefined(t.definition)){throw new Error('Required parameter "opts.definition" missing.')}var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),Status:o.get(t,"status"),Definition:f.object(o.get(t,"definition")),CommitMessage:o.get(t,"commitMessage")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FlowListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FlowListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowListInstance.get=function get(t){return new m(this._version,t)};FlowListInstance.toJSON=function toJSON(){return this._solution};FlowListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlowListInstance};l=function FlowPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,u.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function FlowInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.definition=e.definition;this.status=e.status;this.revision=h.integer(e.revision);this.commitMessage=e.commit_message;this.valid=e.valid;this.errors=e.errors;this.warnings=e.warnings;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.webhookUrl=e.webhook_url;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.revisions=function revisions(){return this._proxy.revisions};v.prototype.testUsers=function testUsers(){return this._proxy.testUsers};v.prototype.executions=function executions(){return this._proxy.executions};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function FlowContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Flows/${e}`;this._revisions=undefined;this._testUsers=undefined;this._executions=undefined};m.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=p.of({Status:o.get(t,"status"),FriendlyName:o.get(t,"friendlyName"),Definition:f.object(o.get(t,"definition")),CommitMessage:o.get(t,"commitMessage")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"revisions",{get:function(){if(!this._revisions){this._revisions=new c(this._version,this._solution.sid)}return this._revisions}});Object.defineProperty(m.prototype,"testUsers",{get:function(){if(!this._testUsers){this._testUsers=new a(this._version,this._solution.sid)}return this._testUsers}});Object.defineProperty(m.prototype,"executions",{get:function(){if(!this._executions){this._executions=new r(this._version,this._solution.sid)}return this._executions}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlowList:d,FlowPage:l,FlowInstance:v,FlowContext:m}},38271:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(69434).ExecutionContextList;var c=i(17198).ExecutionStepList;var a=i(60938);var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function ExecutionList(t,e){function ExecutionListInstance(t){return ExecutionListInstance.get(t)}ExecutionListInstance._version=t;ExecutionListInstance._solution={flowSid:e};ExecutionListInstance._uri=`/Flows/${e}/Executions`;ExecutionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExecutionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExecutionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({DateCreatedFrom:h.iso8601DateTime(o.get(t,"dateCreatedFrom")),DateCreatedTo:h.iso8601DateTime(o.get(t,"dateCreatedTo")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.from)){throw new Error('Required parameter "opts.from" missing.')}var i=n.defer();var s=f.of({To:o.get(t,"to"),From:o.get(t,"from"),Parameters:h.object(o.get(t,"parameters"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.get=function get(t){return new v(this._version,this._solution.flowSid,t)};ExecutionListInstance.toJSON=function toJSON(){return this._solution};ExecutionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionListInstance};d=function ExecutionPage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,a.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.flowSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ExecutionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.contactChannelAddress=e.contact_channel_address;this.context=e.context;this.status=e.status;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.flowSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.steps=function steps(){return this._proxy.steps};l.prototype.executionContext=function executionContext(){return this._proxy.executionContext};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ExecutionContext(t,e,i){this._version=t;this._solution={flowSid:e,sid:i};this._uri=`/Flows/${e}/Executions/${i}`;this._steps=undefined;this._executionContext=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=f.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"steps",{get:function(){if(!this._steps){this._steps=new c(this._version,this._solution.flowSid,this._solution.sid)}return this._steps}});Object.defineProperty(v.prototype,"executionContext",{get:function(){if(!this._executionContext){this._executionContext=new r(this._version,this._solution.flowSid,this._solution.sid)}return this._executionContext}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionList:p,ExecutionPage:d,ExecutionInstance:l,ExecutionContext:v}},69434:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function ExecutionContextList(t,e,i){function ExecutionContextListInstance(t){return ExecutionContextListInstance.get(t)}ExecutionContextListInstance._version=t;ExecutionContextListInstance._solution={flowSid:e,executionSid:i};ExecutionContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.executionSid)};ExecutionContextListInstance.toJSON=function toJSON(){return this._solution};ExecutionContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionContextListInstance};u=function ExecutionContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.executionSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExecutionContextInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.flowSid=e.flow_sid;this.executionSid=e.execution_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,executionSid:n}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.executionSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExecutionContextContext(t,e,i){this._version=t;this._solution={flowSid:e,executionSid:i};this._uri=`/Flows/${e}/Executions/${i}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.executionSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionContextList:a,ExecutionContextPage:u,ExecutionContextInstance:h,ExecutionContextContext:f}},17198:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(2223).ExecutionStepContextList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function ExecutionStepList(t,e,i){function ExecutionStepListInstance(t){return ExecutionStepListInstance.get(t)}ExecutionStepListInstance._version=t;ExecutionStepListInstance._solution={flowSid:e,executionSid:i};ExecutionStepListInstance._uri=`/Flows/${e}/Executions/${i}/Steps`;ExecutionStepListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExecutionStepListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExecutionStepListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionStepListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionStepListInstance.get=function get(t){return new d(this._version,this._solution.flowSid,this._solution.executionSid,t)};ExecutionStepListInstance.toJSON=function toJSON(){return this._solution};ExecutionStepListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionStepListInstance};f=function ExecutionStepPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.flowSid,this._solution.executionSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ExecutionStepInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.executionSid=e.execution_sid;this.name=e.name;this.context=e.context;this.transitionedFrom=e.transitioned_from;this.transitionedTo=e.transitioned_to;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,executionSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.stepContext=function stepContext(){return this._proxy.stepContext};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ExecutionStepContext(t,e,i,n){this._version=t;this._solution={flowSid:e,executionSid:i,sid:n};this._uri=`/Flows/${e}/Executions/${i}/Steps/${n}`;this._stepContext=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"stepContext",{get:function(){if(!this._stepContext){this._stepContext=new r(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.sid)}return this._stepContext}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionStepList:h,ExecutionStepPage:f,ExecutionStepInstance:p,ExecutionStepContext:d}},2223:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function ExecutionStepContextList(t,e,i,n){function ExecutionStepContextListInstance(t){return ExecutionStepContextListInstance.get(t)}ExecutionStepContextListInstance._version=t;ExecutionStepContextListInstance._solution={flowSid:e,executionSid:i,stepSid:n};ExecutionStepContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)};ExecutionStepContextListInstance.toJSON=function toJSON(){return this._solution};ExecutionStepContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionStepContextListInstance};u=function ExecutionStepContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExecutionStepContextInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.executionSid=e.execution_sid;this.flowSid=e.flow_sid;this.stepSid=e.step_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,executionSid:n,stepSid:o}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExecutionStepContextContext(t,e,i,n){this._version=t;this._solution={flowSid:e,executionSid:i,stepSid:n};this._uri=`/Flows/${e}/Executions/${i}/Steps/${n}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionStepContextList:a,ExecutionStepContextPage:u,ExecutionStepContextInstance:h,ExecutionStepContextContext:f}},48384:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FlowRevisionList(t,e){function FlowRevisionListInstance(t){return FlowRevisionListInstance.get(t)}FlowRevisionListInstance._version=t;FlowRevisionListInstance._solution={sid:e};FlowRevisionListInstance._uri=`/Flows/${e}/Revisions`;FlowRevisionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FlowRevisionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FlowRevisionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowRevisionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowRevisionListInstance.get=function get(t){return new p(this._version,this._solution.sid,t)};FlowRevisionListInstance.toJSON=function toJSON(){return this._solution};FlowRevisionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlowRevisionListInstance};h=function FlowRevisionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.sid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FlowRevisionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.definition=e.definition;this.status=e.status;this.revision=c.integer(e.revision);this.commitMessage=e.commit_message;this.valid=e.valid;this.errors=e.errors;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i,revision:n||this.revision}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid,this._solution.revision)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FlowRevisionContext(t,e,i){this._version=t;this._solution={sid:e,revision:i};this._uri=`/Flows/${e}/Revisions/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid,this._solution.revision))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlowRevisionList:u,FlowRevisionPage:h,FlowRevisionInstance:f,FlowRevisionContext:p}},83958:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function FlowTestUserList(t,e){function FlowTestUserListInstance(t){return FlowTestUserListInstance.get(t)}FlowTestUserListInstance._version=t;FlowTestUserListInstance._solution={sid:e};FlowTestUserListInstance.get=function get(){return new p(this._version,this._solution.sid)};FlowTestUserListInstance.toJSON=function toJSON(){return this._solution};FlowTestUserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlowTestUserListInstance};h=function FlowTestUserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.sid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FlowTestUserInstance(t,e,i){this._version=t;this.sid=e.sid;this.testUsers=e.test_users;this.url=e.url;this._context=undefined;this._solution={sid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FlowTestUserContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Flows/${e}/TestUsers`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.testUsers)){throw new Error('Required parameter "opts.testUsers" missing.')}var i=n.defer();var s=a.of({TestUsers:c.map(o.get(t,"testUsers"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlowTestUserList:u,FlowTestUserPage:h,FlowTestUserInstance:f,FlowTestUserContext:p}},75398:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;u=function FlowValidateList(t){function FlowValidateListInstance(t){return FlowValidateListInstance.get(t)}FlowValidateListInstance._version=t;FlowValidateListInstance._solution={};FlowValidateListInstance._uri=`/Flows/Validate`;FlowValidateListInstance.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}if(o.isUndefined(t.definition)){throw new Error('Required parameter "opts.definition" missing.')}var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),Status:o.get(t,"status"),Definition:c.object(o.get(t,"definition")),CommitMessage:o.get(t,"commitMessage")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowValidateListInstance.toJSON=function toJSON(){return this._solution};FlowValidateListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlowValidateListInstance};h=function FlowValidatePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FlowValidateInstance(t,e){this._version=t;this.valid=e.valid;this._context=undefined;this._solution={}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlowValidateList:u,FlowValidatePage:h,FlowValidateInstance:f}},16029:(t,e,i)=>{"use strict";var n=i(90250);var o=i(40190).CommandList;var s=i(27330).FleetList;var r=i(55656).NetworkAccessProfileList;var c=i(99419).NetworkList;var a=i(30929).SimList;var u=i(6916).UsageRecordList;var h=i(64351);function V1(t){h.prototype.constructor.call(this,t,"v1");this._commands=undefined;this._fleets=undefined;this._networks=undefined;this._networkAccessProfiles=undefined;this._sims=undefined;this._usageRecords=undefined}n.extend(V1.prototype,h.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"commands",{get:function(){this._commands=this._commands||new o(this);return this._commands}});Object.defineProperty(V1.prototype,"fleets",{get:function(){this._fleets=this._fleets||new s(this);return this._fleets}});Object.defineProperty(V1.prototype,"networks",{get:function(){this._networks=this._networks||new c(this);return this._networks}});Object.defineProperty(V1.prototype,"networkAccessProfiles",{get:function(){this._networkAccessProfiles=this._networkAccessProfiles||new r(this);return this._networkAccessProfiles}});Object.defineProperty(V1.prototype,"sims",{get:function(){this._sims=this._sims||new a(this);return this._sims}});Object.defineProperty(V1.prototype,"usageRecords",{get:function(){this._usageRecords=this._usageRecords||new u(this);return this._usageRecords}});t.exports=V1},40190:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CommandList(t){function CommandListInstance(t){return CommandListInstance.get(t)}CommandListInstance._version=t;CommandListInstance._solution={};CommandListInstance._uri=`/Commands`;CommandListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.sim)){throw new Error('Required parameter "opts.sim" missing.')}if(o.isUndefined(t.command)){throw new Error('Required parameter "opts.command" missing.')}var i=n.defer();var s=a.of({Sim:o.get(t,"sim"),Command:o.get(t,"command"),CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CommandListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CommandListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Sim:o.get(t,"sim"),Status:o.get(t,"status"),Direction:o.get(t,"direction"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.get=function get(t){return new p(this._version,t)};CommandListInstance.toJSON=function toJSON(){return this._solution};CommandListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CommandListInstance};h=function CommandPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CommandInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.simSid=e.sim_sid;this.command=e.command;this.status=e.status;this.direction=e.direction;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CommandContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Commands/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CommandList:u,CommandPage:h,CommandInstance:f,CommandContext:p}},27330:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function FleetList(t){function FleetListInstance(t){return FleetListInstance.get(t)}FleetListInstance._version=t;FleetListInstance._solution={};FleetListInstance._uri=`/Fleets`;FleetListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.networkAccessProfile)){throw new Error('Required parameter "opts.networkAccessProfile" missing.')}var i=n.defer();var s=u.of({NetworkAccessProfile:o.get(t,"networkAccessProfile"),UniqueName:o.get(t,"uniqueName"),DataEnabled:a.bool(o.get(t,"dataEnabled")),DataLimit:o.get(t,"dataLimit"),CommandsEnabled:a.bool(o.get(t,"commandsEnabled")),CommandsUrl:o.get(t,"commandsUrl"),CommandsMethod:o.get(t,"commandsMethod")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FleetListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FleetListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({NetworkAccessProfile:o.get(t,"networkAccessProfile"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.get=function get(t){return new d(this._version,t)};FleetListInstance.toJSON=function toJSON(){return this._solution};FleetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FleetListInstance};f=function FleetPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FleetInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this.dataEnabled=e.data_enabled;this.dataLimit=c.integer(e.data_limit);this.dataMetering=e.data_metering;this.commandsEnabled=e.commands_enabled;this.commandsUrl=e.commands_url;this.commandsMethod=e.commands_method;this.networkAccessProfileSid=e.network_access_profile_sid;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FleetContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Fleets/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),NetworkAccessProfile:o.get(t,"networkAccessProfile")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FleetList:h,FleetPage:f,FleetInstance:p,FleetContext:d}},99419:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function NetworkList(t){function NetworkListInstance(t){return NetworkListInstance.get(t)}NetworkListInstance._version=t;NetworkListInstance._solution={};NetworkListInstance._uri=`/Networks`;NetworkListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NetworkListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NetworkListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({IsoCountry:o.get(t,"isoCountry"),Mcc:o.get(t,"mcc"),Mnc:o.get(t,"mnc"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkListInstance.get=function get(t){return new f(this._version,t)};NetworkListInstance.toJSON=function toJSON(){return this._solution};NetworkListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NetworkListInstance};u=function NetworkPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function NetworkInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.url=e.url;this.isoCountry=e.iso_country;this.identifiers=e.identifiers;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NetworkContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Networks/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NetworkList:a,NetworkPage:u,NetworkInstance:h,NetworkContext:f}},55656:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(26489).NetworkAccessProfileNetworkList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function NetworkAccessProfileList(t){function NetworkAccessProfileListInstance(t){return NetworkAccessProfileListInstance.get(t)}NetworkAccessProfileListInstance._version=t;NetworkAccessProfileListInstance._solution={};NetworkAccessProfileListInstance._uri=`/NetworkAccessProfiles`;NetworkAccessProfileListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),Networks:u.map(o.get(t,"networks"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NetworkAccessProfileListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NetworkAccessProfileListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileListInstance.get=function get(t){return new l(this._version,t)};NetworkAccessProfileListInstance.toJSON=function toJSON(){return this._solution};NetworkAccessProfileListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NetworkAccessProfileListInstance};p=function NetworkAccessProfilePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function NetworkAccessProfileInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.networks=function networks(){return this._proxy.networks};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function NetworkAccessProfileContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/NetworkAccessProfiles/${e}`;this._networks=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"networks",{get:function(){if(!this._networks){this._networks=new r(this._version,this._solution.sid)}return this._networks}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NetworkAccessProfileList:f,NetworkAccessProfilePage:p,NetworkAccessProfileInstance:d,NetworkAccessProfileContext:l}},26489:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function NetworkAccessProfileNetworkList(t,e){function NetworkAccessProfileNetworkListInstance(t){return NetworkAccessProfileNetworkListInstance.get(t)}NetworkAccessProfileNetworkListInstance._version=t;NetworkAccessProfileNetworkListInstance._solution={networkAccessProfileSid:e};NetworkAccessProfileNetworkListInstance._uri=`/NetworkAccessProfiles/${e}/Networks`;NetworkAccessProfileNetworkListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NetworkAccessProfileNetworkListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NetworkAccessProfileNetworkListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileNetworkListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileNetworkListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.network)){throw new Error('Required parameter "opts.network" missing.')}var i=n.defer();var s=c.of({Network:o.get(t,"network")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution.networkAccessProfileSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileNetworkListInstance.get=function get(t){return new f(this._version,this._solution.networkAccessProfileSid,t)};NetworkAccessProfileNetworkListInstance.toJSON=function toJSON(){return this._solution};NetworkAccessProfileNetworkListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NetworkAccessProfileNetworkListInstance};u=function NetworkAccessProfileNetworkPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.networkAccessProfileSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function NetworkAccessProfileNetworkInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.networkAccessProfileSid=e.network_access_profile_sid;this.friendlyName=e.friendly_name;this.isoCountry=e.iso_country;this.identifiers=e.identifiers;this.url=e.url;this._context=undefined;this._solution={networkAccessProfileSid:i,sid:n||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.networkAccessProfileSid,this._solution.sid)}return this._context}});h.prototype.remove=function remove(t){return this._proxy.remove(t)};h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NetworkAccessProfileNetworkContext(t,e,i){this._version=t;this._solution={networkAccessProfileSid:e,sid:i};this._uri=`/NetworkAccessProfiles/${e}/Networks/${i}`};f.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.networkAccessProfileSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NetworkAccessProfileNetworkList:a,NetworkAccessProfileNetworkPage:u,NetworkAccessProfileNetworkInstance:h,NetworkAccessProfileNetworkContext:f}},30929:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SimList(t){function SimListInstance(t){return SimListInstance.get(t)}SimListInstance._version=t;SimListInstance._solution={};SimListInstance._uri=`/Sims`;SimListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SimListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SimListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Status:o.get(t,"status"),Fleet:o.get(t,"fleet"),Iccid:o.get(t,"iccid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.get=function get(t){return new p(this._version,t)};SimListInstance.toJSON=function toJSON(){return this._solution};SimListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SimListInstance};h=function SimPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SimInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.iccid=e.iccid;this.status=e.status;this.fleetSid=e.fleet_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SimContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Sims/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({UniqueName:o.get(t,"uniqueName"),Status:o.get(t,"status"),Fleet:o.get(t,"fleet"),CallbackUrl:o.get(t,"callbackUrl"),CallbackMethod:o.get(t,"callbackMethod"),AccountSid:o.get(t,"accountSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SimList:u,SimPage:h,SimInstance:f,SimContext:p}},6916:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function UsageRecordList(t){function UsageRecordListInstance(t){return UsageRecordListInstance.get(t)}UsageRecordListInstance._version=t;UsageRecordListInstance._solution={};UsageRecordListInstance._uri=`/UsageRecords`;UsageRecordListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UsageRecordListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UsageRecordListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Sim:o.get(t,"sim"),Fleet:o.get(t,"fleet"),Network:o.get(t,"network"),IsoCountry:o.get(t,"isoCountry"),Group:o.get(t,"group"),Granularity:o.get(t,"granularity"),StartTime:a.iso8601DateTime(o.get(t,"startTime")),EndTime:a.iso8601DateTime(o.get(t,"endTime")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.toJSON=function toJSON(){return this._solution};UsageRecordListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UsageRecordListInstance};f=function UsageRecordPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UsageRecordInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.simSid=e.sim_sid;this.networkSid=e.network_sid;this.fleetSid=e.fleet_sid;this.isoCountry=e.iso_country;this.period=e.period;this.dataUpload=c.integer(e.data_upload);this.dataDownload=c.integer(e.data_download);this.dataTotal=c.integer(e.data_total);this._context=undefined;this._solution={}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UsageRecordList:h,UsageRecordPage:f,UsageRecordInstance:p}},34949:(t,e,i)=>{"use strict";var n=i(90250);var o=i(63190).ServiceList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._services=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new o(this);return this._services}});t.exports=V1},63190:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(81088).DocumentList;var c=i(60938);var a=i(4845).SyncListList;var u=i(81014).SyncMapList;var h=i(20786).SyncStreamList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),WebhookUrl:o.get(t,"webhookUrl"),ReachabilityWebhooksEnabled:p.bool(o.get(t,"reachabilityWebhooksEnabled")),AclEnabled:p.bool(o.get(t,"aclEnabled")),ReachabilityDebouncingEnabled:p.bool(o.get(t,"reachabilityDebouncingEnabled")),ReachabilityDebouncingWindow:o.get(t,"reachabilityDebouncingWindow"),WebhooksFromRestEnabled:p.bool(o.get(t,"webhooksFromRestEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new _(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};v=function ServicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,c.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.url=e.url;this.webhookUrl=e.webhook_url;this.webhooksFromRestEnabled=e.webhooks_from_rest_enabled;this.reachabilityWebhooksEnabled=e.reachability_webhooks_enabled;this.aclEnabled=e.acl_enabled;this.reachabilityDebouncingEnabled=e.reachability_debouncing_enabled;this.reachabilityDebouncingWindow=f.integer(e.reachability_debouncing_window);this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.documents=function documents(){return this._proxy.documents};m.prototype.syncLists=function syncLists(){return this._proxy.syncLists};m.prototype.syncMaps=function syncMaps(){return this._proxy.syncMaps};m.prototype.syncStreams=function syncStreams(){return this._proxy.syncStreams};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._documents=undefined;this._syncLists=undefined;this._syncMaps=undefined;this._syncStreams=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({WebhookUrl:o.get(t,"webhookUrl"),FriendlyName:o.get(t,"friendlyName"),ReachabilityWebhooksEnabled:p.bool(o.get(t,"reachabilityWebhooksEnabled")),AclEnabled:p.bool(o.get(t,"aclEnabled")),ReachabilityDebouncingEnabled:p.bool(o.get(t,"reachabilityDebouncingEnabled")),ReachabilityDebouncingWindow:o.get(t,"reachabilityDebouncingWindow"),WebhooksFromRestEnabled:p.bool(o.get(t,"webhooksFromRestEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"documents",{get:function(){if(!this._documents){this._documents=new r(this._version,this._solution.sid)}return this._documents}});Object.defineProperty(_.prototype,"syncLists",{get:function(){if(!this._syncLists){this._syncLists=new a(this._version,this._solution.sid)}return this._syncLists}});Object.defineProperty(_.prototype,"syncMaps",{get:function(){if(!this._syncMaps){this._syncMaps=new u(this._version,this._solution.sid)}return this._syncMaps}});Object.defineProperty(_.prototype,"syncStreams",{get:function(){if(!this._syncStreams){this._syncStreams=new h(this._version,this._solution.sid)}return this._syncStreams}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:l,ServicePage:v,ServiceInstance:m,ServiceContext:_}},81088:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(24808).DocumentPermissionList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function DocumentList(t,e){function DocumentListInstance(t){return DocumentListInstance.get(t)}DocumentListInstance._version=t;DocumentListInstance._solution={serviceSid:e};DocumentListInstance._uri=`/Services/${e}/Documents`;DocumentListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),Data:u.object(o.get(t,"data")),Ttl:o.get(t,"ttl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DocumentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DocumentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};DocumentListInstance.toJSON=function toJSON(){return this._solution};DocumentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DocumentListInstance};p=function DocumentPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function DocumentInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.data=e.data;this.dateExpires=a.iso8601DateTime(e.date_expires);this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.documentPermissions=function documentPermissions(){return this._proxy.documentPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function DocumentContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Documents/${i}`;this._documentPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Data:u.object(o.get(t,"data")),Ttl:o.get(t,"ttl")});var r=h.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"documentPermissions",{get:function(){if(!this._documentPermissions){this._documentPermissions=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._documentPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DocumentList:f,DocumentPage:p,DocumentInstance:d,DocumentContext:l}},24808:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function DocumentPermissionList(t,e,i){function DocumentPermissionListInstance(t){return DocumentPermissionListInstance.get(t)}DocumentPermissionListInstance._version=t;DocumentPermissionListInstance._solution={serviceSid:e,documentSid:i};DocumentPermissionListInstance._uri=`/Services/${e}/Documents/${i}/Permissions`;DocumentPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DocumentPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DocumentPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.documentSid,t)};DocumentPermissionListInstance.toJSON=function toJSON(){return this._solution};DocumentPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DocumentPermissionListInstance};h=function DocumentPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.documentSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DocumentPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.documentSid=e.document_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,documentSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.documentSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DocumentPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,documentSid:i,identity:n};this._uri=`/Services/${e}/Documents/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.documentSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.documentSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DocumentPermissionList:u,DocumentPermissionPage:h,DocumentPermissionInstance:f,DocumentPermissionContext:p}},4845:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6456).SyncListItemList;var a=i(19760).SyncListPermissionList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function SyncListList(t,e){function SyncListListInstance(t){return SyncListListInstance.get(t)}SyncListListInstance._version=t;SyncListListInstance._solution={serviceSid:e};SyncListListInstance._uri=`/Services/${e}/Lists`;SyncListListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),Ttl:o.get(t,"ttl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};SyncListListInstance.toJSON=function toJSON(){return this._solution};SyncListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListListInstance};p=function SyncListPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncListInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.dateExpires=u.iso8601DateTime(e.date_expires);this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.syncListItems=function syncListItems(){return this._proxy.syncListItems};d.prototype.syncListPermissions=function syncListPermissions(){return this._proxy.syncListPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SyncListContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Lists/${i}`;this._syncListItems=undefined;this._syncListPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Ttl:o.get(t,"ttl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"syncListItems",{get:function(){if(!this._syncListItems){this._syncListItems=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncListItems}});Object.defineProperty(l.prototype,"syncListPermissions",{get:function(){if(!this._syncListPermissions){this._syncListPermissions=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncListPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListList:f,SyncListPage:p,SyncListInstance:d,SyncListContext:l}},6456:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function SyncListItemList(t,e,i){function SyncListItemListInstance(t){return SyncListItemListInstance.get(t)}SyncListItemListInstance._version=t;SyncListItemListInstance._solution={serviceSid:e,listSid:i};SyncListItemListInstance._uri=`/Services/${e}/Lists/${i}/Items`;SyncListItemListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data")),Ttl:o.get(t,"ttl"),ItemTtl:o.get(t,"itemTtl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListItemListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListItemListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),From:o.get(t,"from"),Bounds:o.get(t,"bounds"),HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.listSid,t)};SyncListItemListInstance.toJSON=function toJSON(){return this._solution};SyncListItemListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListItemListInstance};f=function SyncListItemPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.listSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncListItemInstance(t,e,i,n,o){this._version=t;this.index=c.integer(e.index);this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.listSid=e.list_sid;this.url=e.url;this.revision=e.revision;this.data=e.data;this.dateExpires=c.iso8601DateTime(e.date_expires);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,listSid:n,index:o||this.index}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.listSid,this._solution.index)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncListItemContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,listSid:i,index:n};this._uri=`/Services/${e}/Lists/${i}/Items/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data")),Ttl:o.get(t,"ttl"),ItemTtl:o.get(t,"itemTtl"),CollectionTtl:o.get(t,"collectionTtl")});var r=u.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListItemList:h,SyncListItemPage:f,SyncListItemInstance:p,SyncListItemContext:d}},19760:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function SyncListPermissionList(t,e,i){function SyncListPermissionListInstance(t){return SyncListPermissionListInstance.get(t)}SyncListPermissionListInstance._version=t;SyncListPermissionListInstance._solution={serviceSid:e,listSid:i};SyncListPermissionListInstance._uri=`/Services/${e}/Lists/${i}/Permissions`;SyncListPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.listSid,t)};SyncListPermissionListInstance.toJSON=function toJSON(){return this._solution};SyncListPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListPermissionListInstance};h=function SyncListPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.listSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SyncListPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.listSid=e.list_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,listSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.listSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncListPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,listSid:i,identity:n};this._uri=`/Services/${e}/Lists/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListPermissionList:u,SyncListPermissionPage:h,SyncListPermissionInstance:f,SyncListPermissionContext:p}},81014:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(64825).SyncMapItemList;var a=i(89269).SyncMapPermissionList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function SyncMapList(t,e){function SyncMapListInstance(t){return SyncMapListInstance.get(t)}SyncMapListInstance._version=t;SyncMapListInstance._solution={serviceSid:e};SyncMapListInstance._uri=`/Services/${e}/Maps`;SyncMapListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),Ttl:o.get(t,"ttl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};SyncMapListInstance.toJSON=function toJSON(){return this._solution};SyncMapListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapListInstance};p=function SyncMapPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncMapInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.dateExpires=u.iso8601DateTime(e.date_expires);this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.syncMapItems=function syncMapItems(){return this._proxy.syncMapItems};d.prototype.syncMapPermissions=function syncMapPermissions(){return this._proxy.syncMapPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SyncMapContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Maps/${i}`;this._syncMapItems=undefined;this._syncMapPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Ttl:o.get(t,"ttl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"syncMapItems",{get:function(){if(!this._syncMapItems){this._syncMapItems=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncMapItems}});Object.defineProperty(l.prototype,"syncMapPermissions",{get:function(){if(!this._syncMapPermissions){this._syncMapPermissions=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncMapPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapList:f,SyncMapPage:p,SyncMapInstance:d,SyncMapContext:l}},64825:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function SyncMapItemList(t,e,i){function SyncMapItemListInstance(t){return SyncMapItemListInstance.get(t)}SyncMapItemListInstance._version=t;SyncMapItemListInstance._solution={serviceSid:e,mapSid:i};SyncMapItemListInstance._uri=`/Services/${e}/Maps/${i}/Items`;SyncMapItemListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.key)){throw new Error('Required parameter "opts.key" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Key:o.get(t,"key"),Data:a.object(o.get(t,"data")),Ttl:o.get(t,"ttl"),ItemTtl:o.get(t,"itemTtl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapItemListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapItemListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),From:o.get(t,"from"),Bounds:o.get(t,"bounds"),HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.mapSid,t)};SyncMapItemListInstance.toJSON=function toJSON(){return this._solution};SyncMapItemListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapItemListInstance};f=function SyncMapItemPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.mapSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncMapItemInstance(t,e,i,n,o){this._version=t;this.key=e.key;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.mapSid=e.map_sid;this.url=e.url;this.revision=e.revision;this.data=e.data;this.dateExpires=c.iso8601DateTime(e.date_expires);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,mapSid:n,key:o||this.key}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.mapSid,this._solution.key)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncMapItemContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,mapSid:i,key:n};this._uri=`/Services/${e}/Maps/${i}/Items/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data")),Ttl:o.get(t,"ttl"),ItemTtl:o.get(t,"itemTtl"),CollectionTtl:o.get(t,"collectionTtl")});var r=u.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapItemList:h,SyncMapItemPage:f,SyncMapItemInstance:p,SyncMapItemContext:d}},89269:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function SyncMapPermissionList(t,e,i){function SyncMapPermissionListInstance(t){return SyncMapPermissionListInstance.get(t)}SyncMapPermissionListInstance._version=t;SyncMapPermissionListInstance._solution={serviceSid:e,mapSid:i};SyncMapPermissionListInstance._uri=`/Services/${e}/Maps/${i}/Permissions`;SyncMapPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.mapSid,t)};SyncMapPermissionListInstance.toJSON=function toJSON(){return this._solution};SyncMapPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapPermissionListInstance};h=function SyncMapPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.mapSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SyncMapPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.mapSid=e.map_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,mapSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.mapSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncMapPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,mapSid:i,identity:n};this._uri=`/Services/${e}/Maps/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapPermissionList:u,SyncMapPermissionPage:h,SyncMapPermissionInstance:f,SyncMapPermissionContext:p}},20786:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(12019).StreamMessageList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function SyncStreamList(t,e){function SyncStreamListInstance(t){return SyncStreamListInstance.get(t)}SyncStreamListInstance._version=t;SyncStreamListInstance._solution={serviceSid:e};SyncStreamListInstance._uri=`/Services/${e}/Streams`;SyncStreamListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),Ttl:o.get(t,"ttl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncStreamListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncStreamListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncStreamListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncStreamListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncStreamListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};SyncStreamListInstance.toJSON=function toJSON(){return this._solution};SyncStreamListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncStreamListInstance};f=function SyncStreamPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncStreamInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.dateExpires=a.iso8601DateTime(e.date_expires);this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.streamMessages=function streamMessages(){return this._proxy.streamMessages};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncStreamContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Streams/${i}`;this._streamMessages=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Ttl:o.get(t,"ttl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"streamMessages",{get:function(){if(!this._streamMessages){this._streamMessages=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._streamMessages}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncStreamList:h,SyncStreamPage:f,SyncStreamInstance:p,SyncStreamContext:d}},12019:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;u=function StreamMessageList(t,e,i){function StreamMessageListInstance(t){return StreamMessageListInstance.get(t)}StreamMessageListInstance._version=t;StreamMessageListInstance._solution={serviceSid:e,streamSid:i};StreamMessageListInstance._uri=`/Services/${e}/Streams/${i}/Messages`;StreamMessageListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=a.of({Data:c.object(o.get(t,"data"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};StreamMessageListInstance.toJSON=function toJSON(){return this._solution};StreamMessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return StreamMessageListInstance};h=function StreamMessagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.streamSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function StreamMessageInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.data=e.data;this._context=undefined;this._solution={serviceSid:i,streamSid:n}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={StreamMessageList:u,StreamMessagePage:h,StreamMessageInstance:f}},28079:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64351);var s=i(86558).WorkspaceList;function V1(t){o.prototype.constructor.call(this,t,"v1");this._workspaces=undefined}n.extend(V1.prototype,o.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"workspaces",{get:function(){this._workspaces=this._workspaces||new s(this);return this._workspaces}});t.exports=V1},86558:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(97497).ActivityList;var c=i(23057).EventList;var a=i(60938);var u=i(13250).TaskChannelList;var h=i(57360).TaskList;var f=i(22444).TaskQueueList;var p=i(12752).WorkerList;var d=i(66765).WorkflowList;var l=i(47678).WorkspaceCumulativeStatisticsList;var v=i(5751).WorkspaceRealTimeStatisticsList;var m=i(52593).WorkspaceStatisticsList;var _=i(80513);var g=i(6372);var y=i(72142);var S;var b;var w;var L;S=function WorkspaceList(t){function WorkspaceListInstance(t){return WorkspaceListInstance.get(t)}WorkspaceListInstance._version=t;WorkspaceListInstance._solution={};WorkspaceListInstance._uri=`/Workspaces`;WorkspaceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WorkspaceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WorkspaceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=y.of({FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new b(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkspaceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new b(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkspaceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=y.of({FriendlyName:o.get(t,"friendlyName"),EventCallbackUrl:o.get(t,"eventCallbackUrl"),EventsFilter:o.get(t,"eventsFilter"),MultiTaskEnabled:g.bool(o.get(t,"multiTaskEnabled")),Template:o.get(t,"template"),PrioritizeQueueOrder:o.get(t,"prioritizeQueueOrder")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new w(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkspaceListInstance.get=function get(t){return new L(this._version,t)};WorkspaceListInstance.toJSON=function toJSON(){return this._solution};WorkspaceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkspaceListInstance};b=function WorkspacePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(b.prototype,a.prototype);b.prototype.constructor=b;b.prototype.getInstance=function getInstance(t){return new w(this._version,t)};b.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};b.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};w=function WorkspaceInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.dateCreated=_.iso8601DateTime(e.date_created);this.dateUpdated=_.iso8601DateTime(e.date_updated);this.defaultActivityName=e.default_activity_name;this.defaultActivitySid=e.default_activity_sid;this.eventCallbackUrl=e.event_callback_url;this.eventsFilter=e.events_filter;this.friendlyName=e.friendly_name;this.multiTaskEnabled=e.multi_task_enabled;this.sid=e.sid;this.timeoutActivityName=e.timeout_activity_name;this.timeoutActivitySid=e.timeout_activity_sid;this.prioritizeQueueOrder=e.prioritize_queue_order;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(w.prototype,"_proxy",{get:function(){if(!this._context){this._context=new L(this._version,this._solution.sid)}return this._context}});w.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};w.prototype.update=function update(t,e){return this._proxy.update(t,e)};w.prototype.remove=function remove(t){return this._proxy.remove(t)};w.prototype.activities=function activities(){return this._proxy.activities};w.prototype.events=function events(){return this._proxy.events};w.prototype.tasks=function tasks(){return this._proxy.tasks};w.prototype.taskQueues=function taskQueues(){return this._proxy.taskQueues};w.prototype.workers=function workers(){return this._proxy.workers};w.prototype.workflows=function workflows(){return this._proxy.workflows};w.prototype.statistics=function statistics(){return this._proxy.statistics};w.prototype.realTimeStatistics=function realTimeStatistics(){return this._proxy.realTimeStatistics};w.prototype.cumulativeStatistics=function cumulativeStatistics(){return this._proxy.cumulativeStatistics};w.prototype.taskChannels=function taskChannels(){return this._proxy.taskChannels};w.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};w.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};L=function WorkspaceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Workspaces/${e}`;this._activities=undefined;this._events=undefined;this._tasks=undefined;this._taskQueues=undefined;this._workers=undefined;this._workflows=undefined;this._statistics=undefined;this._realTimeStatistics=undefined;this._cumulativeStatistics=undefined;this._taskChannels=undefined};L.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new w(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};L.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=y.of({DefaultActivitySid:o.get(t,"defaultActivitySid"),EventCallbackUrl:o.get(t,"eventCallbackUrl"),EventsFilter:o.get(t,"eventsFilter"),FriendlyName:o.get(t,"friendlyName"),MultiTaskEnabled:g.bool(o.get(t,"multiTaskEnabled")),TimeoutActivitySid:o.get(t,"timeoutActivitySid"),PrioritizeQueueOrder:o.get(t,"prioritizeQueueOrder")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new w(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};L.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(L.prototype,"activities",{get:function(){if(!this._activities){this._activities=new r(this._version,this._solution.sid)}return this._activities}});Object.defineProperty(L.prototype,"events",{get:function(){if(!this._events){this._events=new c(this._version,this._solution.sid)}return this._events}});Object.defineProperty(L.prototype,"tasks",{get:function(){if(!this._tasks){this._tasks=new h(this._version,this._solution.sid)}return this._tasks}});Object.defineProperty(L.prototype,"taskQueues",{get:function(){if(!this._taskQueues){this._taskQueues=new f(this._version,this._solution.sid)}return this._taskQueues}});Object.defineProperty(L.prototype,"workers",{get:function(){if(!this._workers){this._workers=new p(this._version,this._solution.sid)}return this._workers}});Object.defineProperty(L.prototype,"workflows",{get:function(){if(!this._workflows){this._workflows=new d(this._version,this._solution.sid)}return this._workflows}});Object.defineProperty(L.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new m(this._version,this._solution.sid)}return this._statistics}});Object.defineProperty(L.prototype,"realTimeStatistics",{get:function(){if(!this._realTimeStatistics){this._realTimeStatistics=new v(this._version,this._solution.sid)}return this._realTimeStatistics}});Object.defineProperty(L.prototype,"cumulativeStatistics",{get:function(){if(!this._cumulativeStatistics){this._cumulativeStatistics=new l(this._version,this._solution.sid)}return this._cumulativeStatistics}});Object.defineProperty(L.prototype,"taskChannels",{get:function(){if(!this._taskChannels){this._taskChannels=new u(this._version,this._solution.sid)}return this._taskChannels}});L.prototype.toJSON=function toJSON(){return this._solution};L.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkspaceList:S,WorkspacePage:b,WorkspaceInstance:w,WorkspaceContext:L}},97497:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ActivityList(t,e){function ActivityListInstance(t){return ActivityListInstance.get(t)}ActivityListInstance._version=t;ActivityListInstance._solution={workspaceSid:e};ActivityListInstance._uri=`/Workspaces/${e}/Activities`;ActivityListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ActivityListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ActivityListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Available:o.get(t,"available"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ActivityListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ActivityListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Available:a.bool(o.get(t,"available"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ActivityListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,t)};ActivityListInstance.toJSON=function toJSON(){return this._solution};ActivityListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ActivityListInstance};f=function ActivityPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ActivityInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.available=e.available;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ActivityContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/Activities/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ActivityList:h,ActivityPage:f,ActivityInstance:p,ActivityContext:d}},23057:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function EventList(t,e){function EventListInstance(t){return EventListInstance.get(t)}EventListInstance._version=t;EventListInstance._solution={workspaceSid:e};EventListInstance._uri=`/Workspaces/${e}/Events`;EventListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EventListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EventListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({EndDate:a.iso8601DateTime(o.get(t,"endDate")),EventType:o.get(t,"eventType"),Minutes:o.get(t,"minutes"),ReservationSid:o.get(t,"reservationSid"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),TaskQueueSid:o.get(t,"taskQueueSid"),TaskSid:o.get(t,"taskSid"),WorkerSid:o.get(t,"workerSid"),WorkflowSid:o.get(t,"workflowSid"),TaskChannel:o.get(t,"taskChannel"),Sid:o.get(t,"sid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,t)};EventListInstance.toJSON=function toJSON(){return this._solution};EventListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EventListInstance};f=function EventPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function EventInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.actorSid=e.actor_sid;this.actorType=e.actor_type;this.actorUrl=e.actor_url;this.description=e.description;this.eventData=e.event_data;this.eventDate=c.iso8601DateTime(e.event_date);this.eventDateMs=c.integer(e.event_date_ms);this.eventType=e.event_type;this.resourceSid=e.resource_sid;this.resourceType=e.resource_type;this.resourceUrl=e.resource_url;this.sid=e.sid;this.source=e.source;this.sourceIpAddress=e.source_ip_address;this.url=e.url;this.workspaceSid=e.workspace_sid;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function EventContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/Events/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EventList:h,EventPage:f,EventInstance:p,EventContext:d}},57360:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(11600).ReservationList;var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function TaskList(t,e){function TaskListInstance(t){return TaskListInstance.get(t)}TaskListInstance._version=t;TaskListInstance._solution={workspaceSid:e};TaskListInstance._uri=`/Workspaces/${e}/Tasks`;TaskListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Priority:o.get(t,"priority"),AssignmentStatus:u.map(o.get(t,"assignmentStatus"),function(t){return t}),WorkflowSid:o.get(t,"workflowSid"),WorkflowName:o.get(t,"workflowName"),TaskQueueSid:o.get(t,"taskQueueSid"),TaskQueueName:o.get(t,"taskQueueName"),EvaluateTaskAttributes:o.get(t,"evaluateTaskAttributes"),Ordering:o.get(t,"ordering"),HasAddons:u.bool(o.get(t,"hasAddons")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Timeout:o.get(t,"timeout"),Priority:o.get(t,"priority"),TaskChannel:o.get(t,"taskChannel"),WorkflowSid:o.get(t,"workflowSid"),Attributes:o.get(t,"attributes")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.get=function get(t){return new l(this._version,this._solution.workspaceSid,t)};TaskListInstance.toJSON=function toJSON(){return this._solution};TaskListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskListInstance};p=function TaskPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.workspaceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function TaskInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.age=a.integer(e.age);this.assignmentStatus=e.assignment_status;this.attributes=e.attributes;this.addons=e.addons;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.taskQueueEnteredDate=a.iso8601DateTime(e.task_queue_entered_date);this.priority=a.integer(e.priority);this.reason=e.reason;this.sid=e.sid;this.taskQueueSid=e.task_queue_sid;this.taskQueueFriendlyName=e.task_queue_friendly_name;this.taskChannelSid=e.task_channel_sid;this.taskChannelUniqueName=e.task_channel_unique_name;this.timeout=a.integer(e.timeout);this.workflowSid=e.workflow_sid;this.workflowFriendlyName=e.workflow_friendly_name;this.workspaceSid=e.workspace_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.reservations=function reservations(){return this._proxy.reservations};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function TaskContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/Tasks/${i}`;this._reservations=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Attributes:o.get(t,"attributes"),AssignmentStatus:o.get(t,"assignmentStatus"),Reason:o.get(t,"reason"),Priority:o.get(t,"priority"),TaskChannel:o.get(t,"taskChannel")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"reservations",{get:function(){if(!this._reservations){this._reservations=new c(this._version,this._solution.workspaceSid,this._solution.sid)}return this._reservations}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskList:f,TaskPage:p,TaskInstance:d,TaskContext:l}},11600:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ReservationList(t,e,i){function ReservationListInstance(t){return ReservationListInstance.get(t)}ReservationListInstance._version=t;ReservationListInstance._solution={workspaceSid:e,taskSid:i};ReservationListInstance._uri=`/Workspaces/${e}/Tasks/${i}/Reservations`;ReservationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ReservationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ReservationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ReservationStatus:o.get(t,"reservationStatus"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ReservationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ReservationListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,this._solution.taskSid,t)};ReservationListInstance.toJSON=function toJSON(){return this._solution};ReservationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ReservationListInstance};f=function ReservationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid,this._solution.taskSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ReservationInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.reservationStatus=e.reservation_status;this.sid=e.sid;this.taskSid=e.task_sid;this.workerName=e.worker_name;this.workerSid=e.worker_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,taskSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.taskSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ReservationContext(t,e,i,n){this._version=t;this._solution={workspaceSid:e,taskSid:i,sid:n};this._uri=`/Workspaces/${e}/Tasks/${i}/Reservations/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.taskSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ReservationStatus:o.get(t,"reservationStatus"),WorkerActivitySid:o.get(t,"workerActivitySid"),Instruction:o.get(t,"instruction"),DequeuePostWorkActivitySid:o.get(t,"dequeuePostWorkActivitySid"),DequeueFrom:o.get(t,"dequeueFrom"),DequeueRecord:o.get(t,"dequeueRecord"),DequeueTimeout:o.get(t,"dequeueTimeout"),DequeueTo:o.get(t,"dequeueTo"),DequeueStatusCallbackUrl:o.get(t,"dequeueStatusCallbackUrl"),CallFrom:o.get(t,"callFrom"),CallRecord:o.get(t,"callRecord"),CallTimeout:o.get(t,"callTimeout"),CallTo:o.get(t,"callTo"),CallUrl:o.get(t,"callUrl"),CallStatusCallbackUrl:o.get(t,"callStatusCallbackUrl"),CallAccept:a.bool(o.get(t,"callAccept")),RedirectCallSid:o.get(t,"redirectCallSid"),RedirectAccept:a.bool(o.get(t,"redirectAccept")),RedirectUrl:o.get(t,"redirectUrl"),To:o.get(t,"to"),From:o.get(t,"from"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),StatusCallbackEvent:a.map(o.get(t,"statusCallbackEvent"),function(t){return t}),Timeout:o.get(t,"timeout"),Record:a.bool(o.get(t,"record")),Muted:a.bool(o.get(t,"muted")),Beep:o.get(t,"beep"),StartConferenceOnEnter:a.bool(o.get(t,"startConferenceOnEnter")),EndConferenceOnExit:a.bool(o.get(t,"endConferenceOnExit")),WaitUrl:o.get(t,"waitUrl"),WaitMethod:o.get(t,"waitMethod"),EarlyMedia:a.bool(o.get(t,"earlyMedia")),MaxParticipants:o.get(t,"maxParticipants"),ConferenceStatusCallback:o.get(t,"conferenceStatusCallback"),ConferenceStatusCallbackMethod:o.get(t,"conferenceStatusCallbackMethod"),ConferenceStatusCallbackEvent:a.map(o.get(t,"conferenceStatusCallbackEvent"),function(t){return t}),ConferenceRecord:o.get(t,"conferenceRecord"),ConferenceTrim:o.get(t,"conferenceTrim"),RecordingChannels:o.get(t,"recordingChannels"),RecordingStatusCallback:o.get(t,"recordingStatusCallback"),RecordingStatusCallbackMethod:o.get(t,"recordingStatusCallbackMethod"),ConferenceRecordingStatusCallback:o.get(t,"conferenceRecordingStatusCallback"),ConferenceRecordingStatusCallbackMethod:o.get(t,"conferenceRecordingStatusCallbackMethod"),Region:o.get(t,"region"),SipAuthUsername:o.get(t,"sipAuthUsername"),SipAuthPassword:o.get(t,"sipAuthPassword"),DequeueStatusCallbackEvent:a.map(o.get(t,"dequeueStatusCallbackEvent"),function(t){return t}),PostWorkActivitySid:o.get(t,"postWorkActivitySid"),SupervisorMode:o.get(t,"supervisorMode"),Supervisor:o.get(t,"supervisor"),EndConferenceOnCustomerExit:a.bool(o.get(t,"endConferenceOnCustomerExit")),BeepOnCustomerEntrance:a.bool(o.get(t,"beepOnCustomerEntrance"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ReservationList:h,ReservationPage:f,ReservationInstance:p,ReservationContext:d}},13250:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function TaskChannelList(t,e){function TaskChannelListInstance(t){return TaskChannelListInstance.get(t)}TaskChannelListInstance._version=t;TaskChannelListInstance._solution={workspaceSid:e};TaskChannelListInstance._uri=`/Workspaces/${e}/TaskChannels`;TaskChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskChannelListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),ChannelOptimizedRouting:a.bool(o.get(t,"channelOptimizedRouting"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskChannelListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,t)};TaskChannelListInstance.toJSON=function toJSON(){return this._solution};TaskChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskChannelListInstance};f=function TaskChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskChannelInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.uniqueName=e.unique_name;this.workspaceSid=e.workspace_sid;this.channelOptimizedRouting=e.channel_optimized_routing;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function TaskChannelContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/TaskChannels/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),ChannelOptimizedRouting:a.bool(o.get(t,"channelOptimizedRouting"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskChannelList:h,TaskChannelPage:f,TaskChannelInstance:p,TaskChannelContext:d}},22444:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(53498).TaskQueueCumulativeStatisticsList;var a=i(12822).TaskQueueRealTimeStatisticsList;var u=i(28266).TaskQueueStatisticsList;var h=i(87382).TaskQueuesStatisticsList;var f=i(80513);var p=i(72142);var d;var l;var v;var m;d=function TaskQueueList(t,e){function TaskQueueListInstance(t){return TaskQueueListInstance.get(t)}TaskQueueListInstance._version=t;TaskQueueListInstance._solution={workspaceSid:e};TaskQueueListInstance._uri=`/Workspaces/${e}/TaskQueues`;TaskQueueListInstance._statistics=undefined;TaskQueueListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskQueueListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskQueueListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),EvaluateWorkerAttributes:o.get(t,"evaluateWorkerAttributes"),WorkerSid:o.get(t,"workerSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskQueueListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskQueueListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),TargetWorkers:o.get(t,"targetWorkers"),MaxReservedWorkers:o.get(t,"maxReservedWorkers"),TaskOrder:o.get(t,"taskOrder"),ReservationActivitySid:o.get(t,"reservationActivitySid"),AssignmentActivitySid:o.get(t,"assignmentActivitySid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskQueueListInstance.get=function get(t){return new m(this._version,this._solution.workspaceSid,t)};Object.defineProperty(TaskQueueListInstance,"statistics",{get:function statistics(){if(!this._statistics){this._statistics=new h(this._version,this._solution.workspaceSid)}return this._statistics}});TaskQueueListInstance.toJSON=function toJSON(){return this._solution};TaskQueueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskQueueListInstance};l=function TaskQueuePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,r.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.workspaceSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function TaskQueueInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assignmentActivitySid=e.assignment_activity_sid;this.assignmentActivityName=e.assignment_activity_name;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.maxReservedWorkers=f.integer(e.max_reserved_workers);this.reservationActivitySid=e.reservation_activity_sid;this.reservationActivityName=e.reservation_activity_name;this.sid=e.sid;this.targetWorkers=e.target_workers;this.taskOrder=e.task_order;this.url=e.url;this.workspaceSid=e.workspace_sid;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.statistics=function statistics(){return this._proxy.statistics};v.prototype.realTimeStatistics=function realTimeStatistics(){return this._proxy.realTimeStatistics};v.prototype.cumulativeStatistics=function cumulativeStatistics(){return this._proxy.cumulativeStatistics};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function TaskQueueContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/TaskQueues/${i}`;this._statistics=undefined;this._realTimeStatistics=undefined;this._cumulativeStatistics=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),TargetWorkers:o.get(t,"targetWorkers"),ReservationActivitySid:o.get(t,"reservationActivitySid"),AssignmentActivitySid:o.get(t,"assignmentActivitySid"),MaxReservedWorkers:o.get(t,"maxReservedWorkers"),TaskOrder:o.get(t,"taskOrder")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new u(this._version,this._solution.workspaceSid,this._solution.sid)}return this._statistics}});Object.defineProperty(m.prototype,"realTimeStatistics",{get:function(){if(!this._realTimeStatistics){this._realTimeStatistics=new a(this._version,this._solution.workspaceSid,this._solution.sid)}return this._realTimeStatistics}});Object.defineProperty(m.prototype,"cumulativeStatistics",{get:function(){if(!this._cumulativeStatistics){this._cumulativeStatistics=new c(this._version,this._solution.workspaceSid,this._solution.sid)}return this._cumulativeStatistics}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskQueueList:d,TaskQueuePage:l,TaskQueueInstance:v,TaskQueueContext:m}},53498:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function TaskQueueCumulativeStatisticsList(t,e,i){function TaskQueueCumulativeStatisticsListInstance(t){return TaskQueueCumulativeStatisticsListInstance.get(t)}TaskQueueCumulativeStatisticsListInstance._version=t;TaskQueueCumulativeStatisticsListInstance._solution={workspaceSid:e,taskQueueSid:i};TaskQueueCumulativeStatisticsListInstance.get=function get(){return new d(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)};TaskQueueCumulativeStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskQueueCumulativeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskQueueCumulativeStatisticsListInstance};f=function TaskQueueCumulativeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskQueueCumulativeStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.avgTaskAcceptanceTime=c.integer(e.avg_task_acceptance_time);this.startTime=c.iso8601DateTime(e.start_time);this.endTime=c.iso8601DateTime(e.end_time);this.reservationsCreated=c.integer(e.reservations_created);this.reservationsAccepted=c.integer(e.reservations_accepted);this.reservationsRejected=c.integer(e.reservations_rejected);this.reservationsTimedOut=c.integer(e.reservations_timed_out);this.reservationsCanceled=c.integer(e.reservations_canceled);this.reservationsRescinded=c.integer(e.reservations_rescinded);this.splitByWaitTime=e.split_by_wait_time;this.taskQueueSid=e.task_queue_sid;this.waitDurationUntilAccepted=e.wait_duration_until_accepted;this.waitDurationUntilCanceled=e.wait_duration_until_canceled;this.waitDurationInQueueUntilAccepted=e.wait_duration_in_queue_until_accepted;this.tasksCanceled=c.integer(e.tasks_canceled);this.tasksCompleted=c.integer(e.tasks_completed);this.tasksDeleted=c.integer(e.tasks_deleted);this.tasksEntered=c.integer(e.tasks_entered);this.tasksMoved=c.integer(e.tasks_moved);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,taskQueueSid:n}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)}return this._context}});p.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function TaskQueueCumulativeStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,taskQueueSid:i};this._uri=`/Workspaces/${e}/TaskQueues/${i}/CumulativeStatistics`};d.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({EndDate:a.iso8601DateTime(o.get(t,"endDate")),Minutes:o.get(t,"minutes"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskQueueCumulativeStatisticsList:h,TaskQueueCumulativeStatisticsPage:f,TaskQueueCumulativeStatisticsInstance:p,TaskQueueCumulativeStatisticsContext:d}},12822:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TaskQueueRealTimeStatisticsList(t,e,i){function TaskQueueRealTimeStatisticsListInstance(t){return TaskQueueRealTimeStatisticsListInstance.get(t)}TaskQueueRealTimeStatisticsListInstance._version=t;TaskQueueRealTimeStatisticsListInstance._solution={workspaceSid:e,taskQueueSid:i};TaskQueueRealTimeStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)};TaskQueueRealTimeStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskQueueRealTimeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskQueueRealTimeStatisticsListInstance};h=function TaskQueueRealTimeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskQueueRealTimeStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.activityStatistics=e.activity_statistics;this.longestTaskWaitingAge=c.integer(e.longest_task_waiting_age);this.longestTaskWaitingSid=e.longest_task_waiting_sid;this.longestRelativeTaskAgeInQueue=c.integer(e.longest_relative_task_age_in_queue);this.longestRelativeTaskSidInQueue=e.longest_relative_task_sid_in_queue;this.taskQueueSid=e.task_queue_sid;this.tasksByPriority=e.tasks_by_priority;this.tasksByStatus=e.tasks_by_status;this.totalAvailableWorkers=c.integer(e.total_available_workers);this.totalEligibleWorkers=c.integer(e.total_eligible_workers);this.totalTasks=c.integer(e.total_tasks);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,taskQueueSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskQueueRealTimeStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,taskQueueSid:i};this._uri=`/Workspaces/${e}/TaskQueues/${i}/RealTimeStatistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskQueueRealTimeStatisticsList:u,TaskQueueRealTimeStatisticsPage:h,TaskQueueRealTimeStatisticsInstance:f,TaskQueueRealTimeStatisticsContext:p}},28266:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function TaskQueueStatisticsList(t,e,i){function TaskQueueStatisticsListInstance(t){return TaskQueueStatisticsListInstance.get(t)}TaskQueueStatisticsListInstance._version=t;TaskQueueStatisticsListInstance._solution={workspaceSid:e,taskQueueSid:i};TaskQueueStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)};TaskQueueStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskQueueStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskQueueStatisticsListInstance};h=function TaskQueueStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskQueueStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.cumulative=e.cumulative;this.realtime=e.realtime;this.taskQueueSid=e.task_queue_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,taskQueueSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskQueueStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,taskQueueSid:i};this._uri=`/Workspaces/${e}/TaskQueues/${i}/Statistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({EndDate:c.iso8601DateTime(o.get(t,"endDate")),Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskQueueStatisticsList:u,TaskQueueStatisticsPage:h,TaskQueueStatisticsInstance:f,TaskQueueStatisticsContext:p}},87382:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;u=function TaskQueuesStatisticsList(t,e){function TaskQueuesStatisticsListInstance(t){return TaskQueuesStatisticsListInstance.get(t)}TaskQueuesStatisticsListInstance._version=t;TaskQueuesStatisticsListInstance._solution={workspaceSid:e};TaskQueuesStatisticsListInstance._uri=`/Workspaces/${e}/TaskQueues/Statistics`;TaskQueuesStatisticsListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskQueuesStatisticsListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskQueuesStatisticsListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({EndDate:c.iso8601DateTime(o.get(t,"endDate")),FriendlyName:o.get(t,"friendlyName"),Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskQueuesStatisticsListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskQueuesStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskQueuesStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskQueuesStatisticsListInstance};h=function TaskQueuesStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskQueuesStatisticsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.cumulative=e.cumulative;this.realtime=e.realtime;this.taskQueueSid=e.task_queue_sid;this.workspaceSid=e.workspace_sid;this._context=undefined;this._solution={workspaceSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskQueuesStatisticsList:u,TaskQueuesStatisticsPage:h,TaskQueuesStatisticsInstance:f}},12752:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(61747).ReservationList;var a=i(30781).WorkerChannelList;var u=i(26500).WorkerStatisticsList;var h=i(62308).WorkersCumulativeStatisticsList;var f=i(98231).WorkersRealTimeStatisticsList;var p=i(2858).WorkersStatisticsList;var d=i(80513);var l=i(6372);var v=i(72142);var m;var _;var g;var y;m=function WorkerList(t,e){function WorkerListInstance(t){return WorkerListInstance.get(t)}WorkerListInstance._version=t;WorkerListInstance._solution={workspaceSid:e};WorkerListInstance._uri=`/Workspaces/${e}/Workers`;WorkerListInstance._statistics=undefined;WorkerListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WorkerListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WorkerListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=v.of({ActivityName:o.get(t,"activityName"),ActivitySid:o.get(t,"activitySid"),Available:o.get(t,"available"),FriendlyName:o.get(t,"friendlyName"),TargetWorkersExpression:o.get(t,"targetWorkersExpression"),TaskQueueName:o.get(t,"taskQueueName"),TaskQueueSid:o.get(t,"taskQueueSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new _(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkerListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new _(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkerListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=v.of({FriendlyName:o.get(t,"friendlyName"),ActivitySid:o.get(t,"activitySid"),Attributes:o.get(t,"attributes")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new g(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkerListInstance.get=function get(t){return new y(this._version,this._solution.workspaceSid,t)};Object.defineProperty(WorkerListInstance,"statistics",{get:function statistics(){if(!this._statistics){this._statistics=new p(this._version,this._solution.workspaceSid)}return this._statistics}});WorkerListInstance.toJSON=function toJSON(){return this._solution};WorkerListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkerListInstance};_=function WorkerPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(_.prototype,r.prototype);_.prototype.constructor=_;_.prototype.getInstance=function getInstance(t){return new g(this._version,t,this._solution.workspaceSid)};_.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};g=function WorkerInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.activityName=e.activity_name;this.activitySid=e.activity_sid;this.attributes=e.attributes;this.available=e.available;this.dateCreated=d.iso8601DateTime(e.date_created);this.dateStatusChanged=d.iso8601DateTime(e.date_status_changed);this.dateUpdated=d.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(g.prototype,"_proxy",{get:function(){if(!this._context){this._context=new y(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});g.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};g.prototype.update=function update(t,e){return this._proxy.update(t,e)};g.prototype.remove=function remove(t){return this._proxy.remove(t)};g.prototype.realTimeStatistics=function realTimeStatistics(){return this._proxy.realTimeStatistics};g.prototype.cumulativeStatistics=function cumulativeStatistics(){return this._proxy.cumulativeStatistics};g.prototype.statistics=function statistics(){return this._proxy.statistics};g.prototype.reservations=function reservations(){return this._proxy.reservations};g.prototype.workerChannels=function workerChannels(){return this._proxy.workerChannels};g.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};g.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};y=function WorkerContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/Workers/${i}`;this._realTimeStatistics=undefined;this._cumulativeStatistics=undefined;this._statistics=undefined;this._reservations=undefined;this._workerChannels=undefined};y.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new g(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};y.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=v.of({ActivitySid:o.get(t,"activitySid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName"),RejectPendingReservations:l.bool(o.get(t,"rejectPendingReservations"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new g(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};y.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(y.prototype,"realTimeStatistics",{get:function(){if(!this._realTimeStatistics){this._realTimeStatistics=new f(this._version,this._solution.workspaceSid)}return this._realTimeStatistics}});Object.defineProperty(y.prototype,"cumulativeStatistics",{get:function(){if(!this._cumulativeStatistics){this._cumulativeStatistics=new h(this._version,this._solution.workspaceSid)}return this._cumulativeStatistics}});Object.defineProperty(y.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new u(this._version,this._solution.workspaceSid,this._solution.sid)}return this._statistics}});Object.defineProperty(y.prototype,"reservations",{get:function(){if(!this._reservations){this._reservations=new c(this._version,this._solution.workspaceSid,this._solution.sid)}return this._reservations}});Object.defineProperty(y.prototype,"workerChannels",{get:function(){if(!this._workerChannels){this._workerChannels=new a(this._version,this._solution.workspaceSid,this._solution.sid)}return this._workerChannels}});y.prototype.toJSON=function toJSON(){return this._solution};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkerList:m,WorkerPage:_,WorkerInstance:g,WorkerContext:y}},61747:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ReservationList(t,e,i){function ReservationListInstance(t){return ReservationListInstance.get(t)}ReservationListInstance._version=t;ReservationListInstance._solution={workspaceSid:e,workerSid:i};ReservationListInstance._uri=`/Workspaces/${e}/Workers/${i}/Reservations`;ReservationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ReservationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ReservationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ReservationStatus:o.get(t,"reservationStatus"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ReservationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ReservationListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,this._solution.workerSid,t)};ReservationListInstance.toJSON=function toJSON(){return this._solution};ReservationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ReservationListInstance};f=function ReservationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ReservationInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.reservationStatus=e.reservation_status;this.sid=e.sid;this.taskSid=e.task_sid;this.workerName=e.worker_name;this.workerSid=e.worker_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,workerSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ReservationContext(t,e,i,n){this._version=t;this._solution={workspaceSid:e,workerSid:i,sid:n};this._uri=`/Workspaces/${e}/Workers/${i}/Reservations/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ReservationStatus:o.get(t,"reservationStatus"),WorkerActivitySid:o.get(t,"workerActivitySid"),Instruction:o.get(t,"instruction"),DequeuePostWorkActivitySid:o.get(t,"dequeuePostWorkActivitySid"),DequeueFrom:o.get(t,"dequeueFrom"),DequeueRecord:o.get(t,"dequeueRecord"),DequeueTimeout:o.get(t,"dequeueTimeout"),DequeueTo:o.get(t,"dequeueTo"),DequeueStatusCallbackUrl:o.get(t,"dequeueStatusCallbackUrl"),CallFrom:o.get(t,"callFrom"),CallRecord:o.get(t,"callRecord"),CallTimeout:o.get(t,"callTimeout"),CallTo:o.get(t,"callTo"),CallUrl:o.get(t,"callUrl"),CallStatusCallbackUrl:o.get(t,"callStatusCallbackUrl"),CallAccept:a.bool(o.get(t,"callAccept")),RedirectCallSid:o.get(t,"redirectCallSid"),RedirectAccept:a.bool(o.get(t,"redirectAccept")),RedirectUrl:o.get(t,"redirectUrl"),To:o.get(t,"to"),From:o.get(t,"from"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),StatusCallbackEvent:a.map(o.get(t,"statusCallbackEvent"),function(t){return t}),Timeout:o.get(t,"timeout"),Record:a.bool(o.get(t,"record")),Muted:a.bool(o.get(t,"muted")),Beep:o.get(t,"beep"),StartConferenceOnEnter:a.bool(o.get(t,"startConferenceOnEnter")),EndConferenceOnExit:a.bool(o.get(t,"endConferenceOnExit")),WaitUrl:o.get(t,"waitUrl"),WaitMethod:o.get(t,"waitMethod"),EarlyMedia:a.bool(o.get(t,"earlyMedia")),MaxParticipants:o.get(t,"maxParticipants"),ConferenceStatusCallback:o.get(t,"conferenceStatusCallback"),ConferenceStatusCallbackMethod:o.get(t,"conferenceStatusCallbackMethod"),ConferenceStatusCallbackEvent:a.map(o.get(t,"conferenceStatusCallbackEvent"),function(t){return t}),ConferenceRecord:o.get(t,"conferenceRecord"),ConferenceTrim:o.get(t,"conferenceTrim"),RecordingChannels:o.get(t,"recordingChannels"),RecordingStatusCallback:o.get(t,"recordingStatusCallback"),RecordingStatusCallbackMethod:o.get(t,"recordingStatusCallbackMethod"),ConferenceRecordingStatusCallback:o.get(t,"conferenceRecordingStatusCallback"),ConferenceRecordingStatusCallbackMethod:o.get(t,"conferenceRecordingStatusCallbackMethod"),Region:o.get(t,"region"),SipAuthUsername:o.get(t,"sipAuthUsername"),SipAuthPassword:o.get(t,"sipAuthPassword"),DequeueStatusCallbackEvent:a.map(o.get(t,"dequeueStatusCallbackEvent"),function(t){return t}),PostWorkActivitySid:o.get(t,"postWorkActivitySid"),EndConferenceOnCustomerExit:a.bool(o.get(t,"endConferenceOnCustomerExit")),BeepOnCustomerEntrance:a.bool(o.get(t,"beepOnCustomerEntrance"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ReservationList:h,ReservationPage:f,ReservationInstance:p,ReservationContext:d}},30781:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WorkerChannelList(t,e,i){function WorkerChannelListInstance(t){return WorkerChannelListInstance.get(t)}WorkerChannelListInstance._version=t;WorkerChannelListInstance._solution={workspaceSid:e,workerSid:i};WorkerChannelListInstance._uri=`/Workspaces/${e}/Workers/${i}/Channels`;WorkerChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WorkerChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WorkerChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkerChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkerChannelListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,this._solution.workerSid,t)};WorkerChannelListInstance.toJSON=function toJSON(){return this._solution};WorkerChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkerChannelListInstance};f=function WorkerChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkerChannelInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.assignedTasks=c.integer(e.assigned_tasks);this.available=e.available;this.availableCapacityPercentage=c.integer(e.available_capacity_percentage);this.configuredCapacity=c.integer(e.configured_capacity);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.sid=e.sid;this.taskChannelSid=e.task_channel_sid;this.taskChannelUniqueName=e.task_channel_unique_name;this.workerSid=e.worker_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,workerSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WorkerChannelContext(t,e,i,n){this._version=t;this._solution={workspaceSid:e,workerSid:i,sid:n};this._uri=`/Workspaces/${e}/Workers/${i}/Channels/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Capacity:o.get(t,"capacity"),Available:a.bool(o.get(t,"available"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkerChannelList:h,WorkerChannelPage:f,WorkerChannelInstance:p,WorkerChannelContext:d}},26500:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function WorkerStatisticsList(t,e,i){function WorkerStatisticsListInstance(t){return WorkerStatisticsListInstance.get(t)}WorkerStatisticsListInstance._version=t;WorkerStatisticsListInstance._solution={workspaceSid:e,workerSid:i};WorkerStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid,this._solution.workerSid)};WorkerStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkerStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkerStatisticsListInstance};h=function WorkerStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid,this._solution.workerSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkerStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.cumulative=e.cumulative;this.workerSid=e.worker_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,workerSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid,this._solution.workerSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkerStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,workerSid:i};this._uri=`/Workspaces/${e}/Workers/${i}/Statistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),EndDate:c.iso8601DateTime(o.get(t,"endDate")),TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid,this._solution.workerSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkerStatisticsList:u,WorkerStatisticsPage:h,WorkerStatisticsInstance:f,WorkerStatisticsContext:p}},62308:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WorkersCumulativeStatisticsList(t,e){function WorkersCumulativeStatisticsListInstance(t){return WorkersCumulativeStatisticsListInstance.get(t)}WorkersCumulativeStatisticsListInstance._version=t;WorkersCumulativeStatisticsListInstance._solution={workspaceSid:e};WorkersCumulativeStatisticsListInstance.get=function get(){return new d(this._version,this._solution.workspaceSid)};WorkersCumulativeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkersCumulativeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkersCumulativeStatisticsListInstance};f=function WorkersCumulativeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkersCumulativeStatisticsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.startTime=c.iso8601DateTime(e.start_time);this.endTime=c.iso8601DateTime(e.end_time);this.activityDurations=e.activity_durations;this.reservationsCreated=c.integer(e.reservations_created);this.reservationsAccepted=c.integer(e.reservations_accepted);this.reservationsRejected=c.integer(e.reservations_rejected);this.reservationsTimedOut=c.integer(e.reservations_timed_out);this.reservationsCanceled=c.integer(e.reservations_canceled);this.reservationsRescinded=c.integer(e.reservations_rescinded);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid)}return this._context}});p.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WorkersCumulativeStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/Workers/CumulativeStatistics`};d.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({EndDate:a.iso8601DateTime(o.get(t,"endDate")),Minutes:o.get(t,"minutes"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkersCumulativeStatisticsList:h,WorkersCumulativeStatisticsPage:f,WorkersCumulativeStatisticsInstance:p,WorkersCumulativeStatisticsContext:d}},98231:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function WorkersRealTimeStatisticsList(t,e){function WorkersRealTimeStatisticsListInstance(t){return WorkersRealTimeStatisticsListInstance.get(t)}WorkersRealTimeStatisticsListInstance._version=t;WorkersRealTimeStatisticsListInstance._solution={workspaceSid:e};WorkersRealTimeStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid)};WorkersRealTimeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkersRealTimeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkersRealTimeStatisticsListInstance};h=function WorkersRealTimeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkersRealTimeStatisticsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.activityStatistics=e.activity_statistics;this.totalWorkers=c.integer(e.total_workers);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkersRealTimeStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/Workers/RealTimeStatistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkersRealTimeStatisticsList:u,WorkersRealTimeStatisticsPage:h,WorkersRealTimeStatisticsInstance:f,WorkersRealTimeStatisticsContext:p}},2858:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function WorkersStatisticsList(t,e){function WorkersStatisticsListInstance(t){return WorkersStatisticsListInstance.get(t)}WorkersStatisticsListInstance._version=t;WorkersStatisticsListInstance._solution={workspaceSid:e};WorkersStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid)};WorkersStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkersStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkersStatisticsListInstance};h=function WorkersStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkersStatisticsInstance(t,e,i){this._version=t;this.realtime=e.realtime;this.cumulative=e.cumulative;this.accountSid=e.account_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkersStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/Workers/Statistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),EndDate:c.iso8601DateTime(o.get(t,"endDate")),TaskQueueSid:o.get(t,"taskQueueSid"),TaskQueueName:o.get(t,"taskQueueName"),FriendlyName:o.get(t,"friendlyName"),TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkersStatisticsList:u,WorkersStatisticsPage:h,WorkersStatisticsInstance:f,WorkersStatisticsContext:p}},66765:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(5086).WorkflowCumulativeStatisticsList;var a=i(74660).WorkflowRealTimeStatisticsList;var u=i(435).WorkflowStatisticsList;var h=i(80513);var f=i(72142);var p;var d;var l;var v;p=function WorkflowList(t,e){function WorkflowListInstance(t){return WorkflowListInstance.get(t)}WorkflowListInstance._version=t;WorkflowListInstance._solution={workspaceSid:e};WorkflowListInstance._uri=`/Workspaces/${e}/Workflows`;WorkflowListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WorkflowListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WorkflowListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkflowListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkflowListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.configuration)){throw new Error('Required parameter "opts.configuration" missing.')}var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),Configuration:o.get(t,"configuration"),AssignmentCallbackUrl:o.get(t,"assignmentCallbackUrl"),FallbackAssignmentCallbackUrl:o.get(t,"fallbackAssignmentCallbackUrl"),TaskReservationTimeout:o.get(t,"taskReservationTimeout")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkflowListInstance.get=function get(t){return new v(this._version,this._solution.workspaceSid,t)};WorkflowListInstance.toJSON=function toJSON(){return this._solution};WorkflowListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkflowListInstance};d=function WorkflowPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,r.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.workspaceSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function WorkflowInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assignmentCallbackUrl=e.assignment_callback_url;this.configuration=e.configuration;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.documentContentType=e.document_content_type;this.fallbackAssignmentCallbackUrl=e.fallback_assignment_callback_url;this.friendlyName=e.friendly_name;this.sid=e.sid;this.taskReservationTimeout=h.integer(e.task_reservation_timeout);this.workspaceSid=e.workspace_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.statistics=function statistics(){return this._proxy.statistics};l.prototype.realTimeStatistics=function realTimeStatistics(){return this._proxy.realTimeStatistics};l.prototype.cumulativeStatistics=function cumulativeStatistics(){return this._proxy.cumulativeStatistics};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function WorkflowContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/Workflows/${i}`;this._statistics=undefined;this._realTimeStatistics=undefined;this._cumulativeStatistics=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),AssignmentCallbackUrl:o.get(t,"assignmentCallbackUrl"),FallbackAssignmentCallbackUrl:o.get(t,"fallbackAssignmentCallbackUrl"),Configuration:o.get(t,"configuration"),TaskReservationTimeout:o.get(t,"taskReservationTimeout"),ReEvaluateTasks:o.get(t,"reEvaluateTasks")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(v.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new u(this._version,this._solution.workspaceSid,this._solution.sid)}return this._statistics}});Object.defineProperty(v.prototype,"realTimeStatistics",{get:function(){if(!this._realTimeStatistics){this._realTimeStatistics=new a(this._version,this._solution.workspaceSid,this._solution.sid)}return this._realTimeStatistics}});Object.defineProperty(v.prototype,"cumulativeStatistics",{get:function(){if(!this._cumulativeStatistics){this._cumulativeStatistics=new c(this._version,this._solution.workspaceSid,this._solution.sid)}return this._cumulativeStatistics}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkflowList:p,WorkflowPage:d,WorkflowInstance:l,WorkflowContext:v}},5086:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WorkflowCumulativeStatisticsList(t,e,i){function WorkflowCumulativeStatisticsListInstance(t){return WorkflowCumulativeStatisticsListInstance.get(t)}WorkflowCumulativeStatisticsListInstance._version=t;WorkflowCumulativeStatisticsListInstance._solution={workspaceSid:e,workflowSid:i};WorkflowCumulativeStatisticsListInstance.get=function get(){return new d(this._version,this._solution.workspaceSid,this._solution.workflowSid)};WorkflowCumulativeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkflowCumulativeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkflowCumulativeStatisticsListInstance};f=function WorkflowCumulativeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid,this._solution.workflowSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkflowCumulativeStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.avgTaskAcceptanceTime=c.integer(e.avg_task_acceptance_time);this.startTime=c.iso8601DateTime(e.start_time);this.endTime=c.iso8601DateTime(e.end_time);this.reservationsCreated=c.integer(e.reservations_created);this.reservationsAccepted=c.integer(e.reservations_accepted);this.reservationsRejected=c.integer(e.reservations_rejected);this.reservationsTimedOut=c.integer(e.reservations_timed_out);this.reservationsCanceled=c.integer(e.reservations_canceled);this.reservationsRescinded=c.integer(e.reservations_rescinded);this.splitByWaitTime=e.split_by_wait_time;this.waitDurationUntilAccepted=e.wait_duration_until_accepted;this.waitDurationUntilCanceled=e.wait_duration_until_canceled;this.tasksCanceled=c.integer(e.tasks_canceled);this.tasksCompleted=c.integer(e.tasks_completed);this.tasksEntered=c.integer(e.tasks_entered);this.tasksDeleted=c.integer(e.tasks_deleted);this.tasksMoved=c.integer(e.tasks_moved);this.tasksTimedOutInWorkflow=c.integer(e.tasks_timed_out_in_workflow);this.workflowSid=e.workflow_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,workflowSid:n}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.workflowSid)}return this._context}});p.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WorkflowCumulativeStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,workflowSid:i};this._uri=`/Workspaces/${e}/Workflows/${i}/CumulativeStatistics`};d.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({EndDate:a.iso8601DateTime(o.get(t,"endDate")),Minutes:o.get(t,"minutes"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.workflowSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkflowCumulativeStatisticsList:h,WorkflowCumulativeStatisticsPage:f,WorkflowCumulativeStatisticsInstance:p,WorkflowCumulativeStatisticsContext:d}},74660:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function WorkflowRealTimeStatisticsList(t,e,i){function WorkflowRealTimeStatisticsListInstance(t){return WorkflowRealTimeStatisticsListInstance.get(t)}WorkflowRealTimeStatisticsListInstance._version=t;WorkflowRealTimeStatisticsListInstance._solution={workspaceSid:e,workflowSid:i};WorkflowRealTimeStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid,this._solution.workflowSid)};WorkflowRealTimeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkflowRealTimeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkflowRealTimeStatisticsListInstance};h=function WorkflowRealTimeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid,this._solution.workflowSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkflowRealTimeStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.longestTaskWaitingAge=c.integer(e.longest_task_waiting_age);this.longestTaskWaitingSid=e.longest_task_waiting_sid;this.tasksByPriority=e.tasks_by_priority;this.tasksByStatus=e.tasks_by_status;this.totalTasks=c.integer(e.total_tasks);this.workflowSid=e.workflow_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,workflowSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid,this._solution.workflowSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkflowRealTimeStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,workflowSid:i};this._uri=`/Workspaces/${e}/Workflows/${i}/RealTimeStatistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid,this._solution.workflowSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkflowRealTimeStatisticsList:u,WorkflowRealTimeStatisticsPage:h,WorkflowRealTimeStatisticsInstance:f,WorkflowRealTimeStatisticsContext:p}},435:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function WorkflowStatisticsList(t,e,i){function WorkflowStatisticsListInstance(t){return WorkflowStatisticsListInstance.get(t)}WorkflowStatisticsListInstance._version=t;WorkflowStatisticsListInstance._solution={workspaceSid:e,workflowSid:i};WorkflowStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid,this._solution.workflowSid)};WorkflowStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkflowStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkflowStatisticsListInstance};h=function WorkflowStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid,this._solution.workflowSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkflowStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.cumulative=e.cumulative;this.realtime=e.realtime;this.workflowSid=e.workflow_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,workflowSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid,this._solution.workflowSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkflowStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,workflowSid:i};this._uri=`/Workspaces/${e}/Workflows/${i}/Statistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),EndDate:c.iso8601DateTime(o.get(t,"endDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid,this._solution.workflowSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkflowStatisticsList:u,WorkflowStatisticsPage:h,WorkflowStatisticsInstance:f,WorkflowStatisticsContext:p}},47678:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WorkspaceCumulativeStatisticsList(t,e){function WorkspaceCumulativeStatisticsListInstance(t){return WorkspaceCumulativeStatisticsListInstance.get(t)}WorkspaceCumulativeStatisticsListInstance._version=t;WorkspaceCumulativeStatisticsListInstance._solution={workspaceSid:e};WorkspaceCumulativeStatisticsListInstance.get=function get(){return new d(this._version,this._solution.workspaceSid)};WorkspaceCumulativeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkspaceCumulativeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkspaceCumulativeStatisticsListInstance};f=function WorkspaceCumulativeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkspaceCumulativeStatisticsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.avgTaskAcceptanceTime=c.integer(e.avg_task_acceptance_time);this.startTime=c.iso8601DateTime(e.start_time);this.endTime=c.iso8601DateTime(e.end_time);this.reservationsCreated=c.integer(e.reservations_created);this.reservationsAccepted=c.integer(e.reservations_accepted);this.reservationsRejected=c.integer(e.reservations_rejected);this.reservationsTimedOut=c.integer(e.reservations_timed_out);this.reservationsCanceled=c.integer(e.reservations_canceled);this.reservationsRescinded=c.integer(e.reservations_rescinded);this.splitByWaitTime=e.split_by_wait_time;this.waitDurationUntilAccepted=e.wait_duration_until_accepted;this.waitDurationUntilCanceled=e.wait_duration_until_canceled;this.tasksCanceled=c.integer(e.tasks_canceled);this.tasksCompleted=c.integer(e.tasks_completed);this.tasksCreated=c.integer(e.tasks_created);this.tasksDeleted=c.integer(e.tasks_deleted);this.tasksMoved=c.integer(e.tasks_moved);this.tasksTimedOutInWorkflow=c.integer(e.tasks_timed_out_in_workflow);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid)}return this._context}});p.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WorkspaceCumulativeStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/CumulativeStatistics`};d.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({EndDate:a.iso8601DateTime(o.get(t,"endDate")),Minutes:o.get(t,"minutes"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkspaceCumulativeStatisticsList:h,WorkspaceCumulativeStatisticsPage:f,WorkspaceCumulativeStatisticsInstance:p,WorkspaceCumulativeStatisticsContext:d}},5751:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function WorkspaceRealTimeStatisticsList(t,e){function WorkspaceRealTimeStatisticsListInstance(t){return WorkspaceRealTimeStatisticsListInstance.get(t)}WorkspaceRealTimeStatisticsListInstance._version=t;WorkspaceRealTimeStatisticsListInstance._solution={workspaceSid:e};WorkspaceRealTimeStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid)};WorkspaceRealTimeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkspaceRealTimeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkspaceRealTimeStatisticsListInstance};h=function WorkspaceRealTimeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkspaceRealTimeStatisticsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.activityStatistics=e.activity_statistics;this.longestTaskWaitingAge=c.integer(e.longest_task_waiting_age);this.longestTaskWaitingSid=e.longest_task_waiting_sid;this.tasksByPriority=e.tasks_by_priority;this.tasksByStatus=e.tasks_by_status;this.totalTasks=c.integer(e.total_tasks);this.totalWorkers=c.integer(e.total_workers);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkspaceRealTimeStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/RealTimeStatistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkspaceRealTimeStatisticsList:u,WorkspaceRealTimeStatisticsPage:h,WorkspaceRealTimeStatisticsInstance:f,WorkspaceRealTimeStatisticsContext:p}},52593:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function WorkspaceStatisticsList(t,e){function WorkspaceStatisticsListInstance(t){return WorkspaceStatisticsListInstance.get(t)}WorkspaceStatisticsListInstance._version=t;WorkspaceStatisticsListInstance._solution={workspaceSid:e};WorkspaceStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid)};WorkspaceStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkspaceStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkspaceStatisticsListInstance};h=function WorkspaceStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkspaceStatisticsInstance(t,e,i){this._version=t;this.realtime=e.realtime;this.cumulative=e.cumulative;this.accountSid=e.account_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkspaceStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/Statistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),EndDate:c.iso8601DateTime(o.get(t,"endDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkspaceStatisticsList:u,WorkspaceStatisticsPage:h,WorkspaceStatisticsInstance:f,WorkspaceStatisticsContext:p}},99996:(t,e,i)=>{"use strict";var n=i(90250);var o=i(59242).TrunkList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._trunks=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"trunks",{get:function(){this._trunks=this._trunks||new o(this);return this._trunks}});t.exports=V1},59242:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(85327).CredentialListList;var c=i(33779).IpAccessControlListList;var a=i(11093).OriginationUrlList;var u=i(60938);var h=i(17471).PhoneNumberList;var f=i(17126).RecordingList;var p=i(80513);var d=i(6372);var l=i(72142);var v;var m;var _;var g;v=function TrunkList(t){function TrunkListInstance(t){return TrunkListInstance.get(t)}TrunkListInstance._version=t;TrunkListInstance._solution={};TrunkListInstance._uri=`/Trunks`;TrunkListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=l.of({FriendlyName:o.get(t,"friendlyName"),DomainName:o.get(t,"domainName"),DisasterRecoveryUrl:o.get(t,"disasterRecoveryUrl"),DisasterRecoveryMethod:o.get(t,"disasterRecoveryMethod"),TransferMode:o.get(t,"transferMode"),Secure:d.bool(o.get(t,"secure")),CnamLookupEnabled:d.bool(o.get(t,"cnamLookupEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new _(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TrunkListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TrunkListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TrunkListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=l.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TrunkListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new m(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TrunkListInstance.get=function get(t){return new g(this._version,t)};TrunkListInstance.toJSON=function toJSON(){return this._solution};TrunkListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TrunkListInstance};m=function TrunkPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(m.prototype,u.prototype);m.prototype.constructor=m;m.prototype.getInstance=function getInstance(t){return new _(this._version,t)};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function TrunkInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.domainName=e.domain_name;this.disasterRecoveryMethod=e.disaster_recovery_method;this.disasterRecoveryUrl=e.disaster_recovery_url;this.friendlyName=e.friendly_name;this.secure=e.secure;this.recording=e.recording;this.transferMode=e.transfer_mode;this.cnamLookupEnabled=e.cnam_lookup_enabled;this.authType=e.auth_type;this.authTypeSet=e.auth_type_set;this.dateCreated=p.iso8601DateTime(e.date_created);this.dateUpdated=p.iso8601DateTime(e.date_updated);this.sid=e.sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(_.prototype,"_proxy",{get:function(){if(!this._context){this._context=new g(this._version,this._solution.sid)}return this._context}});_.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};_.prototype.remove=function remove(t){return this._proxy.remove(t)};_.prototype.update=function update(t,e){return this._proxy.update(t,e)};_.prototype.originationUrls=function originationUrls(){return this._proxy.originationUrls};_.prototype.credentialsLists=function credentialsLists(){return this._proxy.credentialsLists};_.prototype.ipAccessControlLists=function ipAccessControlLists(){return this._proxy.ipAccessControlLists};_.prototype.phoneNumbers=function phoneNumbers(){return this._proxy.phoneNumbers};_.prototype.recordings=function recordings(){return this._proxy.recordings};_.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};g=function TrunkContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Trunks/${e}`;this._originationUrls=undefined;this._credentialsLists=undefined;this._ipAccessControlLists=undefined;this._phoneNumbers=undefined;this._recordings=undefined};g.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new _(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};g.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};g.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=l.of({FriendlyName:o.get(t,"friendlyName"),DomainName:o.get(t,"domainName"),DisasterRecoveryUrl:o.get(t,"disasterRecoveryUrl"),DisasterRecoveryMethod:o.get(t,"disasterRecoveryMethod"),TransferMode:o.get(t,"transferMode"),Secure:d.bool(o.get(t,"secure")),CnamLookupEnabled:d.bool(o.get(t,"cnamLookupEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new _(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(g.prototype,"originationUrls",{get:function(){if(!this._originationUrls){this._originationUrls=new a(this._version,this._solution.sid)}return this._originationUrls}});Object.defineProperty(g.prototype,"credentialsLists",{get:function(){if(!this._credentialsLists){this._credentialsLists=new r(this._version,this._solution.sid)}return this._credentialsLists}});Object.defineProperty(g.prototype,"ipAccessControlLists",{get:function(){if(!this._ipAccessControlLists){this._ipAccessControlLists=new c(this._version,this._solution.sid)}return this._ipAccessControlLists}});Object.defineProperty(g.prototype,"phoneNumbers",{get:function(){if(!this._phoneNumbers){this._phoneNumbers=new h(this._version,this._solution.sid)}return this._phoneNumbers}});Object.defineProperty(g.prototype,"recordings",{get:function(){if(!this._recordings){this._recordings=new f(this._version,this._solution.sid)}return this._recordings}});g.prototype.toJSON=function toJSON(){return this._solution};g.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TrunkList:v,TrunkPage:m,TrunkInstance:_,TrunkContext:g}},85327:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CredentialListList(t,e){function CredentialListListInstance(t){return CredentialListListInstance.get(t)}CredentialListListInstance._version=t;CredentialListListInstance._solution={trunkSid:e};CredentialListListInstance._uri=`/Trunks/${e}/CredentialLists`;CredentialListListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.credentialListSid)){throw new Error('Required parameter "opts.credentialListSid" missing.')}var i=n.defer();var s=a.of({CredentialListSid:o.get(t,"credentialListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.get=function get(t){return new p(this._version,this._solution.trunkSid,t)};CredentialListListInstance.toJSON=function toJSON(){return this._solution};CredentialListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListListInstance};h=function CredentialListPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.trunkSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CredentialListInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.trunkSid=e.trunk_sid;this.friendlyName=e.friendly_name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={trunkSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.trunkSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialListContext(t,e,i){this._version=t;this._solution={trunkSid:e,sid:i};this._uri=`/Trunks/${e}/CredentialLists/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialListList:u,CredentialListPage:h,CredentialListInstance:f,CredentialListContext:p}},33779:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function IpAccessControlListList(t,e){function IpAccessControlListListInstance(t){return IpAccessControlListListInstance.get(t)}IpAccessControlListListInstance._version=t;IpAccessControlListListInstance._solution={trunkSid:e};IpAccessControlListListInstance._uri=`/Trunks/${e}/IpAccessControlLists`;IpAccessControlListListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.ipAccessControlListSid)){throw new Error('Required parameter "opts.ipAccessControlListSid" missing.')}var i=n.defer();var s=a.of({IpAccessControlListSid:o.get(t,"ipAccessControlListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IpAccessControlListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IpAccessControlListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.get=function get(t){return new p(this._version,this._solution.trunkSid,t)};IpAccessControlListListInstance.toJSON=function toJSON(){return this._solution};IpAccessControlListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IpAccessControlListListInstance};h=function IpAccessControlListPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.trunkSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function IpAccessControlListInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.trunkSid=e.trunk_sid;this.friendlyName=e.friendly_name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={trunkSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.trunkSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function IpAccessControlListContext(t,e,i){this._version=t;this._solution={trunkSid:e,sid:i};this._uri=`/Trunks/${e}/IpAccessControlLists/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IpAccessControlListList:u,IpAccessControlListPage:h,IpAccessControlListInstance:f,IpAccessControlListContext:p}},11093:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function OriginationUrlList(t,e){function OriginationUrlListInstance(t){return OriginationUrlListInstance.get(t)}OriginationUrlListInstance._version=t;OriginationUrlListInstance._solution={trunkSid:e};OriginationUrlListInstance._uri=`/Trunks/${e}/OriginationUrls`;OriginationUrlListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.weight)){throw new Error('Required parameter "opts.weight" missing.')}if(o.isUndefined(t.priority)){throw new Error('Required parameter "opts.priority" missing.')}if(o.isUndefined(t.enabled)){throw new Error('Required parameter "opts.enabled" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.sipUrl)){throw new Error('Required parameter "opts.sipUrl" missing.')}var i=n.defer();var s=u.of({Weight:o.get(t,"weight"),Priority:o.get(t,"priority"),Enabled:a.bool(o.get(t,"enabled")),FriendlyName:o.get(t,"friendlyName"),SipUrl:o.get(t,"sipUrl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};OriginationUrlListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};OriginationUrlListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};OriginationUrlListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};OriginationUrlListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};OriginationUrlListInstance.get=function get(t){return new d(this._version,this._solution.trunkSid,t)};OriginationUrlListInstance.toJSON=function toJSON(){return this._solution};OriginationUrlListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return OriginationUrlListInstance};f=function OriginationUrlPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.trunkSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function OriginationUrlInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.trunkSid=e.trunk_sid;this.weight=c.integer(e.weight);this.enabled=e.enabled;this.sipUrl=e.sip_url;this.friendlyName=e.friendly_name;this.priority=c.integer(e.priority);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={trunkSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.trunkSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function OriginationUrlContext(t,e,i){this._version=t;this._solution={trunkSid:e,sid:i};this._uri=`/Trunks/${e}/OriginationUrls/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Weight:o.get(t,"weight"),Priority:o.get(t,"priority"),Enabled:a.bool(o.get(t,"enabled")),FriendlyName:o.get(t,"friendlyName"),SipUrl:o.get(t,"sipUrl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={OriginationUrlList:h,OriginationUrlPage:f,OriginationUrlInstance:p,OriginationUrlContext:d}},17471:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function PhoneNumberList(t,e){function PhoneNumberListInstance(t){return PhoneNumberListInstance.get(t)}PhoneNumberListInstance._version=t;PhoneNumberListInstance._solution={trunkSid:e};PhoneNumberListInstance._uri=`/Trunks/${e}/PhoneNumbers`;PhoneNumberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumberSid)){throw new Error('Required parameter "opts.phoneNumberSid" missing.')}var i=n.defer();var s=a.of({PhoneNumberSid:o.get(t,"phoneNumberSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PhoneNumberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PhoneNumberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.get=function get(t){return new p(this._version,this._solution.trunkSid,t)};PhoneNumberListInstance.toJSON=function toJSON(){return this._solution};PhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PhoneNumberListInstance};h=function PhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.trunkSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PhoneNumberInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.addressRequirements=e.address_requirements;this.apiVersion=e.api_version;this.beta=e.beta;this.capabilities=e.capabilities;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.links=e.links;this.phoneNumber=e.phone_number;this.sid=e.sid;this.smsApplicationSid=e.sms_application_sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.trunkSid=e.trunk_sid;this.url=e.url;this.voiceApplicationSid=e.voice_application_sid;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this._context=undefined;this._solution={trunkSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.trunkSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PhoneNumberContext(t,e,i){this._version=t;this._solution={trunkSid:e,sid:i};this._uri=`/Trunks/${e}/PhoneNumbers/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PhoneNumberList:u,PhoneNumberPage:h,PhoneNumberInstance:f,PhoneNumberContext:p}},17126:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function RecordingList(t,e){function RecordingListInstance(t){return RecordingListInstance.get(t)}RecordingListInstance._version=t;RecordingListInstance._solution={trunkSid:e};RecordingListInstance.get=function get(){return new f(this._version,this._solution.trunkSid)};RecordingListInstance.toJSON=function toJSON(){return this._solution};RecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingListInstance};u=function RecordingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.trunkSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function RecordingInstance(t,e,i){this._version=t;this.mode=e.mode;this.trim=e.trim;this._context=undefined;this._solution={trunkSid:i}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.trunkSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.update=function update(t,e){return this._proxy.update(t,e)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function RecordingContext(t,e){this._version=t;this._solution={trunkSid:e};this._uri=`/Trunks/${e}/Recording`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.trunkSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({Mode:o.get(t,"mode"),Trim:o.get(t,"trim")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution.trunkSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingList:a,RecordingPage:u,RecordingInstance:h,RecordingContext:f}},79352:(t,e,i)=>{"use strict";var n=i(90250);var o=i(25610).FormList;var s=i(5398).ServiceList;var r=i(64351);function V2(t){r.prototype.constructor.call(this,t,"v2");this._forms=undefined;this._services=undefined}n.extend(V2.prototype,r.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"forms",{get:function(){this._forms=this._forms||new o(this);return this._forms}});Object.defineProperty(V2.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V2},25610:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function FormList(t){function FormListInstance(t){return FormListInstance.get(t)}FormListInstance._version=t;FormListInstance._solution={};FormListInstance.get=function get(t){return new f(this._version,t)};FormListInstance.toJSON=function toJSON(){return this._solution};FormListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FormListInstance};u=function FormPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function FormInstance(t,e,i){this._version=t;this.formType=e.form_type;this.forms=e.forms;this.formMeta=e.form_meta;this.url=e.url;this._context=undefined;this._solution={formType:i||this.formType}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.formType)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FormContext(t,e){this._version=t;this._solution={formType:e};this._uri=`/Forms/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.formType))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FormList:a,FormPage:u,FormInstance:h,FormContext:f}},5398:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(95873).AccessTokenList;var c=i(77654).EntityList;var a=i(44711).MessagingConfigurationList;var u=i(60938);var h=i(83857).RateLimitList;var f=i(67609).VerificationCheckList;var p=i(40843).VerificationList;var d=i(27240).WebhookList;var l=i(80513);var v=i(6372);var m=i(72142);var _;var g;var y;var S;_=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=m.of({FriendlyName:o.get(t,"friendlyName"),CodeLength:o.get(t,"codeLength"),LookupEnabled:v.bool(o.get(t,"lookupEnabled")),SkipSmsToLandlines:v.bool(o.get(t,"skipSmsToLandlines")),DtmfInputRequired:v.bool(o.get(t,"dtmfInputRequired")),TtsName:o.get(t,"ttsName"),Psd2Enabled:v.bool(o.get(t,"psd2Enabled")),DoNotShareWarningEnabled:v.bool(o.get(t,"doNotShareWarningEnabled")),CustomCodeEnabled:v.bool(o.get(t,"customCodeEnabled")),"Push.IncludeDate":v.bool(o.get(t,"push.includeDate")),"Push.ApnCredentialSid":o.get(t,"push.apnCredentialSid"),"Push.FcmCredentialSid":o.get(t,"push.fcmCredentialSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new y(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=m.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new g(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new g(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new S(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};g=function ServicePage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(g.prototype,u.prototype);g.prototype.constructor=g;g.prototype.getInstance=function getInstance(t){return new y(this._version,t)};g.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};g.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};y=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.codeLength=l.integer(e.code_length);this.lookupEnabled=e.lookup_enabled;this.psd2Enabled=e.psd2_enabled;this.skipSmsToLandlines=e.skip_sms_to_landlines;this.dtmfInputRequired=e.dtmf_input_required;this.ttsName=e.tts_name;this.doNotShareWarningEnabled=e.do_not_share_warning_enabled;this.customCodeEnabled=e.custom_code_enabled;this.push=e.push;this.dateCreated=l.iso8601DateTime(e.date_created);this.dateUpdated=l.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(y.prototype,"_proxy",{get:function(){if(!this._context){this._context=new S(this._version,this._solution.sid)}return this._context}});y.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};y.prototype.remove=function remove(t){return this._proxy.remove(t)};y.prototype.update=function update(t,e){return this._proxy.update(t,e)};y.prototype.verifications=function verifications(){return this._proxy.verifications};y.prototype.verificationChecks=function verificationChecks(){return this._proxy.verificationChecks};y.prototype.rateLimits=function rateLimits(){return this._proxy.rateLimits};y.prototype.messagingConfigurations=function messagingConfigurations(){return this._proxy.messagingConfigurations};y.prototype.entities=function entities(){return this._proxy.entities};y.prototype.webhooks=function webhooks(){return this._proxy.webhooks};y.prototype.accessTokens=function accessTokens(){return this._proxy.accessTokens};y.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};S=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._verifications=undefined;this._verificationChecks=undefined;this._rateLimits=undefined;this._messagingConfigurations=undefined;this._entities=undefined;this._webhooks=undefined;this._accessTokens=undefined};S.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new y(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};S.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};S.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=m.of({FriendlyName:o.get(t,"friendlyName"),CodeLength:o.get(t,"codeLength"),LookupEnabled:v.bool(o.get(t,"lookupEnabled")),SkipSmsToLandlines:v.bool(o.get(t,"skipSmsToLandlines")),DtmfInputRequired:v.bool(o.get(t,"dtmfInputRequired")),TtsName:o.get(t,"ttsName"),Psd2Enabled:v.bool(o.get(t,"psd2Enabled")),DoNotShareWarningEnabled:v.bool(o.get(t,"doNotShareWarningEnabled")),CustomCodeEnabled:v.bool(o.get(t,"customCodeEnabled")),"Push.IncludeDate":v.bool(o.get(t,"push.includeDate")),"Push.ApnCredentialSid":o.get(t,"push.apnCredentialSid"),"Push.FcmCredentialSid":o.get(t,"push.fcmCredentialSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new y(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(S.prototype,"verifications",{get:function(){if(!this._verifications){this._verifications=new p(this._version,this._solution.sid)}return this._verifications}});Object.defineProperty(S.prototype,"verificationChecks",{get:function(){if(!this._verificationChecks){this._verificationChecks=new f(this._version,this._solution.sid)}return this._verificationChecks}});Object.defineProperty(S.prototype,"rateLimits",{get:function(){if(!this._rateLimits){this._rateLimits=new h(this._version,this._solution.sid)}return this._rateLimits}});Object.defineProperty(S.prototype,"messagingConfigurations",{get:function(){if(!this._messagingConfigurations){this._messagingConfigurations=new a(this._version,this._solution.sid)}return this._messagingConfigurations}});Object.defineProperty(S.prototype,"entities",{get:function(){if(!this._entities){this._entities=new c(this._version,this._solution.sid)}return this._entities}});Object.defineProperty(S.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new d(this._version,this._solution.sid)}return this._webhooks}});Object.defineProperty(S.prototype,"accessTokens",{get:function(){if(!this._accessTokens){this._accessTokens=new r(this._version,this._solution.sid)}return this._accessTokens}});S.prototype.toJSON=function toJSON(){return this._solution};S.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:_,ServicePage:g,ServiceInstance:y,ServiceContext:S}},95873:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function AccessTokenList(t,e){function AccessTokenListInstance(t){return AccessTokenListInstance.get(t)}AccessTokenListInstance._version=t;AccessTokenListInstance._solution={serviceSid:e};AccessTokenListInstance._uri=`/Services/${e}/AccessTokens`;AccessTokenListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}if(o.isUndefined(t.factorType)){throw new Error('Required parameter "opts.factorType" missing.')}var i=n.defer();var s=c.of({Identity:o.get(t,"identity"),FactorType:o.get(t,"factorType")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AccessTokenListInstance.toJSON=function toJSON(){return this._solution};AccessTokenListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AccessTokenListInstance};u=function AccessTokenPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.serviceSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function AccessTokenInstance(t,e,i){this._version=t;this.token=e.token;this._context=undefined;this._solution={serviceSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AccessTokenList:a,AccessTokenPage:u,AccessTokenInstance:h}},77654:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(11696).ChallengeList;var c=i(11144).FactorList;var a=i(60938);var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function EntityList(t,e){function EntityListInstance(t){return EntityListInstance.get(t)}EntityListInstance._version=t;EntityListInstance._solution={serviceSid:e};EntityListInstance._uri=`/Services/${e}/Entities`;EntityListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=h.of({Identity:o.get(t,"identity")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EntityListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EntityListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EntityListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EntityListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EntityListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};EntityListInstance.toJSON=function toJSON(){return this._solution};EntityListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EntityListInstance};p=function EntityPage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,a.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function EntityInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.identity=e.identity;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,identity:n||this.identity}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.identity)}return this._context}});d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.factors=function factors(){return this._proxy.factors};d.prototype.challenges=function challenges(){return this._proxy.challenges};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function EntityContext(t,e,i){this._version=t;this._solution={serviceSid:e,identity:i};this._uri=`/Services/${e}/Entities/${i}`;this._factors=undefined;this._challenges=undefined};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"factors",{get:function(){if(!this._factors){this._factors=new c(this._version,this._solution.serviceSid,this._solution.identity)}return this._factors}});Object.defineProperty(l.prototype,"challenges",{get:function(){if(!this._challenges){this._challenges=new r(this._version,this._solution.serviceSid,this._solution.identity)}return this._challenges}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EntityList:f,EntityPage:p,EntityInstance:d,EntityContext:l}},11696:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ChallengeList(t,e,i){function ChallengeListInstance(t){return ChallengeListInstance.get(t)}ChallengeListInstance._version=t;ChallengeListInstance._solution={serviceSid:e,identity:i};ChallengeListInstance._uri=`/Services/${e}/Entities/${i}/Challenges`;ChallengeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.factorSid)){throw new Error('Required parameter "opts.factorSid" missing.')}var i=n.defer();var s=u.of({FactorSid:o.get(t,"factorSid"),ExpirationDate:a.iso8601DateTime(o.get(t,"expirationDate")),"Details.Message":o.get(t,"details.message"),"Details.Fields":a.map(o.get(t,"details.fields"),function(t){return a.object(t)}),HiddenDetails:a.object(o.get(t,"hiddenDetails"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChallengeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChallengeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChallengeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FactorSid:o.get(t,"factorSid"),Status:o.get(t,"status"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChallengeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChallengeListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.identity,t)};ChallengeListInstance.toJSON=function toJSON(){return this._solution};ChallengeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChallengeListInstance};f=function ChallengePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.identity)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ChallengeInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.entitySid=e.entity_sid;this.identity=e.identity;this.factorSid=e.factor_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.dateResponded=c.iso8601DateTime(e.date_responded);this.expirationDate=c.iso8601DateTime(e.expiration_date);this.status=e.status;this.respondedReason=e.responded_reason;this.details=e.details;this.hiddenDetails=e.hidden_details;this.factorType=e.factor_type;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,identity:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.identity,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ChallengeContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,identity:i,sid:n};this._uri=`/Services/${e}/Entities/${i}/Challenges/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AuthPayload:o.get(t,"authPayload")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChallengeList:h,ChallengePage:f,ChallengeInstance:p,ChallengeContext:d}},11144:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FactorList(t,e,i){function FactorListInstance(t){return FactorListInstance.get(t)}FactorListInstance._version=t;FactorListInstance._solution={serviceSid:e,identity:i};FactorListInstance._uri=`/Services/${e}/Entities/${i}/Factors`;FactorListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.factorType)){throw new Error('Required parameter "opts.factorType" missing.')}var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),FactorType:o.get(t,"factorType"),"Binding.Alg":o.get(t,"binding.alg"),"Binding.PublicKey":o.get(t,"binding.publicKey"),"Config.AppId":o.get(t,"config.appId"),"Config.NotificationPlatform":o.get(t,"config.notificationPlatform"),"Config.NotificationToken":o.get(t,"config.notificationToken"),"Config.SdkVersion":o.get(t,"config.sdkVersion")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FactorListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FactorListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FactorListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FactorListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FactorListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.identity,t)};FactorListInstance.toJSON=function toJSON(){return this._solution};FactorListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FactorListInstance};h=function FactorPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.identity)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FactorInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.entitySid=e.entity_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.status=e.status;this.factorType=e.factor_type;this.config=e.config;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,identity:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.identity,this._solution.sid)}return this._context}});f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FactorContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,identity:i,sid:n};this._uri=`/Services/${e}/Entities/${i}/Factors/${n}`};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({AuthPayload:o.get(t,"authPayload"),FriendlyName:o.get(t,"friendlyName"),"Config.NotificationToken":o.get(t,"config.notificationToken"),"Config.SdkVersion":o.get(t,"config.sdkVersion")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FactorList:u,FactorPage:h,FactorInstance:f,FactorContext:p}},44711:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function MessagingConfigurationList(t,e){function MessagingConfigurationListInstance(t){return MessagingConfigurationListInstance.get(t)}MessagingConfigurationListInstance._version=t;MessagingConfigurationListInstance._solution={serviceSid:e};MessagingConfigurationListInstance._uri=`/Services/${e}/MessagingConfigurations`;MessagingConfigurationListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.country)){throw new Error('Required parameter "opts.country" missing.')}if(o.isUndefined(t.messagingServiceSid)){throw new Error('Required parameter "opts.messagingServiceSid" missing.')}var i=n.defer();var s=a.of({Country:o.get(t,"country"),MessagingServiceSid:o.get(t,"messagingServiceSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.country))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessagingConfigurationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessagingConfigurationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessagingConfigurationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessagingConfigurationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessagingConfigurationListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,t)};MessagingConfigurationListInstance.toJSON=function toJSON(){return this._solution};MessagingConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessagingConfigurationListInstance};h=function MessagingConfigurationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function MessagingConfigurationInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.country=e.country;this.messagingServiceSid=e.messaging_service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,country:n||this.country}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.country)}return this._context}});f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessagingConfigurationContext(t,e,i){this._version=t;this._solution={serviceSid:e,country:i};this._uri=`/Services/${e}/MessagingConfigurations/${i}`};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.messagingServiceSid)){throw new Error('Required parameter "opts.messagingServiceSid" missing.')}var i=n.defer();var s=a.of({MessagingServiceSid:o.get(t,"messagingServiceSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.country))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.country))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessagingConfigurationList:u,MessagingConfigurationPage:h,MessagingConfigurationInstance:f,MessagingConfigurationContext:p}},83857:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(15820).BucketList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function RateLimitList(t,e){function RateLimitListInstance(t){return RateLimitListInstance.get(t)}RateLimitListInstance._version=t;RateLimitListInstance._solution={serviceSid:e};RateLimitListInstance._uri=`/Services/${e}/RateLimits`;RateLimitListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),Description:o.get(t,"description")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RateLimitListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RateLimitListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RateLimitListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RateLimitListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RateLimitListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};RateLimitListInstance.toJSON=function toJSON(){return this._solution};RateLimitListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RateLimitListInstance};f=function RateLimitPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RateLimitInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.uniqueName=e.unique_name;this.description=e.description;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.buckets=function buckets(){return this._proxy.buckets};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RateLimitContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/RateLimits/${i}`;this._buckets=undefined};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Description:o.get(t,"description")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"buckets",{get:function(){if(!this._buckets){this._buckets=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._buckets}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RateLimitList:h,RateLimitPage:f,RateLimitInstance:p,RateLimitContext:d}},15820:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function BucketList(t,e,i){function BucketListInstance(t){return BucketListInstance.get(t)}BucketListInstance._version=t;BucketListInstance._solution={serviceSid:e,rateLimitSid:i};BucketListInstance._uri=`/Services/${e}/RateLimits/${i}/Buckets`;BucketListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.max)){throw new Error('Required parameter "opts.max" missing.')}if(o.isUndefined(t.interval)){throw new Error('Required parameter "opts.interval" missing.')}var i=n.defer();var s=a.of({Max:o.get(t,"max"),Interval:o.get(t,"interval")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.rateLimitSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BucketListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BucketListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BucketListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BucketListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BucketListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.rateLimitSid,t)};BucketListInstance.toJSON=function toJSON(){return this._solution};BucketListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BucketListInstance};h=function BucketPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.rateLimitSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function BucketInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.rateLimitSid=e.rate_limit_sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.max=c.integer(e.max);this.interval=c.integer(e.interval);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,rateLimitSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.rateLimitSid,this._solution.sid)}return this._context}});f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BucketContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,rateLimitSid:i,sid:n};this._uri=`/Services/${e}/RateLimits/${i}/Buckets/${n}`};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Max:o.get(t,"max"),Interval:o.get(t,"interval")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.rateLimitSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.rateLimitSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BucketList:u,BucketPage:h,BucketInstance:f,BucketContext:p}},40843:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function VerificationList(t,e){function VerificationListInstance(t){return VerificationListInstance.get(t)}VerificationListInstance._version=t;VerificationListInstance._solution={serviceSid:e};VerificationListInstance._uri=`/Services/${e}/Verifications`;VerificationListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.channel)){throw new Error('Required parameter "opts.channel" missing.')}var i=n.defer();var s=u.of({To:o.get(t,"to"),Channel:o.get(t,"channel"),CustomFriendlyName:o.get(t,"customFriendlyName"),CustomMessage:o.get(t,"customMessage"),SendDigits:o.get(t,"sendDigits"),Locale:o.get(t,"locale"),CustomCode:o.get(t,"customCode"),Amount:o.get(t,"amount"),Payee:o.get(t,"payee"),RateLimits:a.object(o.get(t,"rateLimits")),ChannelConfiguration:a.object(o.get(t,"channelConfiguration")),AppHash:o.get(t,"appHash")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VerificationListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};VerificationListInstance.toJSON=function toJSON(){return this._solution};VerificationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return VerificationListInstance};f=function VerificationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function VerificationInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.to=e.to;this.channel=e.channel;this.status=e.status;this.valid=e.valid;this.lookup=e.lookup;this.amount=e.amount;this.payee=e.payee;this.sendCodeAttempts=e.send_code_attempts;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function VerificationContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Verifications/${i}`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=u.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={VerificationList:h,VerificationPage:f,VerificationInstance:p,VerificationContext:d}},67609:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function VerificationCheckList(t,e){function VerificationCheckListInstance(t){return VerificationCheckListInstance.get(t)}VerificationCheckListInstance._version=t;VerificationCheckListInstance._solution={serviceSid:e};VerificationCheckListInstance._uri=`/Services/${e}/VerificationCheck`;VerificationCheckListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.code)){throw new Error('Required parameter "opts.code" missing.')}var i=n.defer();var s=a.of({Code:o.get(t,"code"),To:o.get(t,"to"),VerificationSid:o.get(t,"verificationSid"),Amount:o.get(t,"amount"),Payee:o.get(t,"payee")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VerificationCheckListInstance.toJSON=function toJSON(){return this._solution};VerificationCheckListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return VerificationCheckListInstance};h=function VerificationCheckPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function VerificationCheckInstance(t,e,i){this._version=t;this.sid=e.sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.to=e.to;this.channel=e.channel;this.status=e.status;this.valid=e.valid;this.amount=e.amount;this.payee=e.payee;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={serviceSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={VerificationCheckList:u,VerificationCheckPage:h,VerificationCheckInstance:f}},27240:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WebhookList(t,e){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={serviceSid:e};WebhookListInstance._uri=`/Services/${e}/Webhooks`;WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.eventTypes)){throw new Error('Required parameter "opts.eventTypes" missing.')}if(o.isUndefined(t.webhookUrl)){throw new Error('Required parameter "opts.webhookUrl" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),EventTypes:a.map(o.get(t,"eventTypes"),function(t){return t}),WebhookUrl:o.get(t,"webhookUrl"),Status:o.get(t,"status")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};f=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.eventTypes=e.event_types;this.status=e.status;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WebhookContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Webhooks/${i}`};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),EventTypes:a.map(o.get(t,"eventTypes"),function(t){return t}),WebhookUrl:o.get(t,"webhookUrl"),Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:h,WebhookPage:f,WebhookInstance:p,WebhookContext:d}},41933:(t,e,i)=>{"use strict";var n=i(90250);var o=i(51065).CompositionHookList;var s=i(96431).CompositionList;var r=i(94633).CompositionSettingsList;var c=i(20370).RecordingList;var a=i(46347).RecordingSettingsList;var u=i(70641).RoomList;var h=i(64351);function V1(t){h.prototype.constructor.call(this,t,"v1");this._compositions=undefined;this._compositionHooks=undefined;this._compositionSettings=undefined;this._recordings=undefined;this._recordingSettings=undefined;this._rooms=undefined}n.extend(V1.prototype,h.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"compositions",{get:function(){this._compositions=this._compositions||new s(this);return this._compositions}});Object.defineProperty(V1.prototype,"compositionHooks",{get:function(){this._compositionHooks=this._compositionHooks||new o(this);return this._compositionHooks}});Object.defineProperty(V1.prototype,"compositionSettings",{get:function(){this._compositionSettings=this._compositionSettings||new r(this);return this._compositionSettings}});Object.defineProperty(V1.prototype,"recordings",{get:function(){this._recordings=this._recordings||new c(this);return this._recordings}});Object.defineProperty(V1.prototype,"recordingSettings",{get:function(){this._recordingSettings=this._recordingSettings||new a(this);return this._recordingSettings}});Object.defineProperty(V1.prototype,"rooms",{get:function(){this._rooms=this._rooms||new u(this);return this._rooms}});t.exports=V1},96431:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CompositionList(t){function CompositionListInstance(t){return CompositionListInstance.get(t)}CompositionListInstance._version=t;CompositionListInstance._solution={};CompositionListInstance._uri=`/Compositions`;CompositionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CompositionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CompositionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Status:o.get(t,"status"),DateCreatedAfter:a.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:a.iso8601DateTime(o.get(t,"dateCreatedBefore")),RoomSid:o.get(t,"roomSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.roomSid)){throw new Error('Required parameter "opts.roomSid" missing.')}var i=n.defer();var s=u.of({RoomSid:o.get(t,"roomSid"),VideoLayout:a.object(o.get(t,"videoLayout")),AudioSources:a.map(o.get(t,"audioSources"),function(t){return t}),AudioSourcesExcluded:a.map(o.get(t,"audioSourcesExcluded"),function(t){return t}),Resolution:o.get(t,"resolution"),Format:o.get(t,"format"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),Trim:a.bool(o.get(t,"trim"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionListInstance.get=function get(t){return new d(this._version,t)};CompositionListInstance.toJSON=function toJSON(){return this._solution};CompositionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CompositionListInstance};f=function CompositionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CompositionInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.status=e.status;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateCompleted=c.iso8601DateTime(e.date_completed);this.dateDeleted=c.iso8601DateTime(e.date_deleted);this.sid=e.sid;this.roomSid=e.room_sid;this.audioSources=e.audio_sources;this.audioSourcesExcluded=e.audio_sources_excluded;this.videoLayout=e.video_layout;this.resolution=e.resolution;this.trim=e.trim;this.format=e.format;this.bitrate=c.integer(e.bitrate);this.size=c.integer(e.size);this.duration=c.integer(e.duration);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CompositionContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Compositions/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CompositionList:h,CompositionPage:f,CompositionInstance:p,CompositionContext:d}},51065:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CompositionHookList(t){function CompositionHookListInstance(t){return CompositionHookListInstance.get(t)}CompositionHookListInstance._version=t;CompositionHookListInstance._solution={};CompositionHookListInstance._uri=`/CompositionHooks`;CompositionHookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CompositionHookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CompositionHookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Enabled:a.bool(o.get(t,"enabled")),DateCreatedAfter:a.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:a.iso8601DateTime(o.get(t,"dateCreatedBefore")),FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionHookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionHookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Enabled:a.bool(o.get(t,"enabled")),VideoLayout:a.object(o.get(t,"videoLayout")),AudioSources:a.map(o.get(t,"audioSources"),function(t){return t}),AudioSourcesExcluded:a.map(o.get(t,"audioSourcesExcluded"),function(t){return t}),Resolution:o.get(t,"resolution"),Format:o.get(t,"format"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),Trim:a.bool(o.get(t,"trim"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionHookListInstance.get=function get(t){return new d(this._version,t)};CompositionHookListInstance.toJSON=function toJSON(){return this._solution};CompositionHookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CompositionHookListInstance};f=function CompositionHookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CompositionHookInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.enabled=e.enabled;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.sid=e.sid;this.audioSources=e.audio_sources;this.audioSourcesExcluded=e.audio_sources_excluded;this.videoLayout=e.video_layout;this.resolution=e.resolution;this.trim=e.trim;this.format=e.format;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CompositionHookContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/CompositionHooks/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Enabled:a.bool(o.get(t,"enabled")),VideoLayout:a.object(o.get(t,"videoLayout")),AudioSources:a.map(o.get(t,"audioSources"),function(t){return t}),AudioSourcesExcluded:a.map(o.get(t,"audioSourcesExcluded"),function(t){return t}),Trim:a.bool(o.get(t,"trim")),Format:o.get(t,"format"),Resolution:o.get(t,"resolution"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CompositionHookList:h,CompositionHookPage:f,CompositionHookInstance:p,CompositionHookContext:d}},94633:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function CompositionSettingsList(t){function CompositionSettingsListInstance(t){return CompositionSettingsListInstance.get(t)}CompositionSettingsListInstance._version=t;CompositionSettingsListInstance._solution={};CompositionSettingsListInstance.get=function get(){return new p(this._version)};CompositionSettingsListInstance.toJSON=function toJSON(){return this._solution};CompositionSettingsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CompositionSettingsListInstance};h=function CompositionSettingsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CompositionSettingsInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.awsCredentialsSid=e.aws_credentials_sid;this.awsS3Url=e.aws_s3_url;this.awsStorageEnabled=e.aws_storage_enabled;this.encryptionKeySid=e.encryption_key_sid;this.encryptionEnabled=e.encryption_enabled;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.create=function create(t,e){return this._proxy.create(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CompositionSettingsContext(t){this._version=t;this._solution={};this._uri=`/CompositionSettings/Default`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),AwsCredentialsSid:o.get(t,"awsCredentialsSid"),EncryptionKeySid:o.get(t,"encryptionKeySid"),AwsS3Url:o.get(t,"awsS3Url"),AwsStorageEnabled:c.bool(o.get(t,"awsStorageEnabled")),EncryptionEnabled:c.bool(o.get(t,"encryptionEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CompositionSettingsList:u,CompositionSettingsPage:h,CompositionSettingsInstance:f,CompositionSettingsContext:p}},20370:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RecordingList(t){function RecordingListInstance(t){return RecordingListInstance.get(t)}RecordingListInstance._version=t;RecordingListInstance._solution={};RecordingListInstance._uri=`/Recordings`;RecordingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RecordingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RecordingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Status:o.get(t,"status"),SourceSid:o.get(t,"sourceSid"),GroupingSid:a.map(o.get(t,"groupingSid"),function(t){return t}),DateCreatedAfter:a.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:a.iso8601DateTime(o.get(t,"dateCreatedBefore")),MediaType:o.get(t,"mediaType"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.get=function get(t){return new d(this._version,t)};RecordingListInstance.toJSON=function toJSON(){return this._solution};RecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingListInstance};f=function RecordingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RecordingInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.status=e.status;this.dateCreated=c.iso8601DateTime(e.date_created);this.sid=e.sid;this.sourceSid=e.source_sid;this.size=c.integer(e.size);this.url=e.url;this.type=e.type;this.duration=c.integer(e.duration);this.containerFormat=e.container_format;this.codec=e.codec;this.groupingSids=e.grouping_sids;this.trackName=e.track_name;this.offset=c.integer(e.offset);this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RecordingContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Recordings/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingList:h,RecordingPage:f,RecordingInstance:p,RecordingContext:d}},46347:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function RecordingSettingsList(t){function RecordingSettingsListInstance(t){return RecordingSettingsListInstance.get(t)}RecordingSettingsListInstance._version=t;RecordingSettingsListInstance._solution={};RecordingSettingsListInstance.get=function get(){return new p(this._version)};RecordingSettingsListInstance.toJSON=function toJSON(){return this._solution};RecordingSettingsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingSettingsListInstance};h=function RecordingSettingsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function RecordingSettingsInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.awsCredentialsSid=e.aws_credentials_sid;this.awsS3Url=e.aws_s3_url;this.awsStorageEnabled=e.aws_storage_enabled;this.encryptionKeySid=e.encryption_key_sid;this.encryptionEnabled=e.encryption_enabled;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.create=function create(t,e){return this._proxy.create(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RecordingSettingsContext(t){this._version=t;this._solution={};this._uri=`/RecordingSettings/Default`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),AwsCredentialsSid:o.get(t,"awsCredentialsSid"),EncryptionKeySid:o.get(t,"encryptionKeySid"),AwsS3Url:o.get(t,"awsS3Url"),AwsStorageEnabled:c.bool(o.get(t,"awsStorageEnabled")),EncryptionEnabled:c.bool(o.get(t,"encryptionEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingSettingsList:u,RecordingSettingsPage:h,RecordingSettingsInstance:f,RecordingSettingsContext:p}},70641:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(84704).ParticipantList;var a=i(67285).RecordingRulesList;var u=i(80433).RoomRecordingList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function RoomList(t){function RoomListInstance(t){return RoomListInstance.get(t)}RoomListInstance._version=t;RoomListInstance._solution={};RoomListInstance._uri=`/Rooms`;RoomListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({EnableTurn:f.bool(o.get(t,"enableTurn")),Type:o.get(t,"type"),UniqueName:o.get(t,"uniqueName"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),MaxParticipants:o.get(t,"maxParticipants"),RecordParticipantsOnConnect:f.bool(o.get(t,"recordParticipantsOnConnect")),VideoCodecs:f.map(o.get(t,"videoCodecs"),function(t){return t}),MediaRegion:o.get(t,"mediaRegion")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoomListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoomListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({Status:o.get(t,"status"),UniqueName:o.get(t,"uniqueName"),DateCreatedAfter:f.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:f.iso8601DateTime(o.get(t,"dateCreatedBefore")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomListInstance.get=function get(t){return new m(this._version,t)};RoomListInstance.toJSON=function toJSON(){return this._solution};RoomListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoomListInstance};l=function RoomPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,r.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function RoomInstance(t,e,i){this._version=t;this.sid=e.sid;this.status=e.status;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.accountSid=e.account_sid;this.enableTurn=e.enable_turn;this.uniqueName=e.unique_name;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.endTime=h.iso8601DateTime(e.end_time);this.duration=h.integer(e.duration);this.type=e.type;this.maxParticipants=h.integer(e.max_participants);this.recordParticipantsOnConnect=e.record_participants_on_connect;this.videoCodecs=e.video_codecs;this.mediaRegion=e.media_region;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.recordings=function recordings(){return this._proxy.recordings};v.prototype.participants=function participants(){return this._proxy.participants};v.prototype.recordingRules=function recordingRules(){return this._proxy.recordingRules};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function RoomContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Rooms/${e}`;this._recordings=undefined;this._participants=undefined;this._recordingRules=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=p.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"recordings",{get:function(){if(!this._recordings){this._recordings=new u(this._version,this._solution.sid)}return this._recordings}});Object.defineProperty(m.prototype,"participants",{get:function(){if(!this._participants){this._participants=new c(this._version,this._solution.sid)}return this._participants}});Object.defineProperty(m.prototype,"recordingRules",{get:function(){if(!this._recordingRules){this._recordingRules=new a(this._version,this._solution.sid)}return this._recordingRules}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoomList:d,RoomPage:l,RoomInstance:v,RoomContext:m}},80433:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoomRecordingList(t,e){function RoomRecordingListInstance(t){return RoomRecordingListInstance.get(t)}RoomRecordingListInstance._version=t;RoomRecordingListInstance._solution={roomSid:e};RoomRecordingListInstance._uri=`/Rooms/${e}/Recordings`;RoomRecordingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoomRecordingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoomRecordingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Status:o.get(t,"status"),SourceSid:o.get(t,"sourceSid"),DateCreatedAfter:a.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:a.iso8601DateTime(o.get(t,"dateCreatedBefore")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomRecordingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomRecordingListInstance.get=function get(t){return new d(this._version,this._solution.roomSid,t)};RoomRecordingListInstance.toJSON=function toJSON(){return this._solution};RoomRecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoomRecordingListInstance};f=function RoomRecordingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.roomSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoomRecordingInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.status=e.status;this.dateCreated=c.iso8601DateTime(e.date_created);this.sid=e.sid;this.sourceSid=e.source_sid;this.size=c.integer(e.size);this.url=e.url;this.type=e.type;this.duration=c.integer(e.duration);this.containerFormat=e.container_format;this.codec=e.codec;this.groupingSids=e.grouping_sids;this.trackName=e.track_name;this.offset=c.integer(e.offset);this.roomSid=e.room_sid;this.links=e.links;this._context=undefined;this._solution={roomSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.roomSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoomRecordingContext(t,e,i){this._version=t;this._solution={roomSid:e,sid:i};this._uri=`/Rooms/${e}/Recordings/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.roomSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoomRecordingList:h,RoomRecordingPage:f,RoomRecordingInstance:p,RoomRecordingContext:d}},84704:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(95290).PublishedTrackList;var a=i(90319).SubscribeRulesList;var u=i(77901).SubscribedTrackList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ParticipantList(t,e){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={roomSid:e};ParticipantListInstance._uri=`/Rooms/${e}/Participants`;ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({Status:o.get(t,"status"),Identity:o.get(t,"identity"),DateCreatedAfter:f.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:f.iso8601DateTime(o.get(t,"dateCreatedBefore")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new m(this._version,this._solution.roomSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};l=function ParticipantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,r.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.roomSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ParticipantInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.roomSid=e.room_sid;this.accountSid=e.account_sid;this.status=e.status;this.identity=e.identity;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.startTime=h.iso8601DateTime(e.start_time);this.endTime=h.iso8601DateTime(e.end_time);this.duration=h.integer(e.duration);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={roomSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.roomSid,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.publishedTracks=function publishedTracks(){return this._proxy.publishedTracks};v.prototype.subscribedTracks=function subscribedTracks(){return this._proxy.subscribedTracks};v.prototype.subscribeRules=function subscribeRules(){return this._proxy.subscribeRules};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ParticipantContext(t,e,i){this._version=t;this._solution={roomSid:e,sid:i};this._uri=`/Rooms/${e}/Participants/${i}`;this._publishedTracks=undefined;this._subscribedTracks=undefined;this._subscribeRules=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.roomSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.roomSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"publishedTracks",{get:function(){if(!this._publishedTracks){this._publishedTracks=new c(this._version,this._solution.roomSid,this._solution.sid)}return this._publishedTracks}});Object.defineProperty(m.prototype,"subscribedTracks",{get:function(){if(!this._subscribedTracks){this._subscribedTracks=new u(this._version,this._solution.roomSid,this._solution.sid)}return this._subscribedTracks}});Object.defineProperty(m.prototype,"subscribeRules",{get:function(){if(!this._subscribeRules){this._subscribeRules=new a(this._version,this._solution.roomSid,this._solution.sid)}return this._subscribeRules}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:d,ParticipantPage:l,ParticipantInstance:v,ParticipantContext:m}},95290:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function PublishedTrackList(t,e,i){function PublishedTrackListInstance(t){return PublishedTrackListInstance.get(t)}PublishedTrackListInstance._version=t;PublishedTrackListInstance._solution={roomSid:e,participantSid:i};PublishedTrackListInstance._uri=`/Rooms/${e}/Participants/${i}/PublishedTracks`;PublishedTrackListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PublishedTrackListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PublishedTrackListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PublishedTrackListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PublishedTrackListInstance.get=function get(t){return new p(this._version,this._solution.roomSid,this._solution.participantSid,t)};PublishedTrackListInstance.toJSON=function toJSON(){return this._solution};PublishedTrackListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PublishedTrackListInstance};h=function PublishedTrackPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.roomSid,this._solution.participantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PublishedTrackInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.participantSid=e.participant_sid;this.roomSid=e.room_sid;this.name=e.name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.enabled=e.enabled;this.kind=e.kind;this.url=e.url;this._context=undefined;this._solution={roomSid:i,participantSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.roomSid,this._solution.participantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PublishedTrackContext(t,e,i,n){this._version=t;this._solution={roomSid:e,participantSid:i,sid:n};this._uri=`/Rooms/${e}/Participants/${i}/PublishedTracks/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.roomSid,this._solution.participantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PublishedTrackList:u,PublishedTrackPage:h,PublishedTrackInstance:f,PublishedTrackContext:p}},90319:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function SubscribeRulesList(t,e,i){function SubscribeRulesListInstance(t){return SubscribeRulesListInstance.get(t)}SubscribeRulesListInstance._version=t;SubscribeRulesListInstance._solution={roomSid:e,participantSid:i};SubscribeRulesListInstance._uri=`/Rooms/${e}/Participants/${i}/SubscribeRules`;SubscribeRulesListInstance.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.roomSid,this._solution.participantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};SubscribeRulesListInstance.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Rules:a.object(o.get(t,"rules"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.roomSid,this._solution.participantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscribeRulesListInstance.toJSON=function toJSON(){return this._solution};SubscribeRulesListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SubscribeRulesListInstance};f=function SubscribeRulesPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.roomSid,this._solution.participantSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SubscribeRulesInstance(t,e,i,n){this._version=t;this.participantSid=e.participant_sid;this.roomSid=e.room_sid;this.rules=e.rules;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={roomSid:i,participantSid:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SubscribeRulesList:h,SubscribeRulesPage:f,SubscribeRulesInstance:p}},77901:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SubscribedTrackList(t,e,i){function SubscribedTrackListInstance(t){return SubscribedTrackListInstance.get(t)}SubscribedTrackListInstance._version=t;SubscribedTrackListInstance._solution={roomSid:e,participantSid:i};SubscribedTrackListInstance._uri=`/Rooms/${e}/Participants/${i}/SubscribedTracks`;SubscribedTrackListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SubscribedTrackListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SubscribedTrackListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscribedTrackListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscribedTrackListInstance.get=function get(t){return new p(this._version,this._solution.roomSid,this._solution.participantSid,t)};SubscribedTrackListInstance.toJSON=function toJSON(){return this._solution};SubscribedTrackListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SubscribedTrackListInstance};h=function SubscribedTrackPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.roomSid,this._solution.participantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SubscribedTrackInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.participantSid=e.participant_sid;this.publisherSid=e.publisher_sid;this.roomSid=e.room_sid;this.name=e.name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.enabled=e.enabled;this.kind=e.kind;this.url=e.url;this._context=undefined;this._solution={roomSid:i,participantSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.roomSid,this._solution.participantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SubscribedTrackContext(t,e,i,n){this._version=t;this._solution={roomSid:e,participantSid:i,sid:n};this._uri=`/Rooms/${e}/Participants/${i}/SubscribedTracks/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.roomSid,this._solution.participantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SubscribedTrackList:u,SubscribedTrackPage:h,SubscribedTrackInstance:f,SubscribedTrackContext:p}},67285:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function RecordingRulesList(t,e){function RecordingRulesListInstance(t){return RecordingRulesListInstance.get(t)}RecordingRulesListInstance._version=t;RecordingRulesListInstance._solution={roomSid:e};RecordingRulesListInstance._uri=`/Rooms/${e}/RecordingRules`;RecordingRulesListInstance.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.roomSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};RecordingRulesListInstance.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Rules:a.object(o.get(t,"rules"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.roomSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingRulesListInstance.toJSON=function toJSON(){return this._solution};RecordingRulesListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingRulesListInstance};f=function RecordingRulesPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.roomSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RecordingRulesInstance(t,e,i){this._version=t;this.roomSid=e.room_sid;this.rules=e.rules;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={roomSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingRulesList:h,RecordingRulesPage:f,RecordingRulesInstance:p}},24691:(t,e,i)=>{"use strict";var n=i(90250);var o=i(47834).ByocTrunkList;var s=i(33262).ConnectionPolicyList;var r=i(20813).DialingPermissionsList;var c=i(21254).IpRecordList;var a=i(1900).SourceIpMappingList;var u=i(64351);function V1(t){u.prototype.constructor.call(this,t,"v1");this._byocTrunks=undefined;this._connectionPolicies=undefined;this._dialingPermissions=undefined;this._ipRecords=undefined;this._sourceIpMappings=undefined}n.extend(V1.prototype,u.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"byocTrunks",{get:function(){this._byocTrunks=this._byocTrunks||new o(this);return this._byocTrunks}});Object.defineProperty(V1.prototype,"connectionPolicies",{get:function(){this._connectionPolicies=this._connectionPolicies||new s(this);return this._connectionPolicies}});Object.defineProperty(V1.prototype,"dialingPermissions",{get:function(){this._dialingPermissions=this._dialingPermissions||new r(this);return this._dialingPermissions}});Object.defineProperty(V1.prototype,"ipRecords",{get:function(){this._ipRecords=this._ipRecords||new c(this);return this._ipRecords}});Object.defineProperty(V1.prototype,"sourceIpMappings",{get:function(){this._sourceIpMappings=this._sourceIpMappings||new a(this);return this._sourceIpMappings}});t.exports=V1},47834:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ByocTrunkList(t){function ByocTrunkListInstance(t){return ByocTrunkListInstance.get(t)}ByocTrunkListInstance._version=t;ByocTrunkListInstance._solution={};ByocTrunkListInstance._uri=`/ByocTrunks`;ByocTrunkListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),VoiceUrl:o.get(t,"voiceUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),StatusCallbackUrl:o.get(t,"statusCallbackUrl"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),CnamLookupEnabled:a.bool(o.get(t,"cnamLookupEnabled")),ConnectionPolicySid:o.get(t,"connectionPolicySid"),FromDomainSid:o.get(t,"fromDomainSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ByocTrunkListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ByocTrunkListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ByocTrunkListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ByocTrunkListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ByocTrunkListInstance.get=function get(t){return new d(this._version,t)};ByocTrunkListInstance.toJSON=function toJSON(){return this._solution};ByocTrunkListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ByocTrunkListInstance};f=function ByocTrunkPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ByocTrunkInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.voiceUrl=e.voice_url;this.voiceMethod=e.voice_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceFallbackMethod=e.voice_fallback_method;this.statusCallbackUrl=e.status_callback_url;this.statusCallbackMethod=e.status_callback_method;this.cnamLookupEnabled=e.cnam_lookup_enabled;this.connectionPolicySid=e.connection_policy_sid;this.fromDomainSid=e.from_domain_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ByocTrunkContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/ByocTrunks/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),VoiceUrl:o.get(t,"voiceUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),StatusCallbackUrl:o.get(t,"statusCallbackUrl"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),CnamLookupEnabled:a.bool(o.get(t,"cnamLookupEnabled")),ConnectionPolicySid:o.get(t,"connectionPolicySid"),FromDomainSid:o.get(t,"fromDomainSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ByocTrunkList:h,ByocTrunkPage:f,ByocTrunkInstance:p,ByocTrunkContext:d}},33262:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(50473).ConnectionPolicyTargetList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function ConnectionPolicyList(t){function ConnectionPolicyListInstance(t){return ConnectionPolicyListInstance.get(t)}ConnectionPolicyListInstance._version=t;ConnectionPolicyListInstance._solution={};ConnectionPolicyListInstance._uri=`/ConnectionPolicies`;ConnectionPolicyListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConnectionPolicyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConnectionPolicyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyListInstance.get=function get(t){return new d(this._version,t)};ConnectionPolicyListInstance.toJSON=function toJSON(){return this._solution};ConnectionPolicyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConnectionPolicyListInstance};f=function ConnectionPolicyPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConnectionPolicyInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.targets=function targets(){return this._proxy.targets};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ConnectionPolicyContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/ConnectionPolicies/${e}`;this._targets=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"targets",{get:function(){if(!this._targets){this._targets=new r(this._version,this._solution.sid)}return this._targets}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConnectionPolicyList:h,ConnectionPolicyPage:f,ConnectionPolicyInstance:p,ConnectionPolicyContext:d}},50473:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ConnectionPolicyTargetList(t,e){function ConnectionPolicyTargetListInstance(t){return ConnectionPolicyTargetListInstance.get(t)}ConnectionPolicyTargetListInstance._version=t;ConnectionPolicyTargetListInstance._solution={connectionPolicySid:e};ConnectionPolicyTargetListInstance._uri=`/ConnectionPolicies/${e}/Targets`;ConnectionPolicyTargetListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.target)){throw new Error('Required parameter "opts.target" missing.')}var i=n.defer();var s=u.of({Target:o.get(t,"target"),FriendlyName:o.get(t,"friendlyName"),Priority:o.get(t,"priority"),Weight:o.get(t,"weight"),Enabled:a.bool(o.get(t,"enabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.connectionPolicySid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyTargetListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConnectionPolicyTargetListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConnectionPolicyTargetListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyTargetListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyTargetListInstance.get=function get(t){return new d(this._version,this._solution.connectionPolicySid,t)};ConnectionPolicyTargetListInstance.toJSON=function toJSON(){return this._solution};ConnectionPolicyTargetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConnectionPolicyTargetListInstance};f=function ConnectionPolicyTargetPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.connectionPolicySid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConnectionPolicyTargetInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.connectionPolicySid=e.connection_policy_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.target=e.target;this.priority=c.integer(e.priority);this.weight=c.integer(e.weight);this.enabled=e.enabled;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={connectionPolicySid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.connectionPolicySid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ConnectionPolicyTargetContext(t,e,i){this._version=t;this._solution={connectionPolicySid:e,sid:i};this._uri=`/ConnectionPolicies/${e}/Targets/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.connectionPolicySid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Target:o.get(t,"target"),Priority:o.get(t,"priority"),Weight:o.get(t,"weight"),Enabled:a.bool(o.get(t,"enabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.connectionPolicySid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConnectionPolicyTargetList:h,ConnectionPolicyTargetPage:f,ConnectionPolicyTargetInstance:p,ConnectionPolicyTargetContext:d}},20813:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(97584).BulkCountryUpdateList;var r=i(78266).CountryList;var c=i(64488).SettingsList;var a;a=function DialingPermissionsList(t){function DialingPermissionsListInstance(t){return DialingPermissionsListInstance.get(t)}DialingPermissionsListInstance._version=t;DialingPermissionsListInstance._solution={};DialingPermissionsListInstance._countries=undefined;DialingPermissionsListInstance._settings=undefined;DialingPermissionsListInstance._bulkCountryUpdates=undefined;Object.defineProperty(DialingPermissionsListInstance,"countries",{get:function countries(){if(!this._countries){this._countries=new r(this._version)}return this._countries}});Object.defineProperty(DialingPermissionsListInstance,"settings",{get:function settings(){if(!this._settings){this._settings=new c(this._version)}return this._settings}});Object.defineProperty(DialingPermissionsListInstance,"bulkCountryUpdates",{get:function bulkCountryUpdates(){if(!this._bulkCountryUpdates){this._bulkCountryUpdates=new s(this._version)}return this._bulkCountryUpdates}});DialingPermissionsListInstance.toJSON=function toJSON(){return this._solution};DialingPermissionsListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return DialingPermissionsListInstance};t.exports={DialingPermissionsList:a}},97584:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function BulkCountryUpdateList(t){function BulkCountryUpdateListInstance(t){return BulkCountryUpdateListInstance.get(t)}BulkCountryUpdateListInstance._version=t;BulkCountryUpdateListInstance._solution={};BulkCountryUpdateListInstance._uri=`/DialingPermissions/BulkCountryUpdates`;BulkCountryUpdateListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.updateRequest)){throw new Error('Required parameter "opts.updateRequest" missing.')}var i=n.defer();var s=a.of({UpdateRequest:o.get(t,"updateRequest")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BulkCountryUpdateListInstance.toJSON=function toJSON(){return this._solution};BulkCountryUpdateListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BulkCountryUpdateListInstance};h=function BulkCountryUpdatePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function BulkCountryUpdateInstance(t,e){this._version=t;this.updateCount=c.integer(e.update_count);this.updateRequest=e.update_request;this._context=undefined;this._solution={}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BulkCountryUpdateList:u,BulkCountryUpdatePage:h,BulkCountryUpdateInstance:f}},78266:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(4071).HighriskSpecialPrefixList;var c=i(60938);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CountryList(t){function CountryListInstance(t){return CountryListInstance.get(t)}CountryListInstance._version=t;CountryListInstance._solution={};CountryListInstance._uri=`/DialingPermissions/Countries`;CountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({IsoCode:o.get(t,"isoCode"),Continent:o.get(t,"continent"),CountryCode:o.get(t,"countryCode"),LowRiskNumbersEnabled:a.bool(o.get(t,"lowRiskNumbersEnabled")),HighRiskSpecialNumbersEnabled:a.bool(o.get(t,"highRiskSpecialNumbersEnabled")),HighRiskTollfraudNumbersEnabled:a.bool(o.get(t,"highRiskTollfraudNumbersEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.get=function get(t){return new d(this._version,t)};CountryListInstance.toJSON=function toJSON(){return this._solution};CountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CountryListInstance};f=function CountryPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CountryInstance(t,e,i){this._version=t;this.isoCode=e.iso_code;this.name=e.name;this.continent=e.continent;this.countryCodes=e.country_codes;this.lowRiskNumbersEnabled=e.low_risk_numbers_enabled;this.highRiskSpecialNumbersEnabled=e.high_risk_special_numbers_enabled;this.highRiskTollfraudNumbersEnabled=e.high_risk_tollfraud_numbers_enabled;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={isoCode:i||this.isoCode}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.isoCode)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.highriskSpecialPrefixes=function highriskSpecialPrefixes(){return this._proxy.highriskSpecialPrefixes};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CountryContext(t,e){this._version=t;this._solution={isoCode:e};this._uri=`/DialingPermissions/Countries/${e}`;this._highriskSpecialPrefixes=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.isoCode))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"highriskSpecialPrefixes",{get:function(){if(!this._highriskSpecialPrefixes){this._highriskSpecialPrefixes=new r(this._version,this._solution.isoCode)}return this._highriskSpecialPrefixes}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CountryList:h,CountryPage:f,CountryInstance:p,CountryContext:d}},4071:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function HighriskSpecialPrefixList(t,e){function HighriskSpecialPrefixListInstance(t){return HighriskSpecialPrefixListInstance.get(t)}HighriskSpecialPrefixListInstance._version=t;HighriskSpecialPrefixListInstance._solution={isoCode:e};HighriskSpecialPrefixListInstance._uri=`/DialingPermissions/Countries/${e}/HighRiskSpecialPrefixes`;HighriskSpecialPrefixListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};HighriskSpecialPrefixListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};HighriskSpecialPrefixListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};HighriskSpecialPrefixListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};HighriskSpecialPrefixListInstance.toJSON=function toJSON(){return this._solution};HighriskSpecialPrefixListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return HighriskSpecialPrefixListInstance};u=function HighriskSpecialPrefixPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.isoCode)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function HighriskSpecialPrefixInstance(t,e,i){this._version=t;this.prefix=e.prefix;this._context=undefined;this._solution={isoCode:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={HighriskSpecialPrefixList:a,HighriskSpecialPrefixPage:u,HighriskSpecialPrefixInstance:h}},64488:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function SettingsList(t){function SettingsListInstance(t){return SettingsListInstance.get(t)}SettingsListInstance._version=t;SettingsListInstance._solution={};SettingsListInstance.get=function get(){return new p(this._version)};SettingsListInstance.toJSON=function toJSON(){return this._solution};SettingsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SettingsListInstance};h=function SettingsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SettingsInstance(t,e){this._version=t;this.dialingPermissionsInheritance=e.dialing_permissions_inheritance;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SettingsContext(t){this._version=t;this._solution={};this._uri=`/Settings`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({DialingPermissionsInheritance:c.bool(o.get(t,"dialingPermissionsInheritance"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SettingsList:u,SettingsPage:h,SettingsInstance:f,SettingsContext:p}},21254:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function IpRecordList(t){function IpRecordListInstance(t){return IpRecordListInstance.get(t)}IpRecordListInstance._version=t;IpRecordListInstance._solution={};IpRecordListInstance._uri=`/IpRecords`;IpRecordListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.ipAddress)){throw new Error('Required parameter "opts.ipAddress" missing.')}var i=n.defer();var s=a.of({IpAddress:o.get(t,"ipAddress"),FriendlyName:o.get(t,"friendlyName"),CidrPrefixLength:o.get(t,"cidrPrefixLength")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpRecordListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IpRecordListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IpRecordListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpRecordListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpRecordListInstance.get=function get(t){return new p(this._version,t)};IpRecordListInstance.toJSON=function toJSON(){return this._solution};IpRecordListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IpRecordListInstance};h=function IpRecordPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function IpRecordInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.ipAddress=e.ip_address;this.cidrPrefixLength=c.integer(e.cidr_prefix_length);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function IpRecordContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/IpRecords/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IpRecordList:u,IpRecordPage:h,IpRecordInstance:f,IpRecordContext:p}},1900:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SourceIpMappingList(t){function SourceIpMappingListInstance(t){return SourceIpMappingListInstance.get(t)}SourceIpMappingListInstance._version=t;SourceIpMappingListInstance._solution={};SourceIpMappingListInstance._uri=`/SourceIpMappings`;SourceIpMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.ipRecordSid)){throw new Error('Required parameter "opts.ipRecordSid" missing.')}if(o.isUndefined(t.sipDomainSid)){throw new Error('Required parameter "opts.sipDomainSid" missing.')}var i=n.defer();var s=a.of({IpRecordSid:o.get(t,"ipRecordSid"),SipDomainSid:o.get(t,"sipDomainSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SourceIpMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SourceIpMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SourceIpMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SourceIpMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SourceIpMappingListInstance.get=function get(t){return new p(this._version,t)};SourceIpMappingListInstance.toJSON=function toJSON(){return this._solution};SourceIpMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SourceIpMappingListInstance};h=function SourceIpMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SourceIpMappingInstance(t,e,i){this._version=t;this.sid=e.sid;this.ipRecordSid=e.ip_record_sid;this.sipDomainSid=e.sip_domain_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SourceIpMappingContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/SourceIpMappings/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.sipDomainSid)){throw new Error('Required parameter "opts.sipDomainSid" missing.')}var i=n.defer();var s=a.of({SipDomainSid:o.get(t,"sipDomainSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SourceIpMappingList:u,SourceIpMappingPage:h,SourceIpMappingInstance:f,SourceIpMappingContext:p}},57415:(t,e,i)=>{"use strict";var n=i(90250);var o=i(24495).CommandList;var s=i(59059).RatePlanList;var r=i(4131).SimList;var c=i(32878).UsageRecordList;var a=i(64351);function V1(t){a.prototype.constructor.call(this,t,"v1");this._usageRecords=undefined;this._commands=undefined;this._ratePlans=undefined;this._sims=undefined}n.extend(V1.prototype,a.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"usageRecords",{get:function(){this._usageRecords=this._usageRecords||new c(this);return this._usageRecords}});Object.defineProperty(V1.prototype,"commands",{get:function(){this._commands=this._commands||new o(this);return this._commands}});Object.defineProperty(V1.prototype,"ratePlans",{get:function(){this._ratePlans=this._ratePlans||new s(this);return this._ratePlans}});Object.defineProperty(V1.prototype,"sims",{get:function(){this._sims=this._sims||new r(this);return this._sims}});t.exports=V1},24495:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CommandList(t){function CommandListInstance(t){return CommandListInstance.get(t)}CommandListInstance._version=t;CommandListInstance._solution={};CommandListInstance._uri=`/Commands`;CommandListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CommandListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CommandListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Sim:o.get(t,"sim"),Status:o.get(t,"status"),Direction:o.get(t,"direction"),Transport:o.get(t,"transport"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.command)){throw new Error('Required parameter "opts.command" missing.')}var i=n.defer();var s=u.of({Command:o.get(t,"command"),Sim:o.get(t,"sim"),CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl"),CommandMode:o.get(t,"commandMode"),IncludeSid:o.get(t,"includeSid"),DeliveryReceiptRequested:a.bool(o.get(t,"deliveryReceiptRequested"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.get=function get(t){return new d(this._version,t)};CommandListInstance.toJSON=function toJSON(){return this._solution};CommandListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CommandListInstance};f=function CommandPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CommandInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.simSid=e.sim_sid;this.command=e.command;this.commandMode=e.command_mode;this.transport=e.transport;this.deliveryReceiptRequested=e.delivery_receipt_requested;this.status=e.status;this.direction=e.direction;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CommandContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Commands/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CommandList:h,CommandPage:f,CommandInstance:p,CommandContext:d}},59059:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RatePlanList(t){function RatePlanListInstance(t){return RatePlanListInstance.get(t)}RatePlanListInstance._version=t;RatePlanListInstance._solution={};RatePlanListInstance._uri=`/RatePlans`;RatePlanListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RatePlanListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RatePlanListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),DataEnabled:a.bool(o.get(t,"dataEnabled")),DataLimit:o.get(t,"dataLimit"),DataMetering:o.get(t,"dataMetering"),MessagingEnabled:a.bool(o.get(t,"messagingEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),NationalRoamingEnabled:a.bool(o.get(t,"nationalRoamingEnabled")),InternationalRoaming:a.map(o.get(t,"internationalRoaming"),function(t){return t}),NationalRoamingDataLimit:o.get(t,"nationalRoamingDataLimit"),InternationalRoamingDataLimit:o.get(t,"internationalRoamingDataLimit")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.get=function get(t){return new d(this._version,t)};RatePlanListInstance.toJSON=function toJSON(){return this._solution};RatePlanListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RatePlanListInstance};f=function RatePlanPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RatePlanInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dataEnabled=e.data_enabled;this.dataMetering=e.data_metering;this.dataLimit=c.integer(e.data_limit);this.messagingEnabled=e.messaging_enabled;this.voiceEnabled=e.voice_enabled;this.nationalRoamingEnabled=e.national_roaming_enabled;this.nationalRoamingDataLimit=c.integer(e.national_roaming_data_limit);this.internationalRoaming=e.international_roaming;this.internationalRoamingDataLimit=c.integer(e.international_roaming_data_limit);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RatePlanContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RatePlans/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RatePlanList:h,RatePlanPage:f,RatePlanInstance:p,RatePlanContext:d}},4131:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(48120).DataSessionList;var c=i(60938);var a=i(89630).UsageRecordList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function SimList(t){function SimListInstance(t){return SimListInstance.get(t)}SimListInstance._version=t;SimListInstance._solution={};SimListInstance._uri=`/Sims`;SimListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SimListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SimListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Status:o.get(t,"status"),Iccid:o.get(t,"iccid"),RatePlan:o.get(t,"ratePlan"),EId:o.get(t,"eId"),SimRegistrationCode:o.get(t,"simRegistrationCode"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.get=function get(t){return new l(this._version,t)};SimListInstance.toJSON=function toJSON(){return this._solution};SimListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SimListInstance};p=function SimPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SimInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.ratePlanSid=e.rate_plan_sid;this.friendlyName=e.friendly_name;this.iccid=e.iccid;this.eId=e.e_id;this.status=e.status;this.resetStatus=e.reset_status;this.commandsCallbackUrl=e.commands_callback_url;this.commandsCallbackMethod=e.commands_callback_method;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this.ipAddress=e.ip_address;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.usageRecords=function usageRecords(){return this._proxy.usageRecords};d.prototype.dataSessions=function dataSessions(){return this._proxy.dataSessions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SimContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Sims/${e}`;this._usageRecords=undefined;this._dataSessions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl"),FriendlyName:o.get(t,"friendlyName"),RatePlan:o.get(t,"ratePlan"),Status:o.get(t,"status"),CommandsCallbackMethod:o.get(t,"commandsCallbackMethod"),CommandsCallbackUrl:o.get(t,"commandsCallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),ResetStatus:o.get(t,"resetStatus"),AccountSid:o.get(t,"accountSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"usageRecords",{get:function(){if(!this._usageRecords){this._usageRecords=new a(this._version,this._solution.sid)}return this._usageRecords}});Object.defineProperty(l.prototype,"dataSessions",{get:function(){if(!this._dataSessions){this._dataSessions=new r(this._version,this._solution.sid)}return this._dataSessions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SimList:f,SimPage:p,SimInstance:d,SimContext:l}},48120:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function DataSessionList(t,e){function DataSessionListInstance(t){return DataSessionListInstance.get(t)}DataSessionListInstance._version=t;DataSessionListInstance._solution={simSid:e};DataSessionListInstance._uri=`/Sims/${e}/DataSessions`;DataSessionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DataSessionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DataSessionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DataSessionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DataSessionListInstance.toJSON=function toJSON(){return this._solution};DataSessionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DataSessionListInstance};h=function DataSessionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.simSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DataSessionInstance(t,e,i){this._version=t;this.sid=e.sid;this.simSid=e.sim_sid;this.accountSid=e.account_sid;this.radioLink=e.radio_link;this.operatorMcc=e.operator_mcc;this.operatorMnc=e.operator_mnc;this.operatorCountry=e.operator_country;this.operatorName=e.operator_name;this.cellId=e.cell_id;this.cellLocationEstimate=e.cell_location_estimate;this.packetsUploaded=c.integer(e.packets_uploaded);this.packetsDownloaded=c.integer(e.packets_downloaded);this.lastUpdated=c.iso8601DateTime(e.last_updated);this.start=c.iso8601DateTime(e.start);this.end=c.iso8601DateTime(e.end);this.imei=e.imei;this._context=undefined;this._solution={simSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DataSessionList:u,DataSessionPage:h,DataSessionInstance:f}},89630:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;u=function UsageRecordList(t,e){function UsageRecordListInstance(t){return UsageRecordListInstance.get(t)}UsageRecordListInstance._version=t;UsageRecordListInstance._solution={simSid:e};UsageRecordListInstance._uri=`/Sims/${e}/UsageRecords`;UsageRecordListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UsageRecordListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UsageRecordListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({End:c.iso8601DateTime(o.get(t,"end")),Start:c.iso8601DateTime(o.get(t,"start")),Granularity:o.get(t,"granularity"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.toJSON=function toJSON(){return this._solution};UsageRecordListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UsageRecordListInstance};h=function UsageRecordPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.simSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UsageRecordInstance(t,e,i){this._version=t;this.simSid=e.sim_sid;this.accountSid=e.account_sid;this.period=e.period;this.commands=e.commands;this.data=e.data;this._context=undefined;this._solution={simSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UsageRecordList:u,UsageRecordPage:h,UsageRecordInstance:f}},32878:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;u=function UsageRecordList(t){function UsageRecordListInstance(t){return UsageRecordListInstance.get(t)}UsageRecordListInstance._version=t;UsageRecordListInstance._solution={};UsageRecordListInstance._uri=`/UsageRecords`;UsageRecordListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UsageRecordListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UsageRecordListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({End:c.iso8601DateTime(o.get(t,"end")),Start:c.iso8601DateTime(o.get(t,"start")),Granularity:o.get(t,"granularity"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.toJSON=function toJSON(){return this._solution};UsageRecordListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UsageRecordListInstance};h=function UsageRecordPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UsageRecordInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.period=e.period;this.commands=e.commands;this.data=e.data;this._context=undefined;this._solution={}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UsageRecordList:u,UsageRecordPage:h,UsageRecordInstance:f}},18682:(t,e,i)=>{"use strict";var n=i(18671);function FaxResponse(){n.call(this);this._propertyName="response"}FaxResponse.prototype=Object.create(n.prototype);FaxResponse.prototype.constructor=FaxResponse;FaxResponse.prototype.receive=function receive(t){return new Receive(this.response.ele("Receive",t))};function Receive(t){this.receive=t;this._propertyName="receive"}Receive.prototype=Object.create(n.prototype);Receive.prototype.constructor=Receive;t.exports=FaxResponse},53341:(t,e,i)=>{"use strict";var n=i(18671);function MessagingResponse(){n.call(this);this._propertyName="response"}MessagingResponse.prototype=Object.create(n.prototype);MessagingResponse.prototype.constructor=MessagingResponse;MessagingResponse.prototype.message=function message(t,e){return new Message(this.response.ele("Message",t,e))};MessagingResponse.prototype.redirect=function redirect(t,e){return new Redirect(this.response.ele("Redirect",t,e))};function Redirect(t){this.redirect=t;this._propertyName="redirect"}Redirect.prototype=Object.create(n.prototype);Redirect.prototype.constructor=Redirect;function Message(t){this.message=t;this._propertyName="message"}Message.prototype=Object.create(n.prototype);Message.prototype.constructor=Message;Message.prototype.body=function body(t,e){return new Body(this.message.ele("Body",t,e))};Message.prototype.media=function media(t,e){return new Media(this.message.ele("Media",t,e))};function Media(t){this.media=t;this._propertyName="media"}Media.prototype=Object.create(n.prototype);Media.prototype.constructor=Media;function Body(t){this.body=t;this._propertyName="body"}Body.prototype=Object.create(n.prototype);Body.prototype.constructor=Body;t.exports=MessagingResponse},18671:(t,e,i)=>{"use strict";var n=i(52958);function TwiML(){this.response=n.create("Response",{stringify:{attValue:function(t){if(Array.isArray(t)){t=t.join(" ")}return this.attEscape(""+t||"")}}}).dec("1.0","UTF-8")}TwiML.prototype._getXml=function _getPropertyName(){return this[this._propertyName]};TwiML.prototype.toString=function toString(){return this._getXml().end()};TwiML.prototype.addText=function addText(t){this._getXml().txt(t)};TwiML.prototype.addChild=function addChild(t,e){return new GenericNode(this._getXml().ele(t,e))};function GenericNode(t){this.node=t;this._propertyName="node"}GenericNode.prototype=Object.create(TwiML.prototype);GenericNode.prototype.constructor=GenericNode;t.exports=TwiML},28905:(t,e,i)=>{"use strict";var n=i(31669);var o=i(18671);function VoiceResponse(){o.call(this);this._propertyName="response"}VoiceResponse.prototype=Object.create(o.prototype);VoiceResponse.prototype.constructor=VoiceResponse;VoiceResponse.prototype.connect=function connect(t){return new Connect(this.response.ele("Connect",t))};VoiceResponse.prototype.dial=function dial(t,e){return new Dial(this.response.ele("Dial",t,e))};VoiceResponse.prototype.echo=function echo(t){return new Echo(this.response.ele("Echo",t))};VoiceResponse.prototype.enqueue=function enqueue(t,e){return new Enqueue(this.response.ele("Enqueue",t,e))};VoiceResponse.prototype.gather=function gather(t){return new Gather(this.response.ele("Gather",t))};VoiceResponse.prototype.hangup=function hangup(t){return new Hangup(this.response.ele("Hangup",t))};VoiceResponse.prototype.leave=function leave(t){return new Leave(this.response.ele("Leave",t))};VoiceResponse.prototype.pause=function pause(t){return new Pause(this.response.ele("Pause",t))};VoiceResponse.prototype.play=function play(t,e){return new Play(this.response.ele("Play",t,e))};VoiceResponse.prototype.queue=function queue(t,e){return new Queue(this.response.ele("Queue",t,e))};VoiceResponse.prototype.record=function record(t){return new Record(this.response.ele("Record",t))};VoiceResponse.prototype.redirect=function redirect(t,e){return new Redirect(this.response.ele("Redirect",t,e))};VoiceResponse.prototype.reject=function reject(t){return new Reject(this.response.ele("Reject",t))};VoiceResponse.prototype.say=function say(t,e){return new Say(this.response.ele("Say",t,e))};VoiceResponse.prototype.sms=function sms(t,e){return new Sms(this.response.ele("Sms",t,e))};VoiceResponse.prototype.pay=function pay(t){return new Pay(this.response.ele("Pay",t))};VoiceResponse.prototype.prompt=function prompt(t){return new Prompt(this.response.ele("Prompt",t))};VoiceResponse.prototype.start=function start(t){return new Start(this.response.ele("Start",t))};VoiceResponse.prototype.stop=function stop(t){return new Stop(this.response.ele("Stop",t))};VoiceResponse.prototype.refer=function refer(t){return new Refer(this.response.ele("Refer",t))};function Refer(t){this.refer=t;this._propertyName="refer"}Refer.prototype=Object.create(o.prototype);Refer.prototype.constructor=Refer;Refer.prototype.sip=function sip(t,e){return new ReferSip(this.refer.ele("Sip",t,e))};Refer.prototype.referSip=n.deprecate(function referSip(t,e){return this.sip(t,e)},"referSip() is deprecated. Use sip() instead.");function ReferSip(t){this.referSip=t;this._propertyName="referSip"}ReferSip.prototype=Object.create(o.prototype);ReferSip.prototype.constructor=ReferSip;function Stop(t){this.stop=t;this._propertyName="stop"}Stop.prototype=Object.create(o.prototype);Stop.prototype.constructor=Stop;Stop.prototype.stream=function stream(t){return new Stream(this.stop.ele("Stream",t))};Stop.prototype.siprec=function siprec(t){return new Siprec(this.stop.ele("Siprec",t))};function Siprec(t){this.siprec=t;this._propertyName="siprec"}Siprec.prototype=Object.create(o.prototype);Siprec.prototype.constructor=Siprec;Siprec.prototype.parameter=function parameter(t){return new Parameter(this.siprec.ele("Parameter",t))};function Parameter(t){this.parameter=t;this._propertyName="parameter"}Parameter.prototype=Object.create(o.prototype);Parameter.prototype.constructor=Parameter;function Stream(t){this.stream=t;this._propertyName="stream"}Stream.prototype=Object.create(o.prototype);Stream.prototype.constructor=Stream;Stream.prototype.parameter=function parameter(t){return new Parameter(this.stream.ele("Parameter",t))};function Start(t){this.start=t;this._propertyName="start"}Start.prototype=Object.create(o.prototype);Start.prototype.constructor=Start;Start.prototype.stream=function stream(t){return new Stream(this.start.ele("Stream",t))};Start.prototype.siprec=function siprec(t){return new Siprec(this.start.ele("Siprec",t))};function Prompt(t){this.prompt=t;this._propertyName="prompt"}Prompt.prototype=Object.create(o.prototype);Prompt.prototype.constructor=Prompt;Prompt.prototype.say=function say(t,e){return new Say(this.prompt.ele("Say",t,e))};Prompt.prototype.play=function play(t,e){return new Play(this.prompt.ele("Play",t,e))};Prompt.prototype.pause=function pause(t){return new Pause(this.prompt.ele("Pause",t))};function Pause(t){this.pause=t;this._propertyName="pause"}Pause.prototype=Object.create(o.prototype);Pause.prototype.constructor=Pause;function Play(t){this.play=t;this._propertyName="play"}Play.prototype=Object.create(o.prototype);Play.prototype.constructor=Play;function Say(t){this.say=t;this._propertyName="say"}Say.prototype=Object.create(o.prototype);Say.prototype.constructor=Say;Say.prototype.break_=function break_(t){return new SsmlBreak(this.say.ele("break",t))};Say.prototype.ssmlBreak=n.deprecate(function ssmlBreak(t){return this.break_(t)},"ssmlBreak() is deprecated. Use break_() instead.");Say.prototype.emphasis=function emphasis(t,e){return new SsmlEmphasis(this.say.ele("emphasis",t,e))};Say.prototype.ssmlEmphasis=n.deprecate(function ssmlEmphasis(t,e){return this.emphasis(t,e)},"ssmlEmphasis() is deprecated. Use emphasis() instead.");Say.prototype.lang=function lang(t,e){return new SsmlLang(this.say.ele("lang",t,e))};Say.prototype.ssmlLang=n.deprecate(function ssmlLang(t,e){return this.lang(t,e)},"ssmlLang() is deprecated. Use lang() instead.");Say.prototype.p=function p(t,e){return new SsmlP(this.say.ele("p",t,e))};Say.prototype.ssmlP=n.deprecate(function ssmlP(t,e){return this.p(t,e)},"ssmlP() is deprecated. Use p() instead.");Say.prototype.phoneme=function phoneme(t,e){return new SsmlPhoneme(this.say.ele("phoneme",t,e))};Say.prototype.ssmlPhoneme=n.deprecate(function ssmlPhoneme(t,e){return this.phoneme(t,e)},"ssmlPhoneme() is deprecated. Use phoneme() instead.");Say.prototype.prosody=function prosody(t,e){return new SsmlProsody(this.say.ele("prosody",t,e))};Say.prototype.ssmlProsody=n.deprecate(function ssmlProsody(t,e){return this.prosody(t,e)},"ssmlProsody() is deprecated. Use prosody() instead.");Say.prototype.s=function s(t,e){return new SsmlS(this.say.ele("s",t,e))};Say.prototype.ssmlS=n.deprecate(function ssmlS(t,e){return this.s(t,e)},"ssmlS() is deprecated. Use s() instead.");Say.prototype.sayAs=function sayAs(t,e){return new SsmlSayAs(this.say.ele("say-as",t,e))};Say.prototype.ssmlSayAs=n.deprecate(function ssmlSayAs(t,e){return this.sayAs(t,e)},"ssmlSayAs() is deprecated. Use sayAs() instead.");Say.prototype.sub=function sub(t,e){return new SsmlSub(this.say.ele("sub",t,e))};Say.prototype.ssmlSub=n.deprecate(function ssmlSub(t,e){return this.sub(t,e)},"ssmlSub() is deprecated. Use sub() instead.");Say.prototype.w=function w(t,e){return new SsmlW(this.say.ele("w",t,e))};Say.prototype.ssmlW=n.deprecate(function ssmlW(t,e){return this.w(t,e)},"ssmlW() is deprecated. Use w() instead.");function SsmlW(t){this.ssmlW=t;this._propertyName="ssmlW"}SsmlW.prototype=Object.create(o.prototype);SsmlW.prototype.constructor=SsmlW;function SsmlSub(t){this.ssmlSub=t;this._propertyName="ssmlSub"}SsmlSub.prototype=Object.create(o.prototype);SsmlSub.prototype.constructor=SsmlSub;function SsmlSayAs(t){this.ssmlSayAs=t;this._propertyName="ssmlSayAs"}SsmlSayAs.prototype=Object.create(o.prototype);SsmlSayAs.prototype.constructor=SsmlSayAs;function SsmlS(t){this.ssmlS=t;this._propertyName="ssmlS"}SsmlS.prototype=Object.create(o.prototype);SsmlS.prototype.constructor=SsmlS;function SsmlProsody(t){this.ssmlProsody=t;this._propertyName="ssmlProsody"}SsmlProsody.prototype=Object.create(o.prototype);SsmlProsody.prototype.constructor=SsmlProsody;function SsmlPhoneme(t){this.ssmlPhoneme=t;this._propertyName="ssmlPhoneme"}SsmlPhoneme.prototype=Object.create(o.prototype);SsmlPhoneme.prototype.constructor=SsmlPhoneme;function SsmlP(t){this.ssmlP=t;this._propertyName="ssmlP"}SsmlP.prototype=Object.create(o.prototype);SsmlP.prototype.constructor=SsmlP;function SsmlLang(t){this.ssmlLang=t;this._propertyName="ssmlLang"}SsmlLang.prototype=Object.create(o.prototype);SsmlLang.prototype.constructor=SsmlLang;function SsmlEmphasis(t){this.ssmlEmphasis=t;this._propertyName="ssmlEmphasis"}SsmlEmphasis.prototype=Object.create(o.prototype);SsmlEmphasis.prototype.constructor=SsmlEmphasis;function SsmlBreak(t){this.ssmlBreak=t;this._propertyName="ssmlBreak"}SsmlBreak.prototype=Object.create(o.prototype);SsmlBreak.prototype.constructor=SsmlBreak;function Pay(t){this.pay=t;this._propertyName="pay"}Pay.prototype=Object.create(o.prototype);Pay.prototype.constructor=Pay;Pay.prototype.prompt=function prompt(t){return new Prompt(this.pay.ele("Prompt",t))};Pay.prototype.parameter=function parameter(t){return new Parameter(this.pay.ele("Parameter",t))};function Sms(t){this.sms=t;this._propertyName="sms"}Sms.prototype=Object.create(o.prototype);Sms.prototype.constructor=Sms;function Reject(t){this.reject=t;this._propertyName="reject"}Reject.prototype=Object.create(o.prototype);Reject.prototype.constructor=Reject;function Redirect(t){this.redirect=t;this._propertyName="redirect"}Redirect.prototype=Object.create(o.prototype);Redirect.prototype.constructor=Redirect;function Record(t){this.record=t;this._propertyName="record"}Record.prototype=Object.create(o.prototype);Record.prototype.constructor=Record;function Queue(t){this.queue=t;this._propertyName="queue"}Queue.prototype=Object.create(o.prototype);Queue.prototype.constructor=Queue;function Leave(t){this.leave=t;this._propertyName="leave"}Leave.prototype=Object.create(o.prototype);Leave.prototype.constructor=Leave;function Hangup(t){this.hangup=t;this._propertyName="hangup"}Hangup.prototype=Object.create(o.prototype);Hangup.prototype.constructor=Hangup;function Gather(t){this.gather=t;this._propertyName="gather"}Gather.prototype=Object.create(o.prototype);Gather.prototype.constructor=Gather;Gather.prototype.say=function say(t,e){return new Say(this.gather.ele("Say",t,e))};Gather.prototype.pause=function pause(t){return new Pause(this.gather.ele("Pause",t))};Gather.prototype.play=function play(t,e){return new Play(this.gather.ele("Play",t,e))};function Enqueue(t){this.enqueue=t;this._propertyName="enqueue"}Enqueue.prototype=Object.create(o.prototype);Enqueue.prototype.constructor=Enqueue;Enqueue.prototype.task=function task(t,e){return new Task(this.enqueue.ele("Task",t,e))};function Task(t){this.task=t;this._propertyName="task"}Task.prototype=Object.create(o.prototype);Task.prototype.constructor=Task;function Echo(t){this.echo=t;this._propertyName="echo"}Echo.prototype=Object.create(o.prototype);Echo.prototype.constructor=Echo;function Dial(t){this.dial=t;this._propertyName="dial"}Dial.prototype=Object.create(o.prototype);Dial.prototype.constructor=Dial;Dial.prototype.client=function client(t,e){return new Client(this.dial.ele("Client",t,e))};Dial.prototype.conference=function conference(t,e){return new Conference(this.dial.ele("Conference",t,e))};Dial.prototype.number=function number(t,e){return new Number(this.dial.ele("Number",t,e))};Dial.prototype.queue=function queue(t,e){return new Queue(this.dial.ele("Queue",t,e))};Dial.prototype.sim=function sim(t,e){return new Sim(this.dial.ele("Sim",t,e))};Dial.prototype.sip=function sip(t,e){return new Sip(this.dial.ele("Sip",t,e))};function Sip(t){this.sip=t;this._propertyName="sip"}Sip.prototype=Object.create(o.prototype);Sip.prototype.constructor=Sip;function Sim(t){this.sim=t;this._propertyName="sim"}Sim.prototype=Object.create(o.prototype);Sim.prototype.constructor=Sim;function Number(t){this.number=t;this._propertyName="number"}Number.prototype=Object.create(o.prototype);Number.prototype.constructor=Number;function Conference(t){this.conference=t;this._propertyName="conference"}Conference.prototype=Object.create(o.prototype);Conference.prototype.constructor=Conference;function Client(t){this.client=t;this._propertyName="client"}Client.prototype=Object.create(o.prototype);Client.prototype.constructor=Client;Client.prototype.identity=function identity(t,e){return new Identity(this.client.ele("Identity",t,e))};Client.prototype.parameter=function parameter(t){return new Parameter(this.client.ele("Parameter",t))};function Identity(t){this.identity=t;this._propertyName="identity"}Identity.prototype=Object.create(o.prototype);Identity.prototype.constructor=Identity;function Connect(t){this.connect=t;this._propertyName="connect"}Connect.prototype=Object.create(o.prototype);Connect.prototype.constructor=Connect;Connect.prototype.room=function room(t,e){return new Room(this.connect.ele("Room",t,e))};Connect.prototype.autopilot=function autopilot(t,e){return new Autopilot(this.connect.ele("Autopilot",t,e))};Connect.prototype.stream=function stream(t){return new Stream(this.connect.ele("Stream",t))};function Autopilot(t){this.autopilot=t;this._propertyName="autopilot"}Autopilot.prototype=Object.create(o.prototype);Autopilot.prototype.constructor=Autopilot;function Room(t){this.room=t;this._propertyName="room"}Room.prototype=Object.create(o.prototype);Room.prototype.constructor=Room;t.exports=VoiceResponse},19149:(t,e,i)=>{"use strict";var n=i(76417);var o=i(90250);var s=i(8812);var r=i(78835);var c=i(25682);function buildUrlWithStandardPort(t){let e="";const i=t.protocol==="https:"?":443":":80";e+=t.protocol?t.protocol+"//":"";e+=t.username;e+=t.password?":"+t.password:"";e+=t.username||t.password?"@":"";e+=t.host?t.host+i:"";e+=t.pathname+t.query+t.hash;return e}function addPort(t){if(!t.port){return buildUrlWithStandardPort(t)}return t.toString()}function removePort(t){t.set("port","");return t.toString()}function getExpectedTwilioSignature(t,e,i){if(e.indexOf("bodySHA256")!==-1){i={}}var o=Object.keys(i).sort().reduce((t,e)=>t+e+i[e],e);return n.createHmac("sha1",t).update(Buffer.from(o,"utf-8")).digest("base64")}function getExpectedBodyHash(t){return n.createHash("sha256").update(Buffer.from(t,"utf-8")).digest("hex")}function validateRequest(t,e,i,n){e=e||"";const o=new c(i);const r=addPort(o);const a=removePort(o);const u=getExpectedTwilioSignature(t,r,n);const h=getExpectedTwilioSignature(t,a,n);const f=s(Buffer.from(e),Buffer.from(u));const p=s(Buffer.from(e),Buffer.from(h));return p||f}function validateBody(t,e){var i=getExpectedBodyHash(t);return s(Buffer.from(e),Buffer.from(i))}function validateRequestWithBody(t,e,i,n){const o=new c(i,true);return validateRequest(t,e,i,{})&&validateBody(n,o.query.bodySHA256)}function validateExpressRequest(t,e,i){var n=i||{};var o;if(n.url){o=n.url}else{var s=n.protocol||t.protocol;var c=n.host||t.headers.host;o=r.format({protocol:s,host:c,pathname:t.originalUrl});if(t.originalUrl.search(/\?/)>=0){o=o.replace(/%3F/g,"?");o=o.replace(/%3A/g,":");o=o.replace(/%40/g,"@")}}if(o.indexOf("bodySHA256")>0){return validateRequestWithBody(e,t.header("X-Twilio-Signature"),o,t.body||{})}else{return validateRequest(e,t.header("X-Twilio-Signature"),o,t.body||{})}}function webhook(){var t={validate:true};var e;for(var i=0,n=arguments.length;i{"use strict";var n=i(44742),o=i(13319),s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,r=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,c="[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]",a=new RegExp("^"+c+"+");function trimLeft(t){return(t?t:"").toString().replace(a,"")}var u=[["#","hash"],["?","query"],function sanitize(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",undefined,1,1],[/:(\d+)$/,"port",undefined,1],[NaN,"hostname",undefined,1,1]];var h={hash:1,query:1};function lolcation(t){var e;if(typeof window!=="undefined")e=window;else if(typeof global!=="undefined")e=global;else if(typeof self!=="undefined")e=self;else e={};var i=e.location||{};t=t||i;var n={},o=typeof t,r;if("blob:"===t.protocol){n=new Url(unescape(t.pathname),{})}else if("string"===o){n=new Url(t,{});for(r in h)delete n[r]}else if("object"===o){for(r in t){if(r in h)continue;n[r]=t[r]}if(n.slashes===undefined){n.slashes=s.test(t.href)}}return n}function extractProtocol(t){t=trimLeft(t);var e=r.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function resolve(t,e){if(t==="")return e;var i=(e||"/").split("/").slice(0,-1).concat(t.split("/")),n=i.length,o=i[n-1],s=false,r=0;while(n--){if(i[n]==="."){i.splice(n,1)}else if(i[n]===".."){i.splice(n,1);r++}else if(r){if(n===0)s=true;i.splice(n,1);r--}}if(s)i.unshift("");if(o==="."||o==="..")i.push("");return i.join("/")}function Url(t,e,i){t=trimLeft(t);if(!(this instanceof Url)){return new Url(t,e,i)}var s,r,c,a,h,f,p=u.slice(),d=typeof e,l=this,v=0;if("object"!==d&&"string"!==d){i=e;e=null}if(i&&"function"!==typeof i)i=o.parse;e=lolcation(e);r=extractProtocol(t||"");s=!r.protocol&&!r.slashes;l.slashes=r.slashes||s&&e.slashes;l.protocol=r.protocol||e.protocol||"";t=r.rest;if(!r.slashes)p[3]=[/(.*)/,"pathname"];for(;v{(function WeakMapModule(){"use strict";if(typeof ses!=="undefined"&&ses.ok&&!ses.ok()){return}function weakMapPermitHostObjects(t){if(t.permitHostObjects___){t.permitHostObjects___(weakMapPermitHostObjects)}}if(typeof ses!=="undefined"){ses.weakMapPermitHostObjects=weakMapPermitHostObjects}var e=false;if(typeof WeakMap==="function"){var i=WeakMap;if(typeof navigator!=="undefined"&&/Firefox/.test(navigator.userAgent)){}else{var n=new i;var o=Object.freeze({});n.set(o,1);if(n.get(o)!==1){e=true}else{t.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty;var r=Object.getOwnPropertyNames;var c=Object.defineProperty;var a=Object.isExtensible;var u="weakmap:";var h=u+"ident:"+Math.random()+"___";if(typeof crypto!=="undefined"&&typeof crypto.getRandomValues==="function"&&typeof ArrayBuffer==="function"&&typeof Uint8Array==="function"){var f=new ArrayBuffer(25);var p=new Uint8Array(f);crypto.getRandomValues(p);h=u+"rand:"+Array.prototype.map.call(p,function(t){return(t%36).toString(36)}).join("")+"___"}function isNotHiddenName(t){return!(t.substr(0,u.length)==u&&t.substr(t.length-3)==="___")}c(Object,"getOwnPropertyNames",{value:function fakeGetOwnPropertyNames(t){return r(t).filter(isNotHiddenName)}});if("getPropertyNames"in Object){var d=Object.getPropertyNames;c(Object,"getPropertyNames",{value:function fakeGetPropertyNames(t){return d(t).filter(isNotHiddenName)}})}function getHiddenRecord(t){if(t!==Object(t)){throw new TypeError("Not an object: "+t)}var e=t[h];if(e&&e.key===t){return e}if(!a(t)){return void 0}e={key:t};try{c(t,h,{value:e,writable:false,enumerable:false,configurable:false});return e}catch(t){return void 0}}(function(){var t=Object.freeze;c(Object,"freeze",{value:function identifyingFreeze(e){getHiddenRecord(e);return t(e)}});var e=Object.seal;c(Object,"seal",{value:function identifyingSeal(t){getHiddenRecord(t);return e(t)}});var i=Object.preventExtensions;c(Object,"preventExtensions",{value:function identifyingPreventExtensions(t){getHiddenRecord(t);return i(t)}})})();function constFunc(t){t.prototype=null;return Object.freeze(t)}var l=false;function calledAsFunctionWarning(){if(!l&&typeof console!=="undefined"){l=true;console.warn("WeakMap should be invoked as new WeakMap(), not "+"WeakMap(). This will be an error in the future.")}}var v=0;var m=function(){if(!(this instanceof m)){calledAsFunctionWarning()}var t=[];var e=[];var i=v++;function get___(n,o){var s;var r=getHiddenRecord(n);if(r){return i in r?r[i]:o}else{s=t.indexOf(n);return s>=0?e[s]:o}}function has___(e){var n=getHiddenRecord(e);if(n){return i in n}else{return t.indexOf(e)>=0}}function set___(n,o){var s;var r=getHiddenRecord(n);if(r){r[i]=o}else{s=t.indexOf(n);if(s>=0){e[s]=o}else{s=t.length;e[s]=o;t[s]=n}}return this}function delete___(n){var o=getHiddenRecord(n);var s,r;if(o){return i in o&&delete o[i]}else{s=t.indexOf(n);if(s<0){return false}r=t.length-1;t[s]=void 0;e[s]=e[r];t[s]=t[r];t.length=r;e.length=r;return true}}return Object.create(m.prototype,{get___:{value:constFunc(get___)},has___:{value:constFunc(has___)},set___:{value:constFunc(set___)},delete___:{value:constFunc(delete___)}})};m.prototype=Object.create(Object.prototype,{get:{value:function get(t,e){return this.get___(t,e)},writable:true,configurable:true},has:{value:function has(t){return this.has___(t)},writable:true,configurable:true},set:{value:function set(t,e){return this.set___(t,e)},writable:true,configurable:true},delete:{value:function remove(t){return this.delete___(t)},writable:true,configurable:true}});if(typeof i==="function"){(function(){if(e&&typeof Proxy!=="undefined"){Proxy=undefined}function DoubleWeakMap(){if(!(this instanceof m)){calledAsFunctionWarning()}var t=new i;var n=undefined;var o=false;function dget(e,i){if(n){return t.has(e)?t.get(e):n.get___(e,i)}else{return t.get(e,i)}}function dhas(e){return t.has(e)||(n?n.has___(e):false)}var s;if(e){s=function(e,i){t.set(e,i);if(!t.has(e)){if(!n){n=new m}n.set(e,i)}return this}}else{s=function(e,i){if(o){try{t.set(e,i)}catch(t){if(!n){n=new m}n.set___(e,i)}}else{t.set(e,i)}return this}}function ddelete(e){var i=!!t["delete"](e);if(n){return n.delete___(e)||i}return i}return Object.create(m.prototype,{get___:{value:constFunc(dget)},has___:{value:constFunc(dhas)},set___:{value:constFunc(s)},delete___:{value:constFunc(ddelete)},permitHostObjects___:{value:constFunc(function(t){if(t===weakMapPermitHostObjects){o=true}else{throw new Error("bogus call to permitHostObjects___")}})}})}DoubleWeakMap.prototype=m.prototype;t.exports=DoubleWeakMap;Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:false,configurable:true,writable:true})})()}else{if(typeof Proxy!=="undefined"){Proxy=undefined}t.exports=m}})()},52839:function(t){(function(){t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},29267:function(t){(function(){t.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},58229:function(t){(function(){var e,i,n,o,s,r,c,a={}.hasOwnProperty;e=function(t,...e){var i,n,o,r;if(s(Object.assign)){Object.assign.apply(null,arguments)}else{for(i=0,o=e.length;i"}else{return"attribute: {"+t+"}, parent: <"+this.parent.name+">"}}isEqualNode(t){if(t.namespaceURI!==this.namespaceURI){return false}if(t.prefix!==this.prefix){return false}if(t.localName!==this.localName){return false}if(t.value!==this.value){return false}return true}}Object.defineProperty(XMLAttribute.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLAttribute.prototype,"ownerElement",{get:function(){return this.parent}});Object.defineProperty(XMLAttribute.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}});Object.defineProperty(XMLAttribute.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLAttribute.prototype,"specified",{get:function(){return true}});return XMLAttribute}.call(this)}).call(this)},90333:function(t,e,i){(function(){var e,n,o;e=i(29267);o=i(87709);t.exports=n=class XMLCData extends o{constructor(t,i){super(t);if(i==null){throw new Error("Missing CDATA text. "+this.debugInfo())}this.name="#cdata-section";this.type=e.CData;this.value=this.stringify.cdata(i)}clone(){return Object.create(this)}toString(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))}}}).call(this)},87709:function(t,e,i){(function(){var e,n;n=i(67608);t.exports=e=function(){class XMLCharacterData extends n{constructor(t){super(t);this.value=""}clone(){return Object.create(this)}substringData(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendData(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}insertData(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}deleteData(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceData(t,e,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(t){if(!super.isEqualNode(t)){return false}if(t.data!==this.data){return false}return true}}Object.defineProperty(XMLCharacterData.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}});Object.defineProperty(XMLCharacterData.prototype,"length",{get:function(){return this.value.length}});Object.defineProperty(XMLCharacterData.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}});return XMLCharacterData}.call(this)}).call(this)},74407:function(t,e,i){(function(){var e,n,o;e=i(29267);n=i(87709);t.exports=o=class XMLComment extends n{constructor(t,i){super(t);if(i==null){throw new Error("Missing comment text. "+this.debugInfo())}this.name="#comment";this.type=e.Comment;this.value=this.stringify.comment(i)}clone(){return Object.create(this)}toString(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))}}}).call(this)},67465:function(t,e,i){(function(){var e,n,o;n=i(46744);o=i(97028);t.exports=e=function(){class XMLDOMConfiguration{constructor(){var t;this.defaultParams={"canonical-form":false,"cdata-sections":false,comments:false,"datatype-normalization":false,"element-content-whitespace":true,entities:true,"error-handler":new n,infoset:true,"validate-if-schema":false,namespaces:true,"namespace-declarations":true,"normalize-characters":false,"schema-location":"","schema-type":"","split-cdata-sections":true,validate:false,"well-formed":true};this.params=t=Object.create(this.defaultParams)}getParameter(t){if(this.params.hasOwnProperty(t)){return this.params[t]}else{return null}}canSetParameter(t,e){return true}setParameter(t,e){if(e!=null){return this.params[t]=e}else{return delete this.params[t]}}}Object.defineProperty(XMLDOMConfiguration.prototype,"parameterNames",{get:function(){return new o(Object.keys(this.defaultParams))}});return XMLDOMConfiguration}.call(this)}).call(this)},46744:function(t){(function(){var e;t.exports=e=class XMLDOMErrorHandler{constructor(){}handleError(t){throw new Error(t)}}}).call(this)},78310:function(t){(function(){var e;t.exports=e=class XMLDOMImplementation{hasFeature(t,e){return true}createDocumentType(t,e,i){throw new Error("This DOM method is not implemented.")}createDocument(t,e,i){throw new Error("This DOM method is not implemented.")}createHTMLDocument(t){throw new Error("This DOM method is not implemented.")}getFeature(t,e){throw new Error("This DOM method is not implemented.")}}}).call(this)},97028:function(t){(function(){var e;t.exports=e=function(){class XMLDOMStringList{constructor(t){this.arr=t||[]}item(t){return this.arr[t]||null}contains(t){return this.arr.indexOf(t)!==-1}}Object.defineProperty(XMLDOMStringList.prototype,"length",{get:function(){return this.arr.length}});return XMLDOMStringList}.call(this)}).call(this)},81015:function(t,e,i){(function(){var e,n,o;o=i(67608);e=i(29267);t.exports=n=class XMLDTDAttList extends o{constructor(t,i,n,o,s,r){super(t);if(i==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(n==null){throw new Error("Missing DTD attribute name. "+this.debugInfo(i))}if(!o){throw new Error("Missing DTD attribute type. "+this.debugInfo(i))}if(!s){throw new Error("Missing DTD attribute default. "+this.debugInfo(i))}if(s.indexOf("#")!==0){s="#"+s}if(!s.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)){throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(i))}if(r&&!s.match(/^(#FIXED|#DEFAULT)$/)){throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(i))}this.elementName=this.stringify.name(i);this.type=e.AttributeDeclaration;this.attributeName=this.stringify.name(n);this.attributeType=this.stringify.dtdAttType(o);if(r){this.defaultValue=this.stringify.dtdAttDefault(r)}this.defaultValueType=s}toString(t){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(t))}}}).call(this)},52421:function(t,e,i){(function(){var e,n,o;o=i(67608);e=i(29267);t.exports=n=class XMLDTDElement extends o{constructor(t,i,n){super(t);if(i==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(!n){n="(#PCDATA)"}if(Array.isArray(n)){n="("+n.join(",")+")"}this.name=this.stringify.name(i);this.type=e.ElementDeclaration;this.value=this.stringify.dtdElementValue(n)}toString(t){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(t))}}}).call(this)},40053:function(t,e,i){(function(){var e,n,o,s;({isObject:s}=i(58229));o=i(67608);e=i(29267);t.exports=n=function(){class XMLDTDEntity extends o{constructor(t,i,n,o){super(t);if(n==null){throw new Error("Missing DTD entity name. "+this.debugInfo(n))}if(o==null){throw new Error("Missing DTD entity value. "+this.debugInfo(n))}this.pe=!!i;this.name=this.stringify.name(n);this.type=e.EntityDeclaration;if(!s(o)){this.value=this.stringify.dtdEntityValue(o);this.internal=true}else{if(!o.pubID&&!o.sysID){throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n))}if(o.pubID&&!o.sysID){throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n))}this.internal=false;if(o.pubID!=null){this.pubID=this.stringify.dtdPubID(o.pubID)}if(o.sysID!=null){this.sysID=this.stringify.dtdSysID(o.sysID)}if(o.nData!=null){this.nData=this.stringify.dtdNData(o.nData)}if(this.pe&&this.nData){throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}}toString(t){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(t))}}Object.defineProperty(XMLDTDEntity.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDEntity.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDTDEntity.prototype,"notationName",{get:function(){return this.nData||null}});Object.defineProperty(XMLDTDEntity.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlVersion",{get:function(){return null}});return XMLDTDEntity}.call(this)}).call(this)},82837:function(t,e,i){(function(){var e,n,o;o=i(67608);e=i(29267);t.exports=n=function(){class XMLDTDNotation extends o{constructor(t,i,n){super(t);if(i==null){throw new Error("Missing DTD notation name. "+this.debugInfo(i))}if(!n.pubID&&!n.sysID){throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(i))}this.name=this.stringify.name(i);this.type=e.NotationDeclaration;if(n.pubID!=null){this.pubID=this.stringify.dtdPubID(n.pubID)}if(n.sysID!=null){this.sysID=this.stringify.dtdSysID(n.sysID)}}toString(t){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(t))}}Object.defineProperty(XMLDTDNotation.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDNotation.prototype,"systemId",{get:function(){return this.sysID}});return XMLDTDNotation}.call(this)}).call(this)},46364:function(t,e,i){(function(){var e,n,o,s;({isObject:s}=i(58229));o=i(67608);e=i(29267);t.exports=n=class XMLDeclaration extends o{constructor(t,i,n,o){super(t);if(s(i)){({version:i,encoding:n,standalone:o}=i)}if(!i){i="1.0"}this.type=e.Declaration;this.version=this.stringify.xmlVersion(i);if(n!=null){this.encoding=this.stringify.xmlEncoding(n)}if(o!=null){this.standalone=this.stringify.xmlStandalone(o)}}toString(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))}}}).call(this)},81801:function(t,e,i){(function(){var e,n,o,s,r,c,a,u,h;({isObject:h}=i(58229));u=i(67608);e=i(29267);n=i(81015);s=i(40053);o=i(52421);r=i(82837);a=i(4361);t.exports=c=function(){class XMLDocType extends u{constructor(t,i,n){var o,s,r,c;super(t);this.type=e.DocType;if(t.children){c=t.children;for(s=0,r=c.length;s=0){this.up()}return this.onEnd()}openCurrent(){if(this.currentNode){this.currentNode.children=true;return this.openNode(this.currentNode)}}openNode(t){var i,o,s,r;if(!t.isOpen){if(!this.root&&this.currentLevel===0&&t.type===e.Element){this.root=t}o="";if(t.type===e.Element){this.writerOptions.state=n.OpenTag;o=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<"+t.name;r=t.attribs;for(s in r){if(!O.call(r,s))continue;i=r[s];o+=this.writer.attribute(i,this.writerOptions,this.currentLevel)}o+=(t.children?">":"/>")+this.writer.endline(t,this.writerOptions,this.currentLevel);this.writerOptions.state=n.InsideTag}else{this.writerOptions.state=n.OpenTag;o=this.writer.indent(t,this.writerOptions,this.currentLevel)+""}o+=this.writer.endline(t,this.writerOptions,this.currentLevel)}this.onData(o,this.currentLevel);return t.isOpen=true}}closeNode(t){var i;if(!t.isClosed){i="";this.writerOptions.state=n.CloseTag;if(t.type===e.Element){i=this.writer.indent(t,this.writerOptions,this.currentLevel)+""+this.writer.endline(t,this.writerOptions,this.currentLevel)}else{i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(t,this.writerOptions,this.currentLevel)}this.writerOptions.state=n.None;this.onData(i,this.currentLevel);return t.isClosed=true}}onData(t,e){this.documentStarted=true;return this.onDataCallback(t,e+1)}onEnd(){this.documentCompleted=true;return this.onEndCallback()}debugInfo(t){if(t==null){return""}else{return"node: <"+t+">"}}ele(){return this.element(...arguments)}nod(t,e,i){return this.node(t,e,i)}txt(t){return this.text(t)}dat(t){return this.cdata(t)}com(t){return this.comment(t)}ins(t,e){return this.instruction(t,e)}dec(t,e,i){return this.declaration(t,e,i)}dtd(t,e,i){return this.doctype(t,e,i)}e(t,e,i){return this.element(t,e,i)}n(t,e,i){return this.node(t,e,i)}t(t){return this.text(t)}d(t){return this.cdata(t)}c(t){return this.comment(t)}r(t){return this.raw(t)}i(t,e){return this.instruction(t,e)}att(){if(this.currentNode&&this.currentNode.type===e.DocType){return this.attList(...arguments)}else{return this.attribute(...arguments)}}a(){if(this.currentNode&&this.currentNode.type===e.DocType){return this.attList(...arguments)}else{return this.attribute(...arguments)}}ent(t,e){return this.entity(t,e)}pent(t,e){return this.pEntity(t,e)}not(t,e){return this.notation(t,e)}}}).call(this)},43590:function(t,e,i){(function(){var e,n,o;o=i(67608);e=i(29267);t.exports=n=class XMLDummy extends o{constructor(t){super(t);this.type=e.Dummy}clone(){return Object.create(this)}toString(t){return""}}}).call(this)},9437:function(t,e,i){(function(){var e,n,o,s,r,c,a,u,h={}.hasOwnProperty;({isObject:u,isFunction:a,getValue:c}=i(58229));r=i(67608);e=i(29267);n=i(58376);s=i(4361);t.exports=o=function(){class XMLElement extends r{constructor(t,i,n){var o,s,r,c;super(t);if(i==null){throw new Error("Missing element name. "+this.debugInfo())}this.name=this.stringify.name(i);this.type=e.Element;this.attribs={};this.schemaTypeInfo=null;if(n!=null){this.attribute(n)}if(t.type===e.Document){this.isRoot=true;this.documentObject=t;t.rootObject=this;if(t.children){c=t.children;for(s=0,r=c.length;s=n;e=0<=n?++i:--i){if(!this.attribs[e].isEqualNode(t.attribs[e])){return false}}return true}}Object.defineProperty(XMLElement.prototype,"tagName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"attributes",{get:function(){if(!this.attributeMap||!this.attributeMap.nodes){this.attributeMap=new s(this.attribs)}return this.attributeMap}});return XMLElement}.call(this)}).call(this)},4361:function(t){(function(){var e;t.exports=e=function(){class XMLNamedNodeMap{constructor(t){this.nodes=t}clone(){return this.nodes=null}getNamedItem(t){return this.nodes[t]}setNamedItem(t){var e;e=this.nodes[t.nodeName];this.nodes[t.nodeName]=t;return e||null}removeNamedItem(t){var e;e=this.nodes[t];delete this.nodes[t];return e||null}item(t){return this.nodes[Object.keys(this.nodes)[t]]||null}getNamedItemNS(t,e){throw new Error("This DOM method is not implemented.")}setNamedItemNS(t){throw new Error("This DOM method is not implemented.")}removeNamedItemNS(t,e){throw new Error("This DOM method is not implemented.")}}Object.defineProperty(XMLNamedNodeMap.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}});return XMLNamedNodeMap}.call(this)}).call(this)},67608:function(t,e,i){(function(){var e,n,o,s,r,c,a,u,h,f,p,d,l,v,m,_,g,y,S={}.hasOwnProperty,b=[].splice;({isObject:y,isFunction:g,isEmpty:_,getValue:m}=i(58229));u=null;o=null;s=null;r=null;c=null;l=null;v=null;d=null;a=null;n=null;p=null;h=null;e=null;t.exports=f=function(){class XMLNode{constructor(t){this.parent=t;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}this.value=null;this.children=[];this.baseURI=null;if(!u){u=i(9437);o=i(90333);s=i(74407);r=i(46364);c=i(81801);l=i(16329);v=i(21318);d=i(56939);a=i(43590);n=i(29267);p=i(36768);h=i(4361);e=i(52839)}}setParent(t){var e,i,n,o,s;this.parent=t;if(t){this.options=t.options;this.stringify=t.stringify}o=this.children;s=[];for(i=0,n=o.length;i"}else if(!((i=this.parent)!=null?i.name:void 0)){return"node: <"+t+">"}else{return"node: <"+t+">, parent: <"+this.parent.name+">"}}ele(t,e,i){return this.element(t,e,i)}nod(t,e,i){return this.node(t,e,i)}txt(t){return this.text(t)}dat(t){return this.cdata(t)}com(t){return this.comment(t)}ins(t,e){return this.instruction(t,e)}doc(){return this.document()}dec(t,e,i){return this.declaration(t,e,i)}e(t,e,i){return this.element(t,e,i)}n(t,e,i){return this.node(t,e,i)}t(t){return this.text(t)}d(t){return this.cdata(t)}c(t){return this.comment(t)}r(t){return this.raw(t)}i(t,e){return this.instruction(t,e)}u(){return this.up()}importXMLBuilder(t){return this.importDocument(t)}attribute(t,e){throw new Error("attribute() applies to element nodes only.")}att(t,e){return this.attribute(t,e)}a(t,e){return this.attribute(t,e)}removeAttribute(t){throw new Error("attribute() applies to element nodes only.")}replaceChild(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeChild(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendChild(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasChildNodes(){return this.children.length!==0}cloneNode(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalize(){throw new Error("This DOM method is not implemented."+this.debugInfo())}isSupported(t,e){return true}hasAttributes(){return this.attribs.length!==0}compareDocumentPosition(t){var i,n;i=this;if(i===t){return 0}else if(this.document()!==t.document()){n=e.Disconnected|e.ImplementationSpecific;if(Math.random()<.5){n|=e.Preceding}else{n|=e.Following}return n}else if(i.isAncestor(t)){return e.Contains|e.Preceding}else if(i.isDescendant(t)){return e.Contains|e.Following}else if(i.isPreceding(t)){return e.Preceding}else{return e.Following}}isSameNode(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupPrefix(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}isDefaultNamespace(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupNamespaceURI(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(t){var e,i,n;if(t.nodeType!==this.nodeType){return false}if(t.children.length!==this.children.length){return false}for(e=i=0,n=this.children.length-1;0<=n?i<=n:i>=n;e=0<=n?++i:--i){if(!this.children[e].isEqualNode(t.children[e])){return false}}return true}getFeature(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}setUserData(t,e,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getUserData(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}contains(t){if(!t){return false}return t===this||this.isDescendant(t)}isDescendant(t){var e,i,n,o,s;s=this.children;for(n=0,o=s.length;ni}}treePosition(t){var e,i;i=0;e=false;this.foreachTreeNode(this.document(),function(n){i++;if(!e&&n===t){return e=true}});if(e){return i}else{return-1}}foreachTreeNode(t,e){var i,n,o,s,r;t||(t=this.document());s=t.children;for(n=0,o=s.length;n0){this.stream.write(" [");this.stream.write(this.endline(t,e,i));e.state=n.InsideTag;c=t.children;for(s=0,r=c.length;s");this.stream.write(this.endline(t,e,i));e.state=n.None;return this.closeNode(t,e,i)}element(t,i,o){var s,c,a,u,h,f,p,d,l,v,m,_,g,y,S,b;o||(o=0);this.openNode(t,i,o);i.state=n.OpenTag;m=this.indent(t,i,o)+"<"+t.name;if(i.pretty&&i.width>0){p=m.length;g=t.attribs;for(l in g){if(!r.call(g,l))continue;s=g[l];_=this.attribute(s,i,o);c=_.length;if(p+c>i.width){b=this.indent(t,i,o+1)+_;m+=this.endline(t,i,o)+b;p=b.length}else{b=" "+_;m+=b;p+=b.length}}}else{y=t.attribs;for(l in y){if(!r.call(y,l))continue;s=y[l];m+=this.attribute(s,i,o)}}this.stream.write(m);u=t.children.length;h=u===0?null:t.children[0];if(u===0||t.children.every(function(t){return(t.type===e.Text||t.type===e.Raw)&&t.value===""})){if(i.allowEmpty){this.stream.write(">");i.state=n.CloseTag;this.stream.write("")}else{i.state=n.CloseTag;this.stream.write(i.spaceBeforeSlash+"/>")}}else if(i.pretty&&u===1&&(h.type===e.Text||h.type===e.Raw)&&h.value!=null){this.stream.write(">");i.state=n.InsideTag;i.suppressPrettyCount++;v=true;this.writeChildNode(h,i,o+1);i.suppressPrettyCount--;v=false;i.state=n.CloseTag;this.stream.write("")}else{this.stream.write(">"+this.endline(t,i,o));i.state=n.InsideTag;S=t.children;for(f=0,d=S.length;f")}this.stream.write(this.endline(t,i,o));i.state=n.None;return this.closeNode(t,i,o)}processingInstruction(t,e,i){return this.stream.write(super.processingInstruction(t,e,i))}raw(t,e,i){return this.stream.write(super.raw(t,e,i))}text(t,e,i){return this.stream.write(super.text(t,e,i))}dtdAttList(t,e,i){return this.stream.write(super.dtdAttList(t,e,i))}dtdElement(t,e,i){return this.stream.write(super.dtdElement(t,e,i))}dtdEntity(t,e,i){return this.stream.write(super.dtdEntity(t,e,i))}dtdNotation(t,e,i){return this.stream.write(super.dtdNotation(t,e,i))}}}).call(this)},85913:function(t,e,i){(function(){var e,n;n=i(66752);t.exports=e=class XMLStringWriter extends n{constructor(t){super(t)}document(t,e){var i,n,o,s,r;e=this.filterOptions(e);s="";r=t.children;for(n=0,o=r.length;n","]]]]>");return this.assertLegalChar(t)}comment(t){if(this.options.noValidation){return t}t=""+t||"";if(t.match(/--/)){throw new Error("Comment text cannot contain double-hypen: "+t)}return this.assertLegalChar(t)}raw(t){if(this.options.noValidation){return t}return""+t||""}attValue(t){if(this.options.noValidation){return t}return this.assertLegalChar(this.attEscape(t=""+t||""))}insTarget(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}insValue(t){if(this.options.noValidation){return t}t=""+t||"";if(t.match(/\?>/)){throw new Error("Invalid processing instruction value: "+t)}return this.assertLegalChar(t)}xmlVersion(t){if(this.options.noValidation){return t}t=""+t||"";if(!t.match(/1\.[0-9]+/)){throw new Error("Invalid version number: "+t)}return t}xmlEncoding(t){if(this.options.noValidation){return t}t=""+t||"";if(!t.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)){throw new Error("Invalid encoding: "+t)}return this.assertLegalChar(t)}xmlStandalone(t){if(this.options.noValidation){return t}if(t){return"yes"}else{return"no"}}dtdPubID(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdSysID(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdElementValue(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdAttType(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdAttDefault(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdEntityValue(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdNData(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}assertLegalChar(t){var e,i;if(this.options.noValidation){return t}e="";if(this.options.version==="1.0"){e=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(i=t.match(e)){throw new Error(`Invalid character in string: ${t} at index ${i.index}`)}}else if(this.options.version==="1.1"){e=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(i=t.match(e)){throw new Error(`Invalid character in string: ${t} at index ${i.index}`)}}return t}assertLegalName(t){var e;if(this.options.noValidation){return t}this.assertLegalChar(t);e=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;if(!t.match(e)){throw new Error("Invalid character in name")}return t}textEscape(t){var e;if(this.options.noValidation){return t}e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return t.replace(e,"&").replace(//g,">").replace(/\r/g," ")}attEscape(t){var e;if(this.options.noValidation){return t}e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return t.replace(e,"&").replace(/0){return new Array(n).join(e.indent)}}return""}endline(t,e,i){if(!e.pretty||e.suppressPrettyCount){return""}else{return e.newline}}attribute(t,e,i){var n;this.openAttribute(t,e,i);if(e.pretty&&e.width>0){n=t.name+'="'+t.value+'"'}else{n=" "+t.name+'="'+t.value+'"'}this.closeAttribute(t,e,i);return n}cdata(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+""+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}comment(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+"\x3c!-- ";e.state=n.InsideTag;o+=t.value;e.state=n.CloseTag;o+=" --\x3e"+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}declaration(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+"";o+=this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}docType(t,e,i){var o,s,r,c,a;i||(i=0);this.openNode(t,e,i);e.state=n.OpenTag;c=this.indent(t,e,i);c+="0){c+=" [";c+=this.endline(t,e,i);e.state=n.InsideTag;a=t.children;for(s=0,r=a.length;s";c+=this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return c}element(t,i,o){var s,r,c,a,u,h,f,p,d,l,v,m,_,g,S,b,w,L,I;o||(o=0);m=false;this.openNode(t,i,o);i.state=n.OpenTag;_=this.indent(t,i,o)+"<"+t.name;if(i.pretty&&i.width>0){p=_.length;S=t.attribs;for(v in S){if(!y.call(S,v))continue;s=S[v];g=this.attribute(s,i,o);r=g.length;if(p+r>i.width){I=this.indent(t,i,o+1)+g;_+=this.endline(t,i,o)+I;p=I.length}else{I=" "+g;_+=I;p+=I.length}}}else{b=t.attribs;for(v in b){if(!y.call(b,v))continue;s=b[v];_+=this.attribute(s,i,o)}}a=t.children.length;u=a===0?null:t.children[0];if(a===0||t.children.every(function(t){return(t.type===e.Text||t.type===e.Raw)&&t.value===""})){if(i.allowEmpty){_+=">";i.state=n.CloseTag;_+=""+this.endline(t,i,o)}else{i.state=n.CloseTag;_+=i.spaceBeforeSlash+"/>"+this.endline(t,i,o)}}else if(i.pretty&&a===1&&(u.type===e.Text||u.type===e.Raw)&&u.value!=null){_+=">";i.state=n.InsideTag;i.suppressPrettyCount++;m=true;_+=this.writeChildNode(u,i,o+1);i.suppressPrettyCount--;m=false;i.state=n.CloseTag;_+=""+this.endline(t,i,o)}else{if(i.dontPrettyTextNodes){w=t.children;for(h=0,d=w.length;h"+this.endline(t,i,o);i.state=n.InsideTag;L=t.children;for(f=0,l=L.length;f";if(m){i.suppressPrettyCount--}_+=this.endline(t,i,o);i.state=n.None}this.closeNode(t,i,o);return _}writeChildNode(t,i,n){switch(t.type){case e.CData:return this.cdata(t,i,n);case e.Comment:return this.comment(t,i,n);case e.Element:return this.element(t,i,n);case e.Raw:return this.raw(t,i,n);case e.Text:return this.text(t,i,n);case e.ProcessingInstruction:return this.processingInstruction(t,i,n);case e.Dummy:return"";case e.Declaration:return this.declaration(t,i,n);case e.DocType:return this.docType(t,i,n);case e.AttributeDeclaration:return this.dtdAttList(t,i,n);case e.ElementDeclaration:return this.dtdElement(t,i,n);case e.EntityDeclaration:return this.dtdEntity(t,i,n);case e.NotationDeclaration:return this.dtdNotation(t,i,n);default:throw new Error("Unknown XML node type: "+t.constructor.name)}}processingInstruction(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+"";o+=this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}raw(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i);e.state=n.InsideTag;o+=t.value;e.state=n.CloseTag;o+=this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}text(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i);e.state=n.InsideTag;o+=t.value;e.state=n.CloseTag;o+=this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}dtdAttList(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+""+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}dtdElement(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+""+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}dtdEntity(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+""+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}dtdNotation(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+""+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}openNode(t,e,i){}closeNode(t,e,i){}openAttribute(t,e,i){}closeAttribute(t,e,i){}}}).call(this)},52958:function(t,e,i){(function(){var e,n,o,s,r,c,a,u,h;({assign:u,isFunction:h}=i(58229));o=i(78310);s=i(53730);r=i(77356);a=i(85913);c=i(78601);e=i(29267);n=i(9766);t.exports.create=function(t,e,i,n){var o,r;if(t==null){throw new Error("Root element needs a name.")}n=u({},e,i,n);o=new s(n);r=o.element(t);if(!n.headless){o.declaration(n);if(n.pubID!=null||n.sysID!=null){o.dtd(n)}}return r};t.exports.begin=function(t,e,i){if(h(t)){[e,i]=[t,e];t={}}if(e){return new r(t,e,i)}else{return new s(t)}};t.exports.stringWriter=function(t){return new a(t)};t.exports.streamWriter=function(t,e){return new c(t,e)};t.exports.implementation=new o;t.exports.nodeType=e;t.exports.writerState=n}).call(this)},6144:function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){if(n===undefined)n=i;Object.defineProperty(t,n,{enumerable:true,get:function(){return e[i]}})}:function(t,e,i,n){if(n===undefined)n=i;t[n]=e[i]});var o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i))n(e,t,i);o(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.main=void 0;const r=s(i(42186));const c=s(i(75595));const a=async()=>{try{const t=await c.default(r.getInput("twilio_account_sid"),r.getInput("twilio_auth_token"),{lazyLoading:true}).fax.faxes.create({from:r.getInput("from"),to:r.getInput("to"),mediaUrl:r.getInput("url")});r.setOutput("sid",t.sid)}catch({message:t}){r.setFailed(t)}};e.main=a;e.main()},20696:t=>{"use strict";t.exports=JSON.parse('{"name":"axios","version":"0.19.2","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test && bundlesize","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://github.com/axios/axios","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"typings":"./index.d.ts","dependencies":{"follow-redirects":"1.5.10"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},87751:t=>{"use strict";t.exports=JSON.parse('{"name":"twilio","description":"A Twilio helper library","version":"3.54.0","author":"API Team ","contributors":[{"name":"twilio-node contributors","url":"https://github.com/twilio/twilio-node/graphs/contributors"}],"keywords":["twilio","sms","rest","api"],"repository":{"type":"git","url":"https://github.com/twilio/twilio-node.git"},"peerDependencies":{"@types/express":"^4.17.7","@types/qs":"6.9.4"},"dependencies":{"axios":"^0.19.2","dayjs":"^1.8.29","jsonwebtoken":"^8.5.1","lodash":"^4.17.19","q":"2.0.x","qs":"^6.9.4","rootpath":"^0.1.2","scmp":"^2.1.0","url-parse":"^1.4.7","xmlbuilder":"^13.0.2"},"devDependencies":{"@types/express":"^4.17.7","@types/qs":"6.9.4","@types/lodash":"4.14.112","@types/node":"9.6.57","eslint":"^7.3.1","express":"^4.17.1","jasmine":"~3.5.0","jsdoc":"^3.6.4","jshint":"^2.11.0","mock-fs":"^4.12.0","nock":"^10.0.6","node-mocks-http":"^1.8.1","proxyquire":"^2.1.3","typescript":"^2.8.3"},"scripts":{"test":"npm run test:javascript && npm run test:typescript","test:javascript":"jasmine spec/**/**.spec.js","test:typescript":"tsc examples/typescript/example.ts --noEmit --strict","jshint":"jshint lib/rest/** lib/base/** lib/http/**","jscs":"eslint lib/base/**/**.js lib/http/**/**.js --fix","check":"npm run jshint && npm run jscs","ci":"npm test && npm run nsp","jsdoc":"jsdoc -r lib -d docs","nsp":"if [ `npm --version | cut -d\'.\' -f1` -ge \\"6\\" ]; then npm audit; else echo \\"npm audit is not available for npm < 6.0\\"; fi"},"files":["lib","index.js","index.d.ts"],"main":"./lib","types":"./index.d.ts","engines":{"node":">=6.0"},"license":"MIT"}')},42357:t=>{"use strict";t.exports=require("assert")},64293:t=>{"use strict";t.exports=require("buffer")},76417:t=>{"use strict";t.exports=require("crypto")},85229:t=>{"use strict";t.exports=require("domain")},35747:t=>{"use strict";t.exports=require("fs")},98605:t=>{"use strict";t.exports=require("http")},57211:t=>{"use strict";t.exports=require("https")},12087:t=>{"use strict";t.exports=require("os")},85622:t=>{"use strict";t.exports=require("path")},71191:t=>{"use strict";t.exports=require("querystring")},92413:t=>{"use strict";t.exports=require("stream")},33867:t=>{"use strict";t.exports=require("tty")},78835:t=>{"use strict";t.exports=require("url")},31669:t=>{"use strict";t.exports=require("util")},78761:t=>{"use strict";t.exports=require("zlib")}};var e={};function __webpack_require__(i){if(e[i]){return e[i].exports}var n=e[i]={id:i,loaded:false,exports:{}};var o=true;try{t[i].call(n.exports,n,n.exports,__webpack_require__);o=false}finally{if(o)delete e[i]}n.loaded=true;return n.exports}(()=>{__webpack_require__.nmd=(t=>{t.paths=[];if(!t.children)t.children=[];return t})})();__webpack_require__.ab=__dirname+"/";return __webpack_require__(6144)})(); \ No newline at end of file +module.exports=(()=>{var t={87351:function(t,e,i){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)if(Object.hasOwnProperty.call(t,i))e[i]=t[i];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const o=n(i(12087));const s=i(5278);function issueCommand(t,e,i){const n=new Command(t,e,i);process.stdout.write(n.toString()+o.EOL)}e.issueCommand=issueCommand;function issue(t,e=""){issueCommand(t,{},e)}e.issue=issue;const r="::";class Command{constructor(t,e,i){if(!t){t="missing.command"}this.command=t;this.properties=e;this.message=i}toString(){let t=r+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let e=true;for(const i in this.properties){if(this.properties.hasOwnProperty(i)){const n=this.properties[i];if(n){if(e){e=false}else{t+=","}t+=`${i}=${escapeProperty(n)}`}}}}t+=`${r}${escapeData(this.message)}`;return t}}function escapeData(t){return s.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(t){return s.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},42186:function(t,e,i){"use strict";var n=this&&this.__awaiter||function(t,e,i,n){function adopt(t){return t instanceof i?t:new i(function(e){e(t)})}return new(i||(i=Promise))(function(i,o){function fulfilled(t){try{step(n.next(t))}catch(t){o(t)}}function rejected(t){try{step(n["throw"](t))}catch(t){o(t)}}function step(t){t.done?i(t.value):adopt(t.value).then(fulfilled,rejected)}step((n=n.apply(t,e||[])).next())})};var o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)if(Object.hasOwnProperty.call(t,i))e[i]=t[i];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const s=i(87351);const r=i(717);const c=i(5278);const a=o(i(12087));const u=o(i(85622));var h;(function(t){t[t["Success"]=0]="Success";t[t["Failure"]=1]="Failure"})(h=e.ExitCode||(e.ExitCode={}));function exportVariable(t,e){const i=c.toCommandValue(e);process.env[t]=i;const n=process.env["GITHUB_ENV"]||"";if(n){const e="_GitHubActionsFileCommandDelimeter_";const n=`${t}<<${e}${a.EOL}${i}${a.EOL}${e}`;r.issueCommand("ENV",n)}else{s.issueCommand("set-env",{name:t},i)}}e.exportVariable=exportVariable;function setSecret(t){s.issueCommand("add-mask",{},t)}e.setSecret=setSecret;function addPath(t){const e=process.env["GITHUB_PATH"]||"";if(e){r.issueCommand("PATH",t)}else{s.issueCommand("add-path",{},t)}process.env["PATH"]=`${t}${u.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(t,e){const i=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!i){throw new Error(`Input required and not supplied: ${t}`)}return i.trim()}e.getInput=getInput;function setOutput(t,e){s.issueCommand("set-output",{name:t},e)}e.setOutput=setOutput;function setCommandEcho(t){s.issue("echo",t?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(t){process.exitCode=h.Failure;error(t)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(t){s.issueCommand("debug",{},t)}e.debug=debug;function error(t){s.issue("error",t instanceof Error?t.toString():t)}e.error=error;function warning(t){s.issue("warning",t instanceof Error?t.toString():t)}e.warning=warning;function info(t){process.stdout.write(t+a.EOL)}e.info=info;function startGroup(t){s.issue("group",t)}e.startGroup=startGroup;function endGroup(){s.issue("endgroup")}e.endGroup=endGroup;function group(t,e){return n(this,void 0,void 0,function*(){startGroup(t);let i;try{i=yield e()}finally{endGroup()}return i})}e.group=group;function saveState(t,e){s.issueCommand("save-state",{name:t},e)}e.saveState=saveState;function getState(t){return process.env[`STATE_${t}`]||""}e.getState=getState},717:function(t,e,i){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)if(Object.hasOwnProperty.call(t,i))e[i]=t[i];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const o=n(i(35747));const s=n(i(12087));const r=i(5278);function issueCommand(t,e){const i=process.env[`GITHUB_${t}`];if(!i){throw new Error(`Unable to find environment variable for file command ${t}`)}if(!o.existsSync(i)){throw new Error(`Missing file at path: ${i}`)}o.appendFileSync(i,`${r.toCommandValue(e)}${s.EOL}`,{encoding:"utf8"})}e.issueCommand=issueCommand},5278:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});function toCommandValue(t){if(t===null||t===undefined){return""}else if(typeof t==="string"||t instanceof String){return t}return JSON.stringify(t)}e.toCommandValue=toCommandValue},87943:(t,e,i)=>{"use strict";var n=i(83691);var o=[];t.exports=asap;function asap(t){var e;if(o.length){e=o.pop()}else{e=new RawTask}e.task=t;e.domain=process.domain;n(e)}function RawTask(){this.task=null;this.domain=null}RawTask.prototype.call=function(){if(this.domain){this.domain.enter()}var t=true;try{this.task.call();t=false;if(this.domain){this.domain.exit()}}finally{if(t){n.requestFlush()}this.task=null;this.domain=null;o.push(this)}}},83691:(t,e,i)=>{"use strict";var n;var o=typeof setImmediate==="function";t.exports=rawAsap;function rawAsap(t){if(!s.length){requestFlush();r=true}s[s.length]=t}var s=[];var r=false;var c=0;var a=1024;function flush(){while(ca){for(var e=0,i=s.length-c;e{t.exports=i(52618)},68104:(t,e,i)=>{"use strict";var n=i(20328);var o=i(13211);var s=i(41934);var r=i(30646);var c=i(98605);var a=i(57211);var u=i(67707).http;var h=i(67707).https;var f=i(78835);var p=i(78761);var d=i(20696);var l=i(15226);var v=i(21516);var m=/https:?/;t.exports=function httpAdapter(t){return new Promise(function dispatchHttpRequest(e,i){var _=function resolve(t){e(t)};var g=function reject(t){i(t)};var y=t.data;var S=t.headers;if(!S["User-Agent"]&&!S["user-agent"]){S["User-Agent"]="axios/"+d.version}if(y&&!n.isStream(y)){if(Buffer.isBuffer(y)){}else if(n.isArrayBuffer(y)){y=Buffer.from(new Uint8Array(y))}else if(n.isString(y)){y=Buffer.from(y,"utf-8")}else{return g(l("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",t))}S["Content-Length"]=y.length}var b=undefined;if(t.auth){var w=t.auth.username||"";var L=t.auth.password||"";b=w+":"+L}var I=s(t.baseURL,t.url);var O=f.parse(I);var N=O.protocol||"http:";if(!b&&O.auth){var x=O.auth.split(":");var C=x[0]||"";var P=x[1]||"";b=C+":"+P}if(b){delete S.Authorization}var k=m.test(N);var F=k?t.httpsAgent:t.httpAgent;var T={path:r(O.path,t.params,t.paramsSerializer).replace(/^\?/,""),method:t.method.toUpperCase(),headers:S,agent:F,agents:{http:t.httpAgent,https:t.httpsAgent},auth:b};if(t.socketPath){T.socketPath=t.socketPath}else{T.hostname=O.hostname;T.port=O.port}var J=t.proxy;if(!J&&J!==false){var E=N.slice(0,-1)+"_proxy";var j=process.env[E]||process.env[E.toUpperCase()];if(j){var U=f.parse(j);var A=process.env.no_proxy||process.env.NO_PROXY;var D=true;if(A){var R=A.split(",").map(function trim(t){return t.trim()});D=!R.some(function proxyMatch(t){if(!t){return false}if(t==="*"){return true}if(t[0]==="."&&O.hostname.substr(O.hostname.length-t.length)===t){return true}return O.hostname===t})}if(D){J={host:U.hostname,port:U.port};if(U.auth){var M=U.auth.split(":");J.auth={username:M[0],password:M[1]}}}}}if(J){T.hostname=J.host;T.host=J.host;T.headers.host=O.hostname+(O.port?":"+O.port:"");T.port=J.port;T.path=N+"//"+O.hostname+(O.port?":"+O.port:"")+T.path;if(J.auth){var W=Buffer.from(J.auth.username+":"+J.auth.password,"utf8").toString("base64");T.headers["Proxy-Authorization"]="Basic "+W}}var q;var z=k&&(J?m.test(J.protocol):true);if(t.transport){q=t.transport}else if(t.maxRedirects===0){q=z?a:c}else{if(t.maxRedirects){T.maxRedirects=t.maxRedirects}q=z?h:u}if(t.maxContentLength&&t.maxContentLength>-1){T.maxBodyLength=t.maxContentLength}var $=q.request(T,function handleResponse(e){if($.aborted)return;var i=e;switch(e.headers["content-encoding"]){case"gzip":case"compress":case"deflate":i=e.statusCode===204?i:i.pipe(p.createUnzip());delete e.headers["content-encoding"];break}var n=e.req||$;var s={status:e.statusCode,statusText:e.statusMessage,headers:e.headers,config:t,request:n};if(t.responseType==="stream"){s.data=i;o(_,g,s)}else{var r=[];i.on("data",function handleStreamData(e){r.push(e);if(t.maxContentLength>-1&&Buffer.concat(r).length>t.maxContentLength){i.destroy();g(l("maxContentLength size of "+t.maxContentLength+" exceeded",t,null,n))}});i.on("error",function handleStreamError(e){if($.aborted)return;g(v(e,t,null,n))});i.on("end",function handleStreamEnd(){var e=Buffer.concat(r);if(t.responseType!=="arraybuffer"){e=e.toString(t.responseEncoding)}s.data=e;o(_,g,s)})}});$.on("error",function handleRequestError(e){if($.aborted)return;g(v(e,t,null,$))});if(t.timeout){$.setTimeout(t.timeout,function handleRequestTimeout(){$.abort();g(l("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",$))})}if(t.cancelToken){t.cancelToken.promise.then(function onCanceled(t){if($.aborted)return;$.abort();g(t)})}if(n.isStream(y)){y.on("error",function handleStreamError(e){g(v(e,t,null,$))}).pipe($)}else{$.end(y)}})}},3454:(t,e,i)=>{"use strict";var n=i(20328);var o=i(13211);var s=i(30646);var r=i(41934);var c=i(86455);var a=i(33608);var u=i(15226);t.exports=function xhrAdapter(t){return new Promise(function dispatchXhrRequest(e,h){var f=t.data;var p=t.headers;if(n.isFormData(f)){delete p["Content-Type"]}var d=new XMLHttpRequest;if(t.auth){var l=t.auth.username||"";var v=t.auth.password||"";p.Authorization="Basic "+btoa(l+":"+v)}var m=r(t.baseURL,t.url);d.open(t.method.toUpperCase(),s(m,t.params,t.paramsSerializer),true);d.timeout=t.timeout;d.onreadystatechange=function handleLoad(){if(!d||d.readyState!==4){return}if(d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)){return}var i="getAllResponseHeaders"in d?c(d.getAllResponseHeaders()):null;var n=!t.responseType||t.responseType==="text"?d.responseText:d.response;var s={data:n,status:d.status,statusText:d.statusText,headers:i,config:t,request:d};o(e,h,s);d=null};d.onabort=function handleAbort(){if(!d){return}h(u("Request aborted",t,"ECONNABORTED",d));d=null};d.onerror=function handleError(){h(u("Network Error",t,null,d));d=null};d.ontimeout=function handleTimeout(){var e="timeout of "+t.timeout+"ms exceeded";if(t.timeoutErrorMessage){e=t.timeoutErrorMessage}h(u(e,t,"ECONNABORTED",d));d=null};if(n.isStandardBrowserEnv()){var _=i(21545);var g=(t.withCredentials||a(m))&&t.xsrfCookieName?_.read(t.xsrfCookieName):undefined;if(g){p[t.xsrfHeaderName]=g}}if("setRequestHeader"in d){n.forEach(p,function setRequestHeader(t,e){if(typeof f==="undefined"&&e.toLowerCase()==="content-type"){delete p[e]}else{d.setRequestHeader(e,t)}})}if(!n.isUndefined(t.withCredentials)){d.withCredentials=!!t.withCredentials}if(t.responseType){try{d.responseType=t.responseType}catch(e){if(t.responseType!=="json"){throw e}}}if(typeof t.onDownloadProgress==="function"){d.addEventListener("progress",t.onDownloadProgress)}if(typeof t.onUploadProgress==="function"&&d.upload){d.upload.addEventListener("progress",t.onUploadProgress)}if(t.cancelToken){t.cancelToken.promise.then(function onCanceled(t){if(!d){return}d.abort();h(t);d=null})}if(f===undefined){f=null}d.send(f)})}},52618:(t,e,i)=>{"use strict";var n=i(20328);var o=i(77065);var s=i(98178);var r=i(74831);var c=i(98190);function createInstance(t){var e=new s(t);var i=o(s.prototype.request,e);n.extend(i,s.prototype,e);n.extend(i,e);return i}var a=createInstance(c);a.Axios=s;a.create=function create(t){return createInstance(r(a.defaults,t))};a.Cancel=i(98875);a.CancelToken=i(71587);a.isCancel=i(64057);a.all=function all(t){return Promise.all(t)};a.spread=i(74850);t.exports=a;t.exports.default=a},98875:t=>{"use strict";function Cancel(t){this.message=t}Cancel.prototype.toString=function toString(){return"Cancel"+(this.message?": "+this.message:"")};Cancel.prototype.__CANCEL__=true;t.exports=Cancel},71587:(t,e,i)=>{"use strict";var n=i(98875);function CancelToken(t){if(typeof t!=="function"){throw new TypeError("executor must be a function.")}var e;this.promise=new Promise(function promiseExecutor(t){e=t});var i=this;t(function cancel(t){if(i.reason){return}i.reason=new n(t);e(i.reason)})}CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason){throw this.reason}};CancelToken.source=function source(){var t;var e=new CancelToken(function executor(e){t=e});return{token:e,cancel:t}};t.exports=CancelToken},64057:t=>{"use strict";t.exports=function isCancel(t){return!!(t&&t.__CANCEL__)}},98178:(t,e,i)=>{"use strict";var n=i(20328);var o=i(30646);var s=i(3214);var r=i(85062);var c=i(74831);function Axios(t){this.defaults=t;this.interceptors={request:new s,response:new s}}Axios.prototype.request=function request(t){if(typeof t==="string"){t=arguments[1]||{};t.url=arguments[0]}else{t=t||{}}t=c(this.defaults,t);if(t.method){t.method=t.method.toLowerCase()}else if(this.defaults.method){t.method=this.defaults.method.toLowerCase()}else{t.method="get"}var e=[r,undefined];var i=Promise.resolve(t);this.interceptors.request.forEach(function unshiftRequestInterceptors(t){e.unshift(t.fulfilled,t.rejected)});this.interceptors.response.forEach(function pushResponseInterceptors(t){e.push(t.fulfilled,t.rejected)});while(e.length){i=i.then(e.shift(),e.shift())}return i};Axios.prototype.getUri=function getUri(t){t=c(this.defaults,t);return o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};n.forEach(["delete","get","head","options"],function forEachMethodNoData(t){Axios.prototype[t]=function(e,i){return this.request(n.merge(i||{},{method:t,url:e}))}});n.forEach(["post","put","patch"],function forEachMethodWithData(t){Axios.prototype[t]=function(e,i,o){return this.request(n.merge(o||{},{method:t,url:e,data:i}))}});t.exports=Axios},3214:(t,e,i)=>{"use strict";var n=i(20328);function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function use(t,e){this.handlers.push({fulfilled:t,rejected:e});return this.handlers.length-1};InterceptorManager.prototype.eject=function eject(t){if(this.handlers[t]){this.handlers[t]=null}};InterceptorManager.prototype.forEach=function forEach(t){n.forEach(this.handlers,function forEachHandler(e){if(e!==null){t(e)}})};t.exports=InterceptorManager},41934:(t,e,i)=>{"use strict";var n=i(41301);var o=i(57189);t.exports=function buildFullPath(t,e){if(t&&!n(e)){return o(t,e)}return e}},15226:(t,e,i)=>{"use strict";var n=i(21516);t.exports=function createError(t,e,i,o,s){var r=new Error(t);return n(r,e,i,o,s)}},85062:(t,e,i)=>{"use strict";var n=i(20328);var o=i(19812);var s=i(64057);var r=i(98190);function throwIfCancellationRequested(t){if(t.cancelToken){t.cancelToken.throwIfRequested()}}t.exports=function dispatchRequest(t){throwIfCancellationRequested(t);t.headers=t.headers||{};t.data=o(t.data,t.headers,t.transformRequest);t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers);n.forEach(["delete","get","head","post","put","patch","common"],function cleanHeaderConfig(e){delete t.headers[e]});var e=t.adapter||r.adapter;return e(t).then(function onAdapterResolution(e){throwIfCancellationRequested(t);e.data=o(e.data,e.headers,t.transformResponse);return e},function onAdapterRejection(e){if(!s(e)){throwIfCancellationRequested(t);if(e&&e.response){e.response.data=o(e.response.data,e.response.headers,t.transformResponse)}}return Promise.reject(e)})}},21516:t=>{"use strict";t.exports=function enhanceError(t,e,i,n,o){t.config=e;if(i){t.code=i}t.request=n;t.response=o;t.isAxiosError=true;t.toJSON=function(){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:this.config,code:this.code}};return t}},74831:(t,e,i)=>{"use strict";var n=i(20328);t.exports=function mergeConfig(t,e){e=e||{};var i={};var o=["url","method","params","data"];var s=["headers","auth","proxy"];var r=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];n.forEach(o,function valueFromConfig2(t){if(typeof e[t]!=="undefined"){i[t]=e[t]}});n.forEach(s,function mergeDeepProperties(o){if(n.isObject(e[o])){i[o]=n.deepMerge(t[o],e[o])}else if(typeof e[o]!=="undefined"){i[o]=e[o]}else if(n.isObject(t[o])){i[o]=n.deepMerge(t[o])}else if(typeof t[o]!=="undefined"){i[o]=t[o]}});n.forEach(r,function defaultToConfig2(n){if(typeof e[n]!=="undefined"){i[n]=e[n]}else if(typeof t[n]!=="undefined"){i[n]=t[n]}});var c=o.concat(s).concat(r);var a=Object.keys(e).filter(function filterAxiosKeys(t){return c.indexOf(t)===-1});n.forEach(a,function otherKeysDefaultToConfig2(n){if(typeof e[n]!=="undefined"){i[n]=e[n]}else if(typeof t[n]!=="undefined"){i[n]=t[n]}});return i}},13211:(t,e,i)=>{"use strict";var n=i(15226);t.exports=function settle(t,e,i){var o=i.config.validateStatus;if(!o||o(i.status)){t(i)}else{e(n("Request failed with status code "+i.status,i.config,null,i.request,i))}}},19812:(t,e,i)=>{"use strict";var n=i(20328);t.exports=function transformData(t,e,i){n.forEach(i,function transform(i){t=i(t,e)});return t}},98190:(t,e,i)=>{"use strict";var n=i(20328);var o=i(36240);var s={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(t,e){if(!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])){t["Content-Type"]=e}}function getDefaultAdapter(){var t;if(typeof XMLHttpRequest!=="undefined"){t=i(3454)}else if(typeof process!=="undefined"&&Object.prototype.toString.call(process)==="[object process]"){t=i(68104)}return t}var r={adapter:getDefaultAdapter(),transformRequest:[function transformRequest(t,e){o(e,"Accept");o(e,"Content-Type");if(n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)){return t}if(n.isArrayBufferView(t)){return t.buffer}if(n.isURLSearchParams(t)){setContentTypeIfUnset(e,"application/x-www-form-urlencoded;charset=utf-8");return t.toString()}if(n.isObject(t)){setContentTypeIfUnset(e,"application/json;charset=utf-8");return JSON.stringify(t)}return t}],transformResponse:[function transformResponse(t){if(typeof t==="string"){try{t=JSON.parse(t)}catch(t){}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function validateStatus(t){return t>=200&&t<300}};r.headers={common:{Accept:"application/json, text/plain, */*"}};n.forEach(["delete","get","head"],function forEachMethodNoData(t){r.headers[t]={}});n.forEach(["post","put","patch"],function forEachMethodWithData(t){r.headers[t]=n.merge(s)});t.exports=r},77065:t=>{"use strict";t.exports=function bind(t,e){return function wrap(){var i=new Array(arguments.length);for(var n=0;n{"use strict";var n=i(20328);function encode(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function buildURL(t,e,i){if(!e){return t}var o;if(i){o=i(e)}else if(n.isURLSearchParams(e)){o=e.toString()}else{var s=[];n.forEach(e,function serialize(t,e){if(t===null||typeof t==="undefined"){return}if(n.isArray(t)){e=e+"[]"}else{t=[t]}n.forEach(t,function parseValue(t){if(n.isDate(t)){t=t.toISOString()}else if(n.isObject(t)){t=JSON.stringify(t)}s.push(encode(e)+"="+encode(t))})});o=s.join("&")}if(o){var r=t.indexOf("#");if(r!==-1){t=t.slice(0,r)}t+=(t.indexOf("?")===-1?"?":"&")+o}return t}},57189:t=>{"use strict";t.exports=function combineURLs(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},21545:(t,e,i)=>{"use strict";var n=i(20328);t.exports=n.isStandardBrowserEnv()?function standardBrowserEnv(){return{write:function write(t,e,i,o,s,r){var c=[];c.push(t+"="+encodeURIComponent(e));if(n.isNumber(i)){c.push("expires="+new Date(i).toGMTString())}if(n.isString(o)){c.push("path="+o)}if(n.isString(s)){c.push("domain="+s)}if(r===true){c.push("secure")}document.cookie=c.join("; ")},read:function read(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function remove(t){this.write(t,"",Date.now()-864e5)}}}():function nonStandardBrowserEnv(){return{write:function write(){},read:function read(){return null},remove:function remove(){}}}()},41301:t=>{"use strict";t.exports=function isAbsoluteURL(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},33608:(t,e,i)=>{"use strict";var n=i(20328);t.exports=n.isStandardBrowserEnv()?function standardBrowserEnv(){var t=/(msie|trident)/i.test(navigator.userAgent);var e=document.createElement("a");var i;function resolveURL(i){var n=i;if(t){e.setAttribute("href",n);n=e.href}e.setAttribute("href",n);return{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}i=resolveURL(window.location.href);return function isURLSameOrigin(t){var e=n.isString(t)?resolveURL(t):t;return e.protocol===i.protocol&&e.host===i.host}}():function nonStandardBrowserEnv(){return function isURLSameOrigin(){return true}}()},36240:(t,e,i)=>{"use strict";var n=i(20328);t.exports=function normalizeHeaderName(t,e){n.forEach(t,function processHeader(i,n){if(n!==e&&n.toUpperCase()===e.toUpperCase()){t[e]=i;delete t[n]}})}},86455:(t,e,i)=>{"use strict";var n=i(20328);var o=["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"];t.exports=function parseHeaders(t){var e={};var i;var s;var r;if(!t){return e}n.forEach(t.split("\n"),function parser(t){r=t.indexOf(":");i=n.trim(t.substr(0,r)).toLowerCase();s=n.trim(t.substr(r+1));if(i){if(e[i]&&o.indexOf(i)>=0){return}if(i==="set-cookie"){e[i]=(e[i]?e[i]:[]).concat([s])}else{e[i]=e[i]?e[i]+", "+s:s}}});return e}},74850:t=>{"use strict";t.exports=function spread(t){return function wrap(e){return t.apply(null,e)}}},20328:(t,e,i)=>{"use strict";var n=i(77065);var o=Object.prototype.toString;function isArray(t){return o.call(t)==="[object Array]"}function isUndefined(t){return typeof t==="undefined"}function isBuffer(t){return t!==null&&!isUndefined(t)&&t.constructor!==null&&!isUndefined(t.constructor)&&typeof t.constructor.isBuffer==="function"&&t.constructor.isBuffer(t)}function isArrayBuffer(t){return o.call(t)==="[object ArrayBuffer]"}function isFormData(t){return typeof FormData!=="undefined"&&t instanceof FormData}function isArrayBufferView(t){var e;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){e=ArrayBuffer.isView(t)}else{e=t&&t.buffer&&t.buffer instanceof ArrayBuffer}return e}function isString(t){return typeof t==="string"}function isNumber(t){return typeof t==="number"}function isObject(t){return t!==null&&typeof t==="object"}function isDate(t){return o.call(t)==="[object Date]"}function isFile(t){return o.call(t)==="[object File]"}function isBlob(t){return o.call(t)==="[object Blob]"}function isFunction(t){return o.call(t)==="[object Function]"}function isStream(t){return isObject(t)&&isFunction(t.pipe)}function isURLSearchParams(t){return typeof URLSearchParams!=="undefined"&&t instanceof URLSearchParams}function trim(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function isStandardBrowserEnv(){if(typeof navigator!=="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}function forEach(t,e){if(t===null||typeof t==="undefined"){return}if(typeof t!=="object"){t=[t]}if(isArray(t)){for(var i=0,n=t.length;i{"use strict";var n=i(64293).Buffer;var o=i(64293).SlowBuffer;t.exports=bufferEq;function bufferEq(t,e){if(!n.isBuffer(t)||!n.isBuffer(e)){return false}if(t.length!==e.length){return false}var i=0;for(var o=0;o=e?t:""+Array(e+1-n.length).join(i)+t},m={s:v,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),n=Math.floor(i/60),o=i%60;return(e<=0?"+":"-")+v(n,2,"0")+":"+v(o,2,"0")},m:function t(e,i){if(e.date(){"use strict";var n=i(21867).Buffer;var o=i(30528);var s=128,r=0,c=32,a=16,u=2,h=a|c|r<<6,f=u|r<<6;function base64Url(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function signatureAsBuffer(t){if(n.isBuffer(t)){return t}else if("string"===typeof t){return n.from(t,"base64")}throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function derToJose(t,e){t=signatureAsBuffer(t);var i=o(e);var r=i+1;var c=t.length;var a=0;if(t[a++]!==h){throw new Error('Could not find expected "seq"')}var u=t[a++];if(u===(s|1)){u=t[a++]}if(c-a=s;if(o){--n}return n}function joseToDer(t,e){t=signatureAsBuffer(t);var i=o(e);var r=t.length;if(r!==i*2){throw new TypeError('"'+e+'" signatures must be "'+i*2+'" bytes, saw "'+r+'"')}var c=countPadding(t,0,i);var a=countPadding(t,i,t.length);var u=i-c;var p=i-a;var d=1+1+u+1+1+p;var l=d{"use strict";function getParamSize(t){var e=(t/8|0)+(t%8===0?0:1);return e}var e={ES256:getParamSize(256),ES384:getParamSize(384),ES512:getParamSize(521)};function getParamBytesForAlg(t){var i=e[t];if(i){return i}throw new Error('Unknown algorithm "'+t+'"')}t.exports=getParamBytesForAlg},67707:(t,e,i)=>{var n=i(78835);var o=i(98605);var s=i(57211);var r=i(42357);var c=i(92413).Writable;var a=i(73226)("follow-redirects");var u={GET:true,HEAD:true,OPTIONS:true,TRACE:true};var h=Object.create(null);["abort","aborted","error","socket","timeout"].forEach(function(t){h[t]=function(e){this._redirectable.emit(t,e)}});function RedirectableRequest(t,e){c.call(this);t.headers=t.headers||{};this._options=t;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t.host){if(!t.hostname){t.hostname=t.host}delete t.host}if(e){this.on("response",e)}var i=this;this._onNativeResponse=function(t){i._processResponse(t)};if(!t.pathname&&t.path){var n=t.path.indexOf("?");if(n<0){t.pathname=t.path}else{t.pathname=t.path.substring(0,n);t.search=t.path.substring(n)}}this._performRequest()}RedirectableRequest.prototype=Object.create(c.prototype);RedirectableRequest.prototype.write=function(t,e,i){if(!(typeof t==="string"||typeof t==="object"&&"length"in t)){throw new Error("data should be a string, Buffer or Uint8Array")}if(typeof e==="function"){i=e;e=null}if(t.length===0){if(i){i()}return}if(this._requestBodyLength+t.length<=this._options.maxBodyLength){this._requestBodyLength+=t.length;this._requestBodyBuffers.push({data:t,encoding:e});this._currentRequest.write(t,e,i)}else{this.emit("error",new Error("Request body larger than maxBodyLength limit"));this.abort()}};RedirectableRequest.prototype.end=function(t,e,i){if(typeof t==="function"){i=t;t=e=null}else if(typeof e==="function"){i=e;e=null}var n=this._currentRequest;this.write(t||"",e,function(){n.end(null,null,i)})};RedirectableRequest.prototype.setHeader=function(t,e){this._options.headers[t]=e;this._currentRequest.setHeader(t,e)};RedirectableRequest.prototype.removeHeader=function(t){delete this._options.headers[t];this._currentRequest.removeHeader(t)};["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive","setTimeout"].forEach(function(t){RedirectableRequest.prototype[t]=function(e,i){return this._currentRequest[t](e,i)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(RedirectableRequest.prototype,t,{get:function(){return this._currentRequest[t]}})});RedirectableRequest.prototype._performRequest=function(){var t=this._options.protocol;var e=this._options.nativeProtocols[t];if(!e){this.emit("error",new Error("Unsupported protocol "+t));return}if(this._options.agents){var i=t.substr(0,t.length-1);this._options.agent=this._options.agents[i]}var o=this._currentRequest=e.request(this._options,this._onNativeResponse);this._currentUrl=n.format(this._options);o._redirectable=this;for(var s in h){if(s){o.on(s,h[s])}}if(this._isRedirect){var r=0;var c=this._requestBodyBuffers;(function writeNext(){if(r=300&&t.statusCode<400){if(++this._redirectCount>this._options.maxRedirects){this.emit("error",new Error("Max redirects exceeded."));return}var i;var o=this._options.headers;if(t.statusCode!==307&&!(this._options.method in u)){this._options.method="GET";this._requestBodyBuffers=[];for(i in o){if(/^content-/i.test(i)){delete o[i]}}}if(!this._isRedirect){for(i in o){if(/^host$/i.test(i)){delete o[i]}}}var s=n.resolve(this._currentUrl,e);a("redirecting to",s);Object.assign(this._options,n.parse(s));this._isRedirect=true;this._performRequest();t.destroy()}else{t.responseUrl=this._currentUrl;t.redirects=this._redirects;this.emit("response",t);this._requestBodyBuffers=[]}};function wrap(t){var e={maxRedirects:21,maxBodyLength:10*1024*1024};var i={};Object.keys(t).forEach(function(o){var s=o+":";var c=i[s]=t[o];var u=e[o]=Object.create(c);u.request=function(t,o){if(typeof t==="string"){t=n.parse(t);t.maxRedirects=e.maxRedirects}else{t=Object.assign({protocol:s,maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},t)}t.nativeProtocols=i;r.equal(t.protocol,s,"protocol mismatch");a("options",t);return new RedirectableRequest(t,o)};u.get=function(t,e){var i=u.request(t,e);i.end();return i}});return e}t.exports=wrap({http:o,https:s});t.exports.wrap=wrap},83542:(t,e,i)=>{e=t.exports=i(80472);e.log=log;e.formatArgs=formatArgs;e.save=save;e.load=load;e.useColors=useColors;e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage();e.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"){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+)/)}e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function formatArgs(t){var i=this.useColors;t[0]=(i?"%c":"")+this.namespace+(i?" %c":" ")+t[0]+(i?"%c ":" ")+"+"+e.humanize(this.diff);if(!i)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var o=0;var s=0;t[0].replace(/%[a-zA-Z%]/g,function(t){if("%%"===t)return;o++;if("%c"===t){s=o}});t.splice(s,0,n)}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(t){try{if(null==t){e.storage.removeItem("debug")}else{e.storage.debug=t}}catch(t){}}function load(){var t;try{t=e.storage.debug}catch(t){}if(!t&&typeof process!=="undefined"&&"env"in process){t=process.env.DEBUG}return t}e.enable(load());function localstorage(){try{return window.localStorage}catch(t){}}},80472:(t,e,i)=>{e=t.exports=createDebug.debug=createDebug["default"]=createDebug;e.coerce=coerce;e.disable=disable;e.enable=enable;e.enabled=enabled;e.humanize=i(80900);e.instances=[];e.names=[];e.skips=[];e.formatters={};function selectColor(t){var i=0,n;for(n in t){i=(i<<5)-i+t.charCodeAt(n);i|=0}return e.colors[Math.abs(i)%e.colors.length]}function createDebug(t){var i;function debug(){if(!debug.enabled)return;var t=debug;var n=+new Date;var o=n-(i||n);t.diff=o;t.prev=i;t.curr=n;i=n;var s=new Array(arguments.length);for(var r=0;r{if(typeof process==="undefined"||process.type==="renderer"){t.exports=i(83542)}else{t.exports=i(8302)}},8302:(t,e,i)=>{var n=i(33867);var o=i(31669);e=t.exports=i(80472);e.init=init;e.log=log;e.formatArgs=formatArgs;e.save=save;e.load=load;e.useColors=useColors;e.colors=[6,2,3,4,5,1];try{var s=i(59318);if(s&&s.level>=2){e.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(t){}e.inspectOpts=Object.keys(process.env).filter(function(t){return/^debug_/i.test(t)}).reduce(function(t,e){var i=e.substring(6).toLowerCase().replace(/_([a-z])/g,function(t,e){return e.toUpperCase()});var n=process.env[e];if(/^(yes|on|true|enabled)$/i.test(n))n=true;else if(/^(no|off|false|disabled)$/i.test(n))n=false;else if(n==="null")n=null;else n=Number(n);t[i]=n;return t},{});function useColors(){return"colors"in e.inspectOpts?Boolean(e.inspectOpts.colors):n.isatty(process.stderr.fd)}e.formatters.o=function(t){this.inspectOpts.colors=this.useColors;return o.inspect(t,this.inspectOpts).split("\n").map(function(t){return t.trim()}).join(" ")};e.formatters.O=function(t){this.inspectOpts.colors=this.useColors;return o.inspect(t,this.inspectOpts)};function formatArgs(t){var i=this.namespace;var n=this.useColors;if(n){var o=this.color;var s="[3"+(o<8?o:"8;5;"+o);var r=" "+s+";1m"+i+" "+"";t[0]=r+t[0].split("\n").join("\n"+r);t.push(s+"m+"+e.humanize(this.diff)+"")}else{t[0]=getDate()+i+" "+t[0]}}function getDate(){if(e.inspectOpts.hideDate){return""}else{return(new Date).toISOString()+" "}}function log(){return process.stderr.write(o.format.apply(o,arguments)+"\n")}function save(t){if(null==t){delete process.env.DEBUG}else{process.env.DEBUG=t}}function load(){return process.env.DEBUG}function init(t){t.inspectOpts={};var i=Object.keys(e.inspectOpts);for(var n=0;n{"use strict";t.exports=((t,e=process.argv)=>{const i=t.startsWith("-")?"":t.length===1?"-":"--";const n=e.indexOf(i+t);const o=e.indexOf("--");return n!==-1&&(o===-1||n{var n=i(4636);t.exports=function(t,e){e=e||{};var i=n.decode(t,e);if(!i){return null}var o=i.payload;if(typeof o==="string"){try{var s=JSON.parse(o);if(s!==null&&typeof s==="object"){o=s}}catch(t){}}if(e.complete===true){return{header:i.header,payload:o,signature:i.signature}}return o}},77486:(t,e,i)=>{t.exports={decode:i(53359),verify:i(12327),sign:i(82022),JsonWebTokenError:i(405),NotBeforeError:i(4383),TokenExpiredError:i(46637)}},405:t=>{var e=function(t,e){Error.call(this,t);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="JsonWebTokenError";this.message=t;if(e)this.inner=e};e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;t.exports=e},4383:(t,e,i)=>{var n=i(405);var o=function(t,e){n.call(this,t);this.name="NotBeforeError";this.date=e};o.prototype=Object.create(n.prototype);o.prototype.constructor=o;t.exports=o},46637:(t,e,i)=>{var n=i(405);var o=function(t,e){n.call(this,t);this.name="TokenExpiredError";this.expiredAt=e};o.prototype=Object.create(n.prototype);o.prototype.constructor=o;t.exports=o},59085:(t,e,i)=>{var n=i(27174);t.exports=n.satisfies(process.version,"^6.12.0 || >=8.0.0")},46098:(t,e,i)=>{var n=i(84098);t.exports=function(t,e){var i=e||Math.floor(Date.now()/1e3);if(typeof t==="string"){var o=n(t);if(typeof o==="undefined"){return}return Math.floor(i+o/1e3)}else if(typeof t==="number"){return i+t}else{return}}},84098:t=>{var e=1e3;var i=e*60;var n=i*60;var o=n*24;var s=o*7;var r=o*365.25;t.exports=function(t,e){e=e||{};var i=typeof t;if(i==="string"&&t.length>0){return parse(t)}else if(i==="number"&&isFinite(t)){return e.long?fmtLong(t):fmtShort(t)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function parse(t){t=String(t);if(t.length>100){return}var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!c){return}var a=parseFloat(c[1]);var u=(c[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return a*r;case"weeks":case"week":case"w":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*i;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return undefined}}function fmtShort(t){var s=Math.abs(t);if(s>=o){return Math.round(t/o)+"d"}if(s>=n){return Math.round(t/n)+"h"}if(s>=i){return Math.round(t/i)+"m"}if(s>=e){return Math.round(t/e)+"s"}return t+"ms"}function fmtLong(t){var s=Math.abs(t);if(s>=o){return plural(t,s,o,"day")}if(s>=n){return plural(t,s,n,"hour")}if(s>=i){return plural(t,s,i,"minute")}if(s>=e){return plural(t,s,e,"second")}return t+" ms"}function plural(t,e,i,n){var o=e>=i*1.5;return Math.round(t/i)+" "+n+(o?"s":"")}},27174:(t,e)=>{e=t.exports=SemVer;var i;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){i=function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER");console.log.apply(console,t)}}else{i=function(){}}e.SEMVER_SPEC_VERSION="2.0.0";var n=256;var o=Number.MAX_SAFE_INTEGER||9007199254740991;var s=16;var r=e.re=[];var c=e.src=[];var a=0;var u=a++;c[u]="0|[1-9]\\d*";var h=a++;c[h]="[0-9]+";var f=a++;c[f]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var p=a++;c[p]="("+c[u]+")\\."+"("+c[u]+")\\."+"("+c[u]+")";var d=a++;c[d]="("+c[h]+")\\."+"("+c[h]+")\\."+"("+c[h]+")";var l=a++;c[l]="(?:"+c[u]+"|"+c[f]+")";var v=a++;c[v]="(?:"+c[h]+"|"+c[f]+")";var m=a++;c[m]="(?:-("+c[l]+"(?:\\."+c[l]+")*))";var _=a++;c[_]="(?:-?("+c[v]+"(?:\\."+c[v]+")*))";var g=a++;c[g]="[0-9A-Za-z-]+";var y=a++;c[y]="(?:\\+("+c[g]+"(?:\\."+c[g]+")*))";var S=a++;var b="v?"+c[p]+c[m]+"?"+c[y]+"?";c[S]="^"+b+"$";var w="[v=\\s]*"+c[d]+c[_]+"?"+c[y]+"?";var L=a++;c[L]="^"+w+"$";var I=a++;c[I]="((?:<|>)?=?)";var O=a++;c[O]=c[h]+"|x|X|\\*";var N=a++;c[N]=c[u]+"|x|X|\\*";var x=a++;c[x]="[v=\\s]*("+c[N]+")"+"(?:\\.("+c[N]+")"+"(?:\\.("+c[N]+")"+"(?:"+c[m]+")?"+c[y]+"?"+")?)?";var C=a++;c[C]="[v=\\s]*("+c[O]+")"+"(?:\\.("+c[O]+")"+"(?:\\.("+c[O]+")"+"(?:"+c[_]+")?"+c[y]+"?"+")?)?";var P=a++;c[P]="^"+c[I]+"\\s*"+c[x]+"$";var k=a++;c[k]="^"+c[I]+"\\s*"+c[C]+"$";var F=a++;c[F]="(?:^|[^\\d])"+"(\\d{1,"+s+"})"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:$|[^\\d])";var T=a++;c[T]="(?:~>?)";var J=a++;c[J]="(\\s*)"+c[T]+"\\s+";r[J]=new RegExp(c[J],"g");var E="$1~";var j=a++;c[j]="^"+c[T]+c[x]+"$";var U=a++;c[U]="^"+c[T]+c[C]+"$";var A=a++;c[A]="(?:\\^)";var D=a++;c[D]="(\\s*)"+c[A]+"\\s+";r[D]=new RegExp(c[D],"g");var R="$1^";var M=a++;c[M]="^"+c[A]+c[x]+"$";var W=a++;c[W]="^"+c[A]+c[C]+"$";var q=a++;c[q]="^"+c[I]+"\\s*("+w+")$|^$";var z=a++;c[z]="^"+c[I]+"\\s*("+b+")$|^$";var $=a++;c[$]="(\\s*)"+c[I]+"\\s*("+w+"|"+c[x]+")";r[$]=new RegExp(c[$],"g");var G="$1$2$3";var V=a++;c[V]="^\\s*("+c[x]+")"+"\\s+-\\s+"+"("+c[x]+")"+"\\s*$";var B=a++;c[B]="^\\s*("+c[C]+")"+"\\s+-\\s+"+"("+c[C]+")"+"\\s*$";var Q=a++;c[Q]="(<|>)?=?\\s*\\*";for(var K=0;Kn){return null}var i=e.loose?r[L]:r[S];if(!i.test(t)){return null}try{return new SemVer(t,e)}catch(t){return null}}e.valid=valid;function valid(t,e){var i=parse(t,e);return i?i.version:null}e.clean=clean;function clean(t,e){var i=parse(t.trim().replace(/^[=v]+/,""),e);return i?i.version:null}e.SemVer=SemVer;function SemVer(t,e){if(!e||typeof e!=="object"){e={loose:!!e,includePrerelease:false}}if(t instanceof SemVer){if(t.loose===e.loose){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError("Invalid Version: "+t)}if(t.length>n){throw new TypeError("version is longer than "+n+" characters")}if(!(this instanceof SemVer)){return new SemVer(t,e)}i("SemVer",t,e);this.options=e;this.loose=!!e.loose;var s=t.trim().match(e.loose?r[L]:r[S]);if(!s){throw new TypeError("Invalid Version: "+t)}this.raw=t;this.major=+s[1];this.minor=+s[2];this.patch=+s[3];if(this.major>o||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>o||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>o||this.patch<0){throw new TypeError("Invalid patch version")}if(!s[4]){this.prerelease=[]}else{this.prerelease=s[4].split(".").map(function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1){this.prerelease.push(0)}}if(e){if(this.prerelease[0]===e){if(isNaN(this.prerelease[1])){this.prerelease=[e,0]}}else{this.prerelease=[e,0]}}break;default:throw new Error("invalid increment argument: "+t)}this.format();this.raw=this.version;return this};e.inc=inc;function inc(t,e,i,n){if(typeof i==="string"){n=i;i=undefined}try{return new SemVer(t,i).inc(e,n).version}catch(t){return null}}e.diff=diff;function diff(t,e){if(eq(t,e)){return null}else{var i=parse(t);var n=parse(e);var o="";if(i.prerelease.length||n.prerelease.length){o="pre";var s="prerelease"}for(var r in i){if(r==="major"||r==="minor"||r==="patch"){if(i[r]!==n[r]){return o+r}}}return s}}e.compareIdentifiers=compareIdentifiers;var H=/^[0-9]+$/;function compareIdentifiers(t,e){var i=H.test(t);var n=H.test(e);if(i&&n){t=+t;e=+e}return t===e?0:i&&!n?-1:n&&!i?1:t0}e.lt=lt;function lt(t,e,i){return compare(t,e,i)<0}e.eq=eq;function eq(t,e,i){return compare(t,e,i)===0}e.neq=neq;function neq(t,e,i){return compare(t,e,i)!==0}e.gte=gte;function gte(t,e,i){return compare(t,e,i)>=0}e.lte=lte;function lte(t,e,i){return compare(t,e,i)<=0}e.cmp=cmp;function cmp(t,e,i,n){switch(e){case"===":if(typeof t==="object")t=t.version;if(typeof i==="object")i=i.version;return t===i;case"!==":if(typeof t==="object")t=t.version;if(typeof i==="object")i=i.version;return t!==i;case"":case"=":case"==":return eq(t,i,n);case"!=":return neq(t,i,n);case">":return gt(t,i,n);case">=":return gte(t,i,n);case"<":return lt(t,i,n);case"<=":return lte(t,i,n);default:throw new TypeError("Invalid operator: "+e)}}e.Comparator=Comparator;function Comparator(t,e){if(!e||typeof e!=="object"){e={loose:!!e,includePrerelease:false}}if(t instanceof Comparator){if(t.loose===!!e.loose){return t}else{t=t.value}}if(!(this instanceof Comparator)){return new Comparator(t,e)}i("comparator",t,e);this.options=e;this.loose=!!e.loose;this.parse(t);if(this.semver===X){this.value=""}else{this.value=this.operator+this.semver.version}i("comp",this)}var X={};Comparator.prototype.parse=function(t){var e=this.options.loose?r[q]:r[z];var i=t.match(e);if(!i){throw new TypeError("Invalid comparator: "+t)}this.operator=i[1];if(this.operator==="="){this.operator=""}if(!i[2]){this.semver=X}else{this.semver=new SemVer(i[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(t){i("Comparator.test",t,this.options.loose);if(this.semver===X){return true}if(typeof t==="string"){t=new SemVer(t,this.options)}return cmp(t,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(t,e){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!e||typeof e!=="object"){e={loose:!!e,includePrerelease:false}}var i;if(this.operator===""){i=new Range(t.value,e);return satisfies(this.value,i,e)}else if(t.operator===""){i=new Range(this.value,e);return satisfies(t.semver,i,e)}var n=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">");var o=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<");var s=this.semver.version===t.semver.version;var r=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<=");var c=cmp(this.semver,"<",t.semver,e)&&((this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"));var a=cmp(this.semver,">",t.semver,e)&&((this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">"));return n||o||s&&r||c||a};e.Range=Range;function Range(t,e){if(!e||typeof e!=="object"){e={loose:!!e,includePrerelease:false}}if(t instanceof Range){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease){return t}else{return new Range(t.raw,e)}}if(t instanceof Comparator){return new Range(t.value,e)}if(!(this instanceof Range)){return new Range(t,e)}this.options=e;this.loose=!!e.loose;this.includePrerelease=!!e.includePrerelease;this.raw=t;this.set=t.split(/\s*\|\|\s*/).map(function(t){return this.parseRange(t.trim())},this).filter(function(t){return t.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+t)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(t){return t.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(t){var e=this.options.loose;t=t.trim();var n=e?r[B]:r[V];t=t.replace(n,hyphenReplace);i("hyphen replace",t);t=t.replace(r[$],G);i("comparator trim",t,r[$]);t=t.replace(r[J],E);t=t.replace(r[D],R);t=t.split(/\s+/).join(" ");var o=e?r[q]:r[z];var s=t.split(" ").map(function(t){return parseComparator(t,this.options)},this).join(" ").split(/\s+/);if(this.options.loose){s=s.filter(function(t){return!!t.match(o)})}s=s.map(function(t){return new Comparator(t,this.options)},this);return s};Range.prototype.intersects=function(t,e){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(function(i){return i.every(function(i){return t.set.some(function(t){return t.every(function(t){return i.intersects(t,e)})})})})};e.toComparators=toComparators;function toComparators(t,e){return new Range(t,e).set.map(function(t){return t.map(function(t){return t.value}).join(" ").trim().split(" ")})}function parseComparator(t,e){i("comp",t,e);t=replaceCarets(t,e);i("caret",t);t=replaceTildes(t,e);i("tildes",t);t=replaceXRanges(t,e);i("xrange",t);t=replaceStars(t,e);i("stars",t);return t}function isX(t){return!t||t.toLowerCase()==="x"||t==="*"}function replaceTildes(t,e){return t.trim().split(/\s+/).map(function(t){return replaceTilde(t,e)}).join(" ")}function replaceTilde(t,e){var n=e.loose?r[U]:r[j];return t.replace(n,function(e,n,o,s,r){i("tilde",t,e,n,o,s,r);var c;if(isX(n)){c=""}else if(isX(o)){c=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(s)){c=">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0"}else if(r){i("replaceTilde pr",r);c=">="+n+"."+o+"."+s+"-"+r+" <"+n+"."+(+o+1)+".0"}else{c=">="+n+"."+o+"."+s+" <"+n+"."+(+o+1)+".0"}i("tilde return",c);return c})}function replaceCarets(t,e){return t.trim().split(/\s+/).map(function(t){return replaceCaret(t,e)}).join(" ")}function replaceCaret(t,e){i("caret",t,e);var n=e.loose?r[W]:r[M];return t.replace(n,function(e,n,o,s,r){i("caret",t,e,n,o,s,r);var c;if(isX(n)){c=""}else if(isX(o)){c=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(s)){if(n==="0"){c=">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0"}else{c=">="+n+"."+o+".0 <"+(+n+1)+".0.0"}}else if(r){i("replaceCaret pr",r);if(n==="0"){if(o==="0"){c=">="+n+"."+o+"."+s+"-"+r+" <"+n+"."+o+"."+(+s+1)}else{c=">="+n+"."+o+"."+s+"-"+r+" <"+n+"."+(+o+1)+".0"}}else{c=">="+n+"."+o+"."+s+"-"+r+" <"+(+n+1)+".0.0"}}else{i("no pr");if(n==="0"){if(o==="0"){c=">="+n+"."+o+"."+s+" <"+n+"."+o+"."+(+s+1)}else{c=">="+n+"."+o+"."+s+" <"+n+"."+(+o+1)+".0"}}else{c=">="+n+"."+o+"."+s+" <"+(+n+1)+".0.0"}}i("caret return",c);return c})}function replaceXRanges(t,e){i("replaceXRanges",t,e);return t.split(/\s+/).map(function(t){return replaceXRange(t,e)}).join(" ")}function replaceXRange(t,e){t=t.trim();var n=e.loose?r[k]:r[P];return t.replace(n,function(e,n,o,s,r,c){i("xRange",t,e,n,o,s,r,c);var a=isX(o);var u=a||isX(s);var h=u||isX(r);var f=h;if(n==="="&&f){n=""}if(a){if(n===">"||n==="<"){e="<0.0.0"}else{e="*"}}else if(n&&f){if(u){s=0}r=0;if(n===">"){n=">=";if(u){o=+o+1;s=0;r=0}else{s=+s+1;r=0}}else if(n==="<="){n="<";if(u){o=+o+1}else{s=+s+1}}e=n+o+"."+s+"."+r}else if(u){e=">="+o+".0.0 <"+(+o+1)+".0.0"}else if(h){e=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"}i("xRange return",e);return e})}function replaceStars(t,e){i("replaceStars",t,e);return t.trim().replace(r[Q],"")}function hyphenReplace(t,e,i,n,o,s,r,c,a,u,h,f,p){if(isX(i)){e=""}else if(isX(n)){e=">="+i+".0.0"}else if(isX(o)){e=">="+i+"."+n+".0"}else{e=">="+e}if(isX(a)){c=""}else if(isX(u)){c="<"+(+a+1)+".0.0"}else if(isX(h)){c="<"+a+"."+(+u+1)+".0"}else if(f){c="<="+a+"."+u+"."+h+"-"+f}else{c="<="+c}return(e+" "+c).trim()}Range.prototype.test=function(t){if(!t){return false}if(typeof t==="string"){t=new SemVer(t,this.options)}for(var e=0;e0){var s=t[o].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch){return true}}}return false}return true}e.satisfies=satisfies;function satisfies(t,e,i){try{e=new Range(e,i)}catch(t){return false}return e.test(t)}e.maxSatisfying=maxSatisfying;function maxSatisfying(t,e,i){var n=null;var o=null;try{var s=new Range(e,i)}catch(t){return null}t.forEach(function(t){if(s.test(t)){if(!n||o.compare(t)===-1){n=t;o=new SemVer(n,i)}}});return n}e.minSatisfying=minSatisfying;function minSatisfying(t,e,i){var n=null;var o=null;try{var s=new Range(e,i)}catch(t){return null}t.forEach(function(t){if(s.test(t)){if(!n||o.compare(t)===1){n=t;o=new SemVer(n,i)}}});return n}e.minVersion=minVersion;function minVersion(t,e){t=new Range(t,e);var i=new SemVer("0.0.0");if(t.test(i)){return i}i=new SemVer("0.0.0-0");if(t.test(i)){return i}i=null;for(var n=0;n":if(e.prerelease.length===0){e.patch++}else{e.prerelease.push(0)}e.raw=e.format();case"":case">=":if(!i||gt(i,e)){i=e}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+t.operator)}})}if(i&&t.test(i)){return i}return null}e.validRange=validRange;function validRange(t,e){try{return new Range(t,e).range||"*"}catch(t){return null}}e.ltr=ltr;function ltr(t,e,i){return outside(t,e,"<",i)}e.gtr=gtr;function gtr(t,e,i){return outside(t,e,">",i)}e.outside=outside;function outside(t,e,i,n){t=new SemVer(t,n);e=new Range(e,n);var o,s,r,c,a;switch(i){case">":o=gt;s=lte;r=lt;c=">";a=">=";break;case"<":o=lt;s=gte;r=gt;c="<";a="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(t,e,n)){return false}for(var u=0;u=0.0.0")}f=f||t;p=p||t;if(o(t.semver,f.semver,n)){f=t}else if(r(t.semver,p.semver,n)){p=t}});if(f.operator===c||f.operator===a){return false}if((!p.operator||p.operator===c)&&s(t,p.semver)){return false}else if(p.operator===a&&r(t,p.semver)){return false}}return true}e.prerelease=prerelease;function prerelease(t,e){var i=parse(t,e);return i&&i.prerelease.length?i.prerelease:null}e.intersects=intersects;function intersects(t,e,i){t=new Range(t,i);e=new Range(e,i);return t.intersects(e)}e.coerce=coerce;function coerce(t){if(t instanceof SemVer){return t}if(typeof t!=="string"){return null}var e=t.match(r[F]);if(e==null){return null}return parse(e[1]+"."+(e[2]||"0")+"."+(e[3]||"0"))}},82022:(t,e,i)=>{var n=i(46098);var o=i(59085);var s=i(4636);var r=i(17931);var c=i(16501);var a=i(21441);var u=i(40298);var h=i(25723);var f=i(25180);var p=i(94499);var d=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];if(o){d.splice(3,0,"PS256","PS384","PS512")}var l={expiresIn:{isValid:function(t){return a(t)||f(t)&&t},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(t){return a(t)||f(t)&&t},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(t){return f(t)||Array.isArray(t)},message:'"audience" must be a string or array'},algorithm:{isValid:r.bind(null,d),message:'"algorithm" must be a valid string enum value'},header:{isValid:h,message:'"header" must be an object'},encoding:{isValid:f,message:'"encoding" must be a string'},issuer:{isValid:f,message:'"issuer" must be a string'},subject:{isValid:f,message:'"subject" must be a string'},jwtid:{isValid:f,message:'"jwtid" must be a string'},noTimestamp:{isValid:c,message:'"noTimestamp" must be a boolean'},keyid:{isValid:f,message:'"keyid" must be a string'},mutatePayload:{isValid:c,message:'"mutatePayload" must be a boolean'}};var v={iat:{isValid:u,message:'"iat" should be a number of seconds'},exp:{isValid:u,message:'"exp" should be a number of seconds'},nbf:{isValid:u,message:'"nbf" should be a number of seconds'}};function validate(t,e,i,n){if(!h(i)){throw new Error('Expected "'+n+'" to be a plain object.')}Object.keys(i).forEach(function(o){var s=t[o];if(!s){if(!e){throw new Error('"'+o+'" is not allowed in "'+n+'"')}return}if(!s.isValid(i[o])){throw new Error(s.message)}})}function validateOptions(t){return validate(l,false,t,"options")}function validatePayload(t){return validate(v,true,t,"payload")}var m={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"};var _=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];t.exports=function(t,e,i,o){if(typeof i==="function"){o=i;i={}}else{i=i||{}}var r=typeof t==="object"&&!Buffer.isBuffer(t);var c=Object.assign({alg:i.algorithm||"HS256",typ:r?"JWT":undefined,kid:i.keyid},i.header);function failure(t){if(o){return o(t)}throw t}if(!e&&i.algorithm!=="none"){return failure(new Error("secretOrPrivateKey must have a value"))}if(typeof t==="undefined"){return failure(new Error("payload is required"))}else if(r){try{validatePayload(t)}catch(t){return failure(t)}if(!i.mutatePayload){t=Object.assign({},t)}}else{var a=_.filter(function(t){return typeof i[t]!=="undefined"});if(a.length>0){return failure(new Error("invalid "+a.join(",")+" option for "+typeof t+" payload"))}}if(typeof t.exp!=="undefined"&&typeof i.expiresIn!=="undefined"){return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'))}if(typeof t.nbf!=="undefined"&&typeof i.notBefore!=="undefined"){return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'))}try{validateOptions(i)}catch(t){return failure(t)}var u=t.iat||Math.floor(Date.now()/1e3);if(i.noTimestamp){delete t.iat}else if(r){t.iat=u}if(typeof i.notBefore!=="undefined"){try{t.nbf=n(i.notBefore,u)}catch(t){return failure(t)}if(typeof t.nbf==="undefined"){return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}}if(typeof i.expiresIn!=="undefined"&&typeof t==="object"){try{t.exp=n(i.expiresIn,u)}catch(t){return failure(t)}if(typeof t.exp==="undefined"){return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}}Object.keys(m).forEach(function(e){var n=m[e];if(typeof i[e]!=="undefined"){if(typeof t[n]!=="undefined"){return failure(new Error('Bad "options.'+e+'" option. The payload already has an "'+n+'" property.'))}t[n]=i[e]}});var h=i.encoding||"utf8";if(typeof o==="function"){o=o&&p(o);s.createSign({header:c,privateKey:e,payload:t,encoding:h}).once("error",o).once("done",function(t){o(null,t)})}else{return s.sign({header:c,payload:t,secret:e,encoding:h})}}},12327:(t,e,i)=>{var n=i(405);var o=i(4383);var s=i(46637);var r=i(53359);var c=i(46098);var a=i(59085);var u=i(4636);var h=["RS256","RS384","RS512","ES256","ES384","ES512"];var f=["RS256","RS384","RS512"];var p=["HS256","HS384","HS512"];if(a){h.splice(3,0,"PS256","PS384","PS512");f.splice(3,0,"PS256","PS384","PS512")}t.exports=function(t,e,i,a){if(typeof i==="function"&&!a){a=i;i={}}if(!i){i={}}i=Object.assign({},i);var d;if(a){d=a}else{d=function(t,e){if(t)throw t;return e}}if(i.clockTimestamp&&typeof i.clockTimestamp!=="number"){return d(new n("clockTimestamp must be a number"))}if(i.nonce!==undefined&&(typeof i.nonce!=="string"||i.nonce.trim()==="")){return d(new n("nonce must be a non-empty string"))}var l=i.clockTimestamp||Math.floor(Date.now()/1e3);if(!t){return d(new n("jwt must be provided"))}if(typeof t!=="string"){return d(new n("jwt must be a string"))}var v=t.split(".");if(v.length!==3){return d(new n("jwt malformed"))}var m;try{m=r(t,{complete:true})}catch(t){return d(t)}if(!m){return d(new n("invalid token"))}var _=m.header;var g;if(typeof e==="function"){if(!a){return d(new n("verify must be called asynchronous if secret or public key is provided as a callback"))}g=e}else{g=function(t,i){return i(null,e)}}return g(_,function(e,r){if(e){return d(new n("error in secret or public key callback: "+e.message))}var a=v[2].trim()!=="";if(!a&&r){return d(new n("jwt signature is required"))}if(a&&!r){return d(new n("secret or public key must be provided"))}if(!a&&!i.algorithms){i.algorithms=["none"]}if(!i.algorithms){i.algorithms=~r.toString().indexOf("BEGIN CERTIFICATE")||~r.toString().indexOf("BEGIN PUBLIC KEY")?h:~r.toString().indexOf("BEGIN RSA PUBLIC KEY")?f:p}if(!~i.algorithms.indexOf(m.header.alg)){return d(new n("invalid algorithm"))}var g;try{g=u.verify(t,m.header.alg,r)}catch(t){return d(t)}if(!g){return d(new n("invalid signature"))}var y=m.payload;if(typeof y.nbf!=="undefined"&&!i.ignoreNotBefore){if(typeof y.nbf!=="number"){return d(new n("invalid nbf value"))}if(y.nbf>l+(i.clockTolerance||0)){return d(new o("jwt not active",new Date(y.nbf*1e3)))}}if(typeof y.exp!=="undefined"&&!i.ignoreExpiration){if(typeof y.exp!=="number"){return d(new n("invalid exp value"))}if(l>=y.exp+(i.clockTolerance||0)){return d(new s("jwt expired",new Date(y.exp*1e3)))}}if(i.audience){var S=Array.isArray(i.audience)?i.audience:[i.audience];var b=Array.isArray(y.aud)?y.aud:[y.aud];var w=b.some(function(t){return S.some(function(e){return e instanceof RegExp?e.test(t):e===t})});if(!w){return d(new n("jwt audience invalid. expected: "+S.join(" or ")))}}if(i.issuer){var L=typeof i.issuer==="string"&&y.iss!==i.issuer||Array.isArray(i.issuer)&&i.issuer.indexOf(y.iss)===-1;if(L){return d(new n("jwt issuer invalid. expected: "+i.issuer))}}if(i.subject){if(y.sub!==i.subject){return d(new n("jwt subject invalid. expected: "+i.subject))}}if(i.jwtid){if(y.jti!==i.jwtid){return d(new n("jwt jwtid invalid. expected: "+i.jwtid))}}if(i.nonce){if(y.nonce!==i.nonce){return d(new n("jwt nonce invalid. expected: "+i.nonce))}}if(i.maxAge){if(typeof y.iat!=="number"){return d(new n("iat required when maxAge is specified"))}var I=c(i.maxAge,y.iat);if(typeof I==="undefined"){return d(new n('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(l>=I+(i.clockTolerance||0)){return d(new s("maxAge exceeded",new Date(I*1e3)))}}if(i.complete===true){var O=m.signature;return d(null,{header:_,payload:y,signature:O})}return d(null,y)})}},96010:(t,e,i)=>{var n=i(9239);var o=i(21867).Buffer;var s=i(76417);var r=i(11728);var c=i(31669);var a='"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".';var u="secret must be a string or buffer";var h="key must be a string or a buffer";var f="key must be a string, a buffer or an object";var p=typeof s.createPublicKey==="function";if(p){h+=" or a KeyObject";u+="or a KeyObject"}function checkIsPublicKey(t){if(o.isBuffer(t)){return}if(typeof t==="string"){return}if(!p){throw typeError(h)}if(typeof t!=="object"){throw typeError(h)}if(typeof t.type!=="string"){throw typeError(h)}if(typeof t.asymmetricKeyType!=="string"){throw typeError(h)}if(typeof t.export!=="function"){throw typeError(h)}}function checkIsPrivateKey(t){if(o.isBuffer(t)){return}if(typeof t==="string"){return}if(typeof t==="object"){return}throw typeError(f)}function checkIsSecretKey(t){if(o.isBuffer(t)){return}if(typeof t==="string"){return t}if(!p){throw typeError(u)}if(typeof t!=="object"){throw typeError(u)}if(t.type!=="secret"){throw typeError(u)}if(typeof t.export!=="function"){throw typeError(u)}}function fromBase64(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function toBase64(t){t=t.toString();var e=4-t.length%4;if(e!==4){for(var i=0;i{var n=i(73334);var o=i(5522);var s=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];e.ALGORITHMS=s;e.sign=n.sign;e.verify=o.verify;e.decode=o.decode;e.isValid=o.isValid;e.createSign=function createSign(t){return new n(t)};e.createVerify=function createVerify(t){return new o(t)}},61868:(t,e,i)=>{var n=i(21867).Buffer;var o=i(92413);var s=i(31669);function DataStream(t){this.buffer=null;this.writable=true;this.readable=true;if(!t){this.buffer=n.alloc(0);return this}if(typeof t.pipe==="function"){this.buffer=n.alloc(0);t.pipe(this);return this}if(t.length||typeof t==="object"){this.buffer=t;this.writable=false;process.nextTick(function(){this.emit("end",t);this.readable=false;this.emit("close")}.bind(this));return this}throw new TypeError("Unexpected data type ("+typeof t+")")}s.inherits(DataStream,o);DataStream.prototype.write=function write(t){this.buffer=n.concat([this.buffer,n.from(t)]);this.emit("data",t)};DataStream.prototype.end=function end(t){if(t)this.write(t);this.emit("end",t);this.emit("close");this.writable=false;this.readable=false};t.exports=DataStream},73334:(t,e,i)=>{var n=i(21867).Buffer;var o=i(61868);var s=i(96010);var r=i(92413);var c=i(65292);var a=i(31669);function base64url(t,e){return n.from(t,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function jwsSecuredInput(t,e,i){i=i||"utf8";var n=base64url(c(t),"binary");var o=base64url(c(e),i);return a.format("%s.%s",n,o)}function jwsSign(t){var e=t.header;var i=t.payload;var n=t.secret||t.privateKey;var o=t.encoding;var r=s(e.alg);var c=jwsSecuredInput(e,i,o);var u=r.sign(c,n);return a.format("%s.%s",c,u)}function SignStream(t){var e=t.secret||t.privateKey||t.key;var i=new o(e);this.readable=true;this.header=t.header;this.encoding=t.encoding;this.secret=this.privateKey=this.key=i;this.payload=new o(t.payload);this.secret.once("close",function(){if(!this.payload.writable&&this.readable)this.sign()}.bind(this));this.payload.once("close",function(){if(!this.secret.writable&&this.readable)this.sign()}.bind(this))}a.inherits(SignStream,r);SignStream.prototype.sign=function sign(){try{var t=jwsSign({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});this.emit("done",t);this.emit("data",t);this.emit("end");this.readable=false;return t}catch(t){this.readable=false;this.emit("error",t);this.emit("close")}};SignStream.sign=jwsSign;t.exports=SignStream},65292:(t,e,i)=>{var n=i(64293).Buffer;t.exports=function toString(t){if(typeof t==="string")return t;if(typeof t==="number"||n.isBuffer(t))return t.toString();return JSON.stringify(t)}},5522:(t,e,i)=>{var n=i(21867).Buffer;var o=i(61868);var s=i(96010);var r=i(92413);var c=i(65292);var a=i(31669);var u=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function isObject(t){return Object.prototype.toString.call(t)==="[object Object]"}function safeJsonParse(t){if(isObject(t))return t;try{return JSON.parse(t)}catch(t){return undefined}}function headerFromJWS(t){var e=t.split(".",1)[0];return safeJsonParse(n.from(e,"base64").toString("binary"))}function securedInputFromJWS(t){return t.split(".",2).join(".")}function signatureFromJWS(t){return t.split(".")[2]}function payloadFromJWS(t,e){e=e||"utf8";var i=t.split(".")[1];return n.from(i,"base64").toString(e)}function isValidJws(t){return u.test(t)&&!!headerFromJWS(t)}function jwsVerify(t,e,i){if(!e){var n=new Error("Missing algorithm parameter for jws.verify");n.code="MISSING_ALGORITHM";throw n}t=c(t);var o=signatureFromJWS(t);var r=securedInputFromJWS(t);var a=s(e);return a.verify(r,o,i)}function jwsDecode(t,e){e=e||{};t=c(t);if(!isValidJws(t))return null;var i=headerFromJWS(t);if(!i)return null;var n=payloadFromJWS(t);if(i.typ==="JWT"||e.json)n=JSON.parse(n,e.encoding);return{header:i,payload:n,signature:signatureFromJWS(t)}}function VerifyStream(t){t=t||{};var e=t.secret||t.publicKey||t.key;var i=new o(e);this.readable=true;this.algorithm=t.algorithm;this.encoding=t.encoding;this.secret=this.publicKey=this.key=i;this.signature=new o(t.signature);this.secret.once("close",function(){if(!this.signature.writable&&this.readable)this.verify()}.bind(this));this.signature.once("close",function(){if(!this.secret.writable&&this.readable)this.verify()}.bind(this))}a.inherits(VerifyStream,r);VerifyStream.prototype.verify=function verify(){try{var t=jwsVerify(this.signature.buffer,this.algorithm,this.key.buffer);var e=jwsDecode(this.signature.buffer,this.encoding);this.emit("done",t,e);this.emit("data",t);this.emit("end");this.readable=false;return t}catch(t){this.readable=false;this.emit("error",t);this.emit("close")}};VerifyStream.decode=jwsDecode;VerifyStream.isValid=isValidJws;VerifyStream.verify=jwsVerify;t.exports=VerifyStream},17931:t=>{var e=1/0,i=9007199254740991,n=1.7976931348623157e308,o=0/0;var s="[object Arguments]",r="[object Function]",c="[object GeneratorFunction]",a="[object String]",u="[object Symbol]";var h=/^\s+|\s+$/g;var f=/^[-+]0x[0-9a-f]+$/i;var p=/^0b[01]+$/i;var d=/^0o[0-7]+$/i;var l=/^(?:0|[1-9]\d*)$/;var v=parseInt;function arrayMap(t,e){var i=-1,n=t?t.length:0,o=Array(n);while(++i-1&&t%1==0&&t-1:!!o&&baseIndexOf(t,e,i)>-1}function isArguments(t){return isArrayLikeObject(t)&&_.call(t,"callee")&&(!y.call(t,"callee")||g.call(t)==s)}var w=Array.isArray;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isFunction(t){var e=isObject(t)?g.call(t):"";return e==r||e==c}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=i}function isObject(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}function isString(t){return typeof t=="string"||!w(t)&&isObjectLike(t)&&g.call(t)==a}function isSymbol(t){return typeof t=="symbol"||isObjectLike(t)&&g.call(t)==u}function toFinite(t){if(!t){return t===0?t:0}t=toNumber(t);if(t===e||t===-e){var i=t<0?-1:1;return i*n}return t===t?t:0}function toInteger(t){var e=toFinite(t),i=e%1;return e===e?i?e-i:e:0}function toNumber(t){if(typeof t=="number"){return t}if(isSymbol(t)){return o}if(isObject(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=isObject(e)?e+"":e}if(typeof t!="string"){return t===0?t:+t}t=t.replace(h,"");var i=p.test(t);return i||d.test(t)?v(t.slice(2),i?2:8):f.test(t)?o:+t}function keys(t){return isArrayLike(t)?arrayLikeKeys(t):baseKeys(t)}function values(t){return t?baseValues(t,keys(t)):[]}t.exports=includes},16501:t=>{var e="[object Boolean]";var i=Object.prototype;var n=i.toString;function isBoolean(t){return t===true||t===false||isObjectLike(t)&&n.call(t)==e}function isObjectLike(t){return!!t&&typeof t=="object"}t.exports=isBoolean},21441:t=>{var e=1/0,i=1.7976931348623157e308,n=0/0;var o="[object Symbol]";var s=/^\s+|\s+$/g;var r=/^[-+]0x[0-9a-f]+$/i;var c=/^0b[01]+$/i;var a=/^0o[0-7]+$/i;var u=parseInt;var h=Object.prototype;var f=h.toString;function isInteger(t){return typeof t=="number"&&t==toInteger(t)}function isObject(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}function isSymbol(t){return typeof t=="symbol"||isObjectLike(t)&&f.call(t)==o}function toFinite(t){if(!t){return t===0?t:0}t=toNumber(t);if(t===e||t===-e){var n=t<0?-1:1;return n*i}return t===t?t:0}function toInteger(t){var e=toFinite(t),i=e%1;return e===e?i?e-i:e:0}function toNumber(t){if(typeof t=="number"){return t}if(isSymbol(t)){return n}if(isObject(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=isObject(e)?e+"":e}if(typeof t!="string"){return t===0?t:+t}t=t.replace(s,"");var i=c.test(t);return i||a.test(t)?u(t.slice(2),i?2:8):r.test(t)?n:+t}t.exports=isInteger},40298:t=>{var e="[object Number]";var i=Object.prototype;var n=i.toString;function isObjectLike(t){return!!t&&typeof t=="object"}function isNumber(t){return typeof t=="number"||isObjectLike(t)&&n.call(t)==e}t.exports=isNumber},25723:t=>{var e="[object Object]";function isHostObject(t){var e=false;if(t!=null&&typeof t.toString!="function"){try{e=!!(t+"")}catch(t){}}return e}function overArg(t,e){return function(i){return t(e(i))}}var i=Function.prototype,n=Object.prototype;var o=i.toString;var s=n.hasOwnProperty;var r=o.call(Object);var c=n.toString;var a=overArg(Object.getPrototypeOf,Object);function isObjectLike(t){return!!t&&typeof t=="object"}function isPlainObject(t){if(!isObjectLike(t)||c.call(t)!=e||isHostObject(t)){return false}var i=a(t);if(i===null){return true}var n=s.call(i,"constructor")&&i.constructor;return typeof n=="function"&&n instanceof n&&o.call(n)==r}t.exports=isPlainObject},25180:t=>{var e="[object String]";var i=Object.prototype;var n=i.toString;var o=Array.isArray;function isObjectLike(t){return!!t&&typeof t=="object"}function isString(t){return typeof t=="string"||!o(t)&&isObjectLike(t)&&n.call(t)==e}t.exports=isString},94499:t=>{var e="Expected a function";var i=1/0,n=1.7976931348623157e308,o=0/0;var s="[object Symbol]";var r=/^\s+|\s+$/g;var c=/^[-+]0x[0-9a-f]+$/i;var a=/^0b[01]+$/i;var u=/^0o[0-7]+$/i;var h=parseInt;var f=Object.prototype;var p=f.toString;function before(t,i){var n;if(typeof i!="function"){throw new TypeError(e)}t=toInteger(t);return function(){if(--t>0){n=i.apply(this,arguments)}if(t<=1){i=undefined}return n}}function once(t){return before(2,t)}function isObject(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}function isSymbol(t){return typeof t=="symbol"||isObjectLike(t)&&p.call(t)==s}function toFinite(t){if(!t){return t===0?t:0}t=toNumber(t);if(t===i||t===-i){var e=t<0?-1:1;return e*n}return t===t?t:0}function toInteger(t){var e=toFinite(t),i=e%1;return e===e?i?e-i:e:0}function toNumber(t){if(typeof t=="number"){return t}if(isSymbol(t)){return o}if(isObject(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=isObject(e)?e+"":e}if(typeof t!="string"){return t===0?t:+t}t=t.replace(r,"");var i=a.test(t);return i||u.test(t)?h(t.slice(2),i?2:8):c.test(t)?o:+t}t.exports=once},90250:function(t,e,i){t=i.nmd(t);(function(){var i;var n="4.17.20";var o=200;var s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",r="Expected a function";var c="__lodash_hash_undefined__";var a=500;var u="__lodash_placeholder__";var h=1,f=2,p=4;var d=1,l=2;var v=1,m=2,_=4,g=8,y=16,S=32,b=64,w=128,L=256,I=512;var O=30,N="...";var x=800,C=16;var P=1,k=2,F=3;var T=1/0,J=9007199254740991,E=1.7976931348623157e308,j=0/0;var U=4294967295,A=U-1,D=U>>>1;var R=[["ary",w],["bind",v],["bindKey",m],["curry",g],["curryRight",y],["flip",I],["partial",S],["partialRight",b],["rearg",L]];var M="[object Arguments]",W="[object Array]",q="[object AsyncFunction]",z="[object Boolean]",$="[object Date]",G="[object DOMException]",V="[object Error]",B="[object Function]",Q="[object GeneratorFunction]",K="[object Map]",H="[object Number]",X="[object Null]",Y="[object Object]",Z="[object Promise]",tt="[object Proxy]",et="[object RegExp]",it="[object Set]",nt="[object String]",ot="[object Symbol]",st="[object Undefined]",rt="[object WeakMap]",ct="[object WeakSet]";var at="[object ArrayBuffer]",ut="[object DataView]",ht="[object Float32Array]",ft="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",lt="[object Int32Array]",vt="[object Uint8Array]",mt="[object Uint8ClampedArray]",_t="[object Uint16Array]",gt="[object Uint32Array]";var yt=/\b__p \+= '';/g,St=/\b(__p \+=) '' \+/g,bt=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var wt=/&(?:amp|lt|gt|quot|#39);/g,Lt=/[&<>"']/g,It=RegExp(wt.source),Ot=RegExp(Lt.source);var Nt=/<%-([\s\S]+?)%>/g,xt=/<%([\s\S]+?)%>/g,Ct=/<%=([\s\S]+?)%>/g;var Pt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kt=/^\w*$/,Ft=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var Tt=/[\\^$.*+?()[\]{}|]/g,Jt=RegExp(Tt.source);var Et=/^\s+|\s+$/g,jt=/^\s+/,Ut=/\s+$/;var At=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Dt=/\{\n\/\* \[wrapped with (.+)\] \*/,Rt=/,? & /;var Mt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Wt=/\\(\\)?/g;var qt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var zt=/\w*$/;var $t=/^[-+]0x[0-9a-f]+$/i;var Gt=/^0b[01]+$/i;var Vt=/^\[object .+?Constructor\]$/;var Bt=/^0o[0-7]+$/i;var Qt=/^(?:0|[1-9]\d*)$/;var Kt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;var Ht=/($^)/;var Xt=/['\n\r\u2028\u2029\\]/g;var Yt="\\ud800-\\udfff",Zt="\\u0300-\\u036f",te="\\ufe20-\\ufe2f",ee="\\u20d0-\\u20ff",ie=Zt+te+ee,ne="\\u2700-\\u27bf",oe="a-z\\xdf-\\xf6\\xf8-\\xff",se="\\xac\\xb1\\xd7\\xf7",re="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ce="\\u2000-\\u206f",ae=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ue="A-Z\\xc0-\\xd6\\xd8-\\xde",he="\\ufe0e\\ufe0f",fe=se+re+ce+ae;var pe="['’]",de="["+Yt+"]",le="["+fe+"]",ve="["+ie+"]",me="\\d+",_e="["+ne+"]",ge="["+oe+"]",ye="[^"+Yt+fe+me+ne+oe+ue+"]",Se="\\ud83c[\\udffb-\\udfff]",be="(?:"+ve+"|"+Se+")",we="[^"+Yt+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",Oe="["+ue+"]",Ne="\\u200d";var xe="(?:"+ge+"|"+ye+")",Ce="(?:"+Oe+"|"+ye+")",Pe="(?:"+pe+"(?:d|ll|m|re|s|t|ve))?",ke="(?:"+pe+"(?:D|LL|M|RE|S|T|VE))?",Fe=be+"?",Te="["+he+"]?",Je="(?:"+Ne+"(?:"+[we,Le,Ie].join("|")+")"+Te+Fe+")*",Ee="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ue=Te+Fe+Je,Ae="(?:"+[_e,Le,Ie].join("|")+")"+Ue,De="(?:"+[we+ve+"?",ve,Le,Ie,de].join("|")+")";var Re=RegExp(pe,"g");var Me=RegExp(ve,"g");var We=RegExp(Se+"(?="+Se+")|"+De+Ue,"g");var qe=RegExp([Oe+"?"+ge+"+"+Pe+"(?="+[le,Oe,"$"].join("|")+")",Ce+"+"+ke+"(?="+[le,Oe+xe,"$"].join("|")+")",Oe+"?"+xe+"+"+Pe,Oe+"+"+ke,je,Ee,me,Ae].join("|"),"g");var ze=RegExp("["+Ne+Yt+ie+he+"]");var $e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ge=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"];var Ve=-1;var Be={};Be[ht]=Be[ft]=Be[pt]=Be[dt]=Be[lt]=Be[vt]=Be[mt]=Be[_t]=Be[gt]=true;Be[M]=Be[W]=Be[at]=Be[z]=Be[ut]=Be[$]=Be[V]=Be[B]=Be[K]=Be[H]=Be[Y]=Be[et]=Be[it]=Be[nt]=Be[rt]=false;var Qe={};Qe[M]=Qe[W]=Qe[at]=Qe[ut]=Qe[z]=Qe[$]=Qe[ht]=Qe[ft]=Qe[pt]=Qe[dt]=Qe[lt]=Qe[K]=Qe[H]=Qe[Y]=Qe[et]=Qe[it]=Qe[nt]=Qe[ot]=Qe[vt]=Qe[mt]=Qe[_t]=Qe[gt]=true;Qe[V]=Qe[B]=Qe[rt]=false;var Ke={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"};var He={"&":"&","<":"<",">":">",'"':""","'":"'"};var Xe={"&":"&","<":"<",">":">",""":'"',"'":"'"};var Ye={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var Ze=parseFloat,ti=parseInt;var ei=typeof global=="object"&&global&&global.Object===Object&&global;var ii=typeof self=="object"&&self&&self.Object===Object&&self;var ni=ei||ii||Function("return this")();var oi=true&&e&&!e.nodeType&&e;var si=oi&&"object"=="object"&&t&&!t.nodeType&&t;var ri=si&&si.exports===oi;var ci=ri&&ei.process;var ai=function(){try{var t=si&&si.require&&si.require("util").types;if(t){return t}return ci&&ci.binding&&ci.binding("util")}catch(t){}}();var ui=ai&&ai.isArrayBuffer,hi=ai&&ai.isDate,fi=ai&&ai.isMap,pi=ai&&ai.isRegExp,di=ai&&ai.isSet,li=ai&&ai.isTypedArray;function apply(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}function arrayAggregator(t,e,i,n){var o=-1,s=t==null?0:t.length;while(++o-1}function arrayIncludesWith(t,e,i){var n=-1,o=t==null?0:t.length;while(++n-1){}return i}function charsEndIndex(t,e){var i=t.length;while(i--&&baseIndexOf(e,t[i],0)>-1){}return i}function countHolders(t,e){var i=t.length,n=0;while(i--){if(t[i]===e){++n}}return n}var mi=basePropertyOf(Ke);var _i=basePropertyOf(He);function escapeStringChar(t){return"\\"+Ye[t]}function getValue(t,e){return t==null?i:t[e]}function hasUnicode(t){return ze.test(t)}function hasUnicodeWord(t){return $e.test(t)}function iteratorToArray(t){var e,i=[];while(!(e=t.next()).done){i.push(e.value)}return i}function mapToArray(t){var e=-1,i=Array(t.size);t.forEach(function(t,n){i[++e]=[n,t]});return i}function overArg(t,e){return function(i){return t(e(i))}}function replaceHolders(t,e){var i=-1,n=t.length,o=0,s=[];while(++i-1}function listCacheSet(t,e){var i=this.__data__,n=assocIndexOf(i,t);if(n<0){++this.size;i.push([t,e])}else{i[n][1]=e}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e=e?t:e}}return t}function baseClone(t,e,n,o,s,r){var c,a=e&h,u=e&f,d=e&p;if(n){c=s?n(t,o,s,r):n(t)}if(c!==i){return c}if(!isObject(t)){return t}var l=Fn(t);if(l){c=initCloneArray(t);if(!a){return copyArray(t,c)}}else{var v=Mi(t),m=v==B||v==Q;if(Jn(t)){return cloneBuffer(t,a)}if(v==Y||v==M||m&&!s){c=u||m?{}:initCloneObject(t);if(!a){return u?copySymbolsIn(t,baseAssignIn(c,t)):copySymbols(t,baseAssign(c,t))}}else{if(!Qe[v]){return s?t:{}}c=initCloneByTag(t,v,a)}}r||(r=new Stack);var _=r.get(t);if(_){return _}r.set(t,c);if(An(t)){t.forEach(function(i){c.add(baseClone(i,e,n,i,t,r))})}else if(jn(t)){t.forEach(function(i,o){c.set(o,baseClone(i,e,n,o,t,r))})}var g=d?u?getAllKeysIn:getAllKeys:u?keysIn:keys;var y=l?i:g(t);arrayEach(y||t,function(i,o){if(y){o=i;i=t[o]}assignValue(c,o,baseClone(i,e,n,o,t,r))});return c}function baseConforms(t){var e=keys(t);return function(i){return baseConformsTo(i,t,e)}}function baseConformsTo(t,e,n){var o=n.length;if(t==null){return!o}t=ee(t);while(o--){var s=n[o],r=e[s],c=t[s];if(c===i&&!(s in t)||!r(c)){return false}}return true}function baseDelay(t,e,n){if(typeof t!="function"){throw new oe(r)}return zi(function(){t.apply(i,n)},e)}function baseDifference(t,e,i,n){var s=-1,r=arrayIncludes,c=true,a=t.length,u=[],h=e.length;if(!a){return u}if(i){e=arrayMap(e,baseUnary(i))}if(n){r=arrayIncludesWith;c=false}else if(e.length>=o){r=cacheHas;c=false;e=new SetCache(e)}t:while(++ss?0:s+n}o=o===i||o>s?s:toInteger(o);if(o<0){o+=s}o=n>o?0:toLength(o);while(n0&&i(c)){if(e>1){baseFlatten(c,e-1,i,n,o)}else{arrayPush(o,c)}}else if(!n){o[o.length]=c}}return o}var ki=createBaseFor();var Fi=createBaseFor(true);function baseForOwn(t,e){return t&&ki(t,e,keys)}function baseForOwnRight(t,e){return t&&Fi(t,e,keys)}function baseFunctions(t,e){return arrayFilter(e,function(e){return isFunction(t[e])})}function baseGet(t,e){e=castPath(e,t);var n=0,o=e.length;while(t!=null&&ne}function baseHas(t,e){return t!=null&&he.call(t,e)}function baseHasIn(t,e){return t!=null&&e in ee(t)}function baseInRange(t,e,i){return t>=qe(e,i)&&t=120&&p.length>=120)?new SetCache(a&&p):i}p=t[0];var d=-1,l=u[0];t:while(++d-1){if(c!==t){Ie.call(c,a,1)}Ie.call(t,a,1)}}return t}function basePullAt(t,e){var i=t?e.length:0,n=i-1;while(i--){var o=e[i];if(i==n||o!==s){var s=o;if(isIndex(o)){Ie.call(t,o,1)}else{baseUnset(t,o)}}}return t}function baseRandom(t,e){return t+Je(Ke()*(e-t+1))}function baseRange(t,i,n,o){var s=-1,r=We(Te((i-t)/(n||1)),0),c=e(r);while(r--){c[o?r:++s]=t;t+=n}return c}function baseRepeat(t,e){var i="";if(!t||e<1||e>J){return i}do{if(e%2){i+=t}e=Je(e/2);if(e){t+=t}}while(e);return i}function baseRest(t,e){return $i(overRest(t,e,identity),t+"")}function baseSample(t){return arraySample(values(t))}function baseSampleSize(t,e){var i=values(t);return shuffleSelf(i,baseClamp(e,0,i.length))}function baseSet(t,e,n,o){if(!isObject(t)){return t}e=castPath(e,t);var s=-1,r=e.length,c=r-1,a=t;while(a!=null&&++ss?0:s+i}n=n>s?s:n;if(n<0){n+=s}s=i>n?0:n-i>>>0;i>>>=0;var r=e(s);while(++o>>1,r=t[s];if(r!==null&&!isSymbol(r)&&(i?r<=e:r=o){var h=e?null:Ui(t);if(h){return setToArray(h)}c=false;s=cacheHas;u=new SetCache}else{u=e?[]:a}t:while(++n=o?t:baseSlice(t,e,n)}var ji=Pe||function(t){return ni.clearTimeout(t)};function cloneBuffer(t,e){if(e){return t.slice()}var i=t.length,n=Se?Se(i):new t.constructor(i);t.copy(n);return n}function cloneArrayBuffer(t){var e=new t.constructor(t.byteLength);new ye(e).set(new ye(t));return e}function cloneDataView(t,e){var i=e?cloneArrayBuffer(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}function cloneRegExp(t){var e=new t.constructor(t.source,zt.exec(t));e.lastIndex=t.lastIndex;return e}function cloneSymbol(t){return Oi?ee(Oi.call(t)):{}}function cloneTypedArray(t,e){var i=e?cloneArrayBuffer(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function compareAscending(t,e){if(t!==e){var n=t!==i,o=t===null,s=t===t,r=isSymbol(t);var c=e!==i,a=e===null,u=e===e,h=isSymbol(e);if(!a&&!h&&!r&&t>e||r&&c&&u&&!a&&!h||o&&c&&u||!n&&u||!s){return 1}if(!o&&!r&&!h&&t=c){return a}var u=i[n];return a*(u=="desc"?-1:1)}}return t.index-e.index}function composeArgs(t,i,n,o){var s=-1,r=t.length,c=n.length,a=-1,u=i.length,h=We(r-c,0),f=e(u+h),p=!o;while(++a1?n[s-1]:i,c=s>2?n[2]:i;r=t.length>3&&typeof r=="function"?(s--,r):i;if(c&&isIterateeCall(n[0],n[1],c)){r=s<3?i:r;s=1}e=ee(e);while(++o-1?s[r?e[c]:c]:i}}function createFlow(t){return flatRest(function(e){var n=e.length,o=n,s=LodashWrapper.prototype.thru;if(t){e.reverse()}while(o--){var c=e[o];if(typeof c!="function"){throw new oe(r)}if(s&&!a&&getFuncName(c)=="wrapper"){var a=new LodashWrapper([],true)}}o=a?o:n;while(++o1){v.reverse()}if(p&&ha)){return false}var h=r.get(t);var f=r.get(e);if(h&&f){return h==e&&f==t}var p=-1,v=true,m=n&l?new SetCache:i;r.set(t,e);r.set(e,t);while(++p1?"& ":"")+e[n];e=e.join(i>2?", ":" ");return t.replace(At,"{\n/* [wrapped with "+e+"] */\n")}function isFlattenable(t){return Fn(t)||kn(t)||!!(Oe&&t&&t[Oe])}function isIndex(t,e){var i=typeof t;e=e==null?J:e;return!!e&&(i=="number"||i!="symbol"&&Qt.test(t))&&(t>-1&&t%1==0&&t0){if(++e>=x){return arguments[0]}}else{e=0}return t.apply(i,arguments)}}function shuffleSelf(t,e){var n=-1,o=t.length,s=o-1;e=e===i?o:e;while(++n1?t[e-1]:i;n=typeof n=="function"?(t.pop(),n):i;return unzipWith(t,n)});function chain(t){var e=lodash(t);e.__chain__=true;return e}function tap(t,e){e(t);return t}function thru(t,e){return e(t)}var hn=flatRest(function(t){var e=t.length,n=e?t[0]:0,o=this.__wrapped__,s=function(e){return baseAt(e,t)};if(e>1||this.__actions__.length||!(o instanceof LazyWrapper)||!isIndex(n)){return this.thru(s)}o=o.slice(n,+n+(e?1:0));o.__actions__.push({func:thru,args:[s],thisArg:i});return new LodashWrapper(o,this.__chain__).thru(function(t){if(e&&!t.length){t.push(i)}return t})});function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}function wrapperNext(){if(this.__values__===i){this.__values__=toArray(this.value())}var t=this.__index__>=this.__values__.length,e=t?i:this.__values__[this.__index__++];return{done:t,value:e}}function wrapperToIterator(){return this}function wrapperPlant(t){var e,n=this;while(n instanceof baseLodash){var o=wrapperClone(n);o.__index__=0;o.__values__=i;if(e){s.__wrapped__=o}else{e=o}var s=o;n=n.__wrapped__}s.__wrapped__=t;return e}function wrapperReverse(){var t=this.__wrapped__;if(t instanceof LazyWrapper){var e=t;if(this.__actions__.length){e=new LazyWrapper(this)}e=e.reverse();e.__actions__.push({func:thru,args:[reverse],thisArg:i});return new LodashWrapper(e,this.__chain__)}return this.thru(reverse)}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}var fn=createAggregator(function(t,e,i){if(he.call(t,i)){++t[i]}else{baseAssignValue(t,i,1)}});function every(t,e,n){var o=Fn(t)?arrayEvery:baseEvery;if(n&&isIterateeCall(t,e,n)){e=i}return o(t,getIteratee(e,3))}function filter(t,e){var i=Fn(t)?arrayFilter:baseFilter;return i(t,getIteratee(e,3))}var pn=createFind(findIndex);var dn=createFind(findLastIndex);function flatMap(t,e){return baseFlatten(map(t,e),1)}function flatMapDeep(t,e){return baseFlatten(map(t,e),T)}function flatMapDepth(t,e,n){n=n===i?1:toInteger(n);return baseFlatten(map(t,e),n)}function forEach(t,e){var i=Fn(t)?arrayEach:Ci;return i(t,getIteratee(e,3))}function forEachRight(t,e){var i=Fn(t)?arrayEachRight:Pi;return i(t,getIteratee(e,3))}var ln=createAggregator(function(t,e,i){if(he.call(t,i)){t[i].push(e)}else{baseAssignValue(t,i,[e])}});function includes(t,e,i,n){t=isArrayLike(t)?t:values(t);i=i&&!n?toInteger(i):0;var o=t.length;if(i<0){i=We(o+i,0)}return isString(t)?i<=o&&t.indexOf(e,i)>-1:!!o&&baseIndexOf(t,e,i)>-1}var vn=baseRest(function(t,i,n){var o=-1,s=typeof i=="function",r=isArrayLike(t)?e(t.length):[];Ci(t,function(t){r[++o]=s?apply(i,t,n):baseInvoke(t,i,n)});return r});var mn=createAggregator(function(t,e,i){baseAssignValue(t,i,e)});function map(t,e){var i=Fn(t)?arrayMap:baseMap;return i(t,getIteratee(e,3))}function orderBy(t,e,n,o){if(t==null){return[]}if(!Fn(e)){e=e==null?[]:[e]}n=o?i:n;if(!Fn(n)){n=n==null?[]:[n]}return baseOrderBy(t,e,n)}var _n=createAggregator(function(t,e,i){t[i?0:1].push(e)},function(){return[[],[]]});function reduce(t,e,i){var n=Fn(t)?arrayReduce:baseReduce,o=arguments.length<3;return n(t,getIteratee(e,4),i,o,Ci)}function reduceRight(t,e,i){var n=Fn(t)?arrayReduceRight:baseReduce,o=arguments.length<3;return n(t,getIteratee(e,4),i,o,Pi)}function reject(t,e){var i=Fn(t)?arrayFilter:baseFilter;return i(t,negate(getIteratee(e,3)))}function sample(t){var e=Fn(t)?arraySample:baseSample;return e(t)}function sampleSize(t,e,n){if(n?isIterateeCall(t,e,n):e===i){e=1}else{e=toInteger(e)}var o=Fn(t)?arraySampleSize:baseSampleSize;return o(t,e)}function shuffle(t){var e=Fn(t)?arrayShuffle:baseShuffle;return e(t)}function size(t){if(t==null){return 0}if(isArrayLike(t)){return isString(t)?stringSize(t):t.length}var e=Mi(t);if(e==K||e==it){return t.size}return baseKeys(t).length}function some(t,e,n){var o=Fn(t)?arraySome:baseSome;if(n&&isIterateeCall(t,e,n)){e=i}return o(t,getIteratee(e,3))}var gn=baseRest(function(t,e){if(t==null){return[]}var i=e.length;if(i>1&&isIterateeCall(t,e[0],e[1])){e=[]}else if(i>2&&isIterateeCall(e[0],e[1],e[2])){e=[e[0]]}return baseOrderBy(t,baseFlatten(e,1),[])});var yn=ke||function(){return ni.Date.now()};function after(t,e){if(typeof e!="function"){throw new oe(r)}t=toInteger(t);return function(){if(--t<1){return e.apply(this,arguments)}}}function ary(t,e,n){e=n?i:e;e=t&&e==null?t.length:e;return createWrap(t,w,i,i,i,i,e)}function before(t,e){var n;if(typeof e!="function"){throw new oe(r)}t=toInteger(t);return function(){if(--t>0){n=e.apply(this,arguments)}if(t<=1){e=i}return n}}var Sn=baseRest(function(t,e,i){var n=v;if(i.length){var o=replaceHolders(i,getHolder(Sn));n|=S}return createWrap(t,n,e,i,o)});var bn=baseRest(function(t,e,i){var n=v|m;if(i.length){var o=replaceHolders(i,getHolder(bn));n|=S}return createWrap(e,n,t,i,o)});function curry(t,e,n){e=n?i:e;var o=createWrap(t,g,i,i,i,i,i,e);o.placeholder=curry.placeholder;return o}function curryRight(t,e,n){e=n?i:e;var o=createWrap(t,y,i,i,i,i,i,e);o.placeholder=curryRight.placeholder;return o}function debounce(t,e,n){var o,s,c,a,u,h,f=0,p=false,d=false,l=true;if(typeof t!="function"){throw new oe(r)}e=toNumber(e)||0;if(isObject(n)){p=!!n.leading;d="maxWait"in n;c=d?We(toNumber(n.maxWait)||0,e):c;l="trailing"in n?!!n.trailing:l}function invokeFunc(e){var n=o,r=s;o=s=i;f=e;a=t.apply(r,n);return a}function leadingEdge(t){f=t;u=zi(timerExpired,e);return p?invokeFunc(t):a}function remainingWait(t){var i=t-h,n=t-f,o=e-i;return d?qe(o,c-n):o}function shouldInvoke(t){var n=t-h,o=t-f;return h===i||n>=e||n<0||d&&o>=c}function timerExpired(){var t=yn();if(shouldInvoke(t)){return trailingEdge(t)}u=zi(timerExpired,remainingWait(t))}function trailingEdge(t){u=i;if(l&&o){return invokeFunc(t)}o=s=i;return a}function cancel(){if(u!==i){ji(u)}f=0;o=h=s=u=i}function flush(){return u===i?a:trailingEdge(yn())}function debounced(){var t=yn(),n=shouldInvoke(t);o=arguments;s=this;h=t;if(n){if(u===i){return leadingEdge(h)}if(d){ji(u);u=zi(timerExpired,e);return invokeFunc(h)}}if(u===i){u=zi(timerExpired,e)}return a}debounced.cancel=cancel;debounced.flush=flush;return debounced}var wn=baseRest(function(t,e){return baseDelay(t,1,e)});var Ln=baseRest(function(t,e,i){return baseDelay(t,toNumber(e)||0,i)});function flip(t){return createWrap(t,I)}function memoize(t,e){if(typeof t!="function"||e!=null&&typeof e!="function"){throw new oe(r)}var i=function(){var n=arguments,o=e?e.apply(this,n):n[0],s=i.cache;if(s.has(o)){return s.get(o)}var r=t.apply(this,n);i.cache=s.set(o,r)||s;return r};i.cache=new(memoize.Cache||MapCache);return i}memoize.Cache=MapCache;function negate(t){if(typeof t!="function"){throw new oe(r)}return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function once(t){return before(2,t)}var In=Ei(function(t,e){e=e.length==1&&Fn(e[0])?arrayMap(e[0],baseUnary(getIteratee())):arrayMap(baseFlatten(e,1),baseUnary(getIteratee()));var i=e.length;return baseRest(function(n){var o=-1,s=qe(n.length,i);while(++o=e});var kn=baseIsArguments(function(){return arguments}())?baseIsArguments:function(t){return isObjectLike(t)&&he.call(t,"callee")&&!Le.call(t,"callee")};var Fn=e.isArray;var Tn=ui?baseUnary(ui):baseIsArrayBuffer;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isBoolean(t){return t===true||t===false||isObjectLike(t)&&baseGetTag(t)==z}var Jn=je||stubFalse;var En=hi?baseUnary(hi):baseIsDate;function isElement(t){return isObjectLike(t)&&t.nodeType===1&&!isPlainObject(t)}function isEmpty(t){if(t==null){return true}if(isArrayLike(t)&&(Fn(t)||typeof t=="string"||typeof t.splice=="function"||Jn(t)||Dn(t)||kn(t))){return!t.length}var e=Mi(t);if(e==K||e==it){return!t.size}if(isPrototype(t)){return!baseKeys(t).length}for(var i in t){if(he.call(t,i)){return false}}return true}function isEqual(t,e){return baseIsEqual(t,e)}function isEqualWith(t,e,n){n=typeof n=="function"?n:i;var o=n?n(t,e):i;return o===i?baseIsEqual(t,e,i,n):!!o}function isError(t){if(!isObjectLike(t)){return false}var e=baseGetTag(t);return e==V||e==G||typeof t.message=="string"&&typeof t.name=="string"&&!isPlainObject(t)}function isFinite(t){return typeof t=="number"&&Ue(t)}function isFunction(t){if(!isObject(t)){return false}var e=baseGetTag(t);return e==B||e==Q||e==q||e==tt}function isInteger(t){return typeof t=="number"&&t==toInteger(t)}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=J}function isObject(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function isObjectLike(t){return t!=null&&typeof t=="object"}var jn=fi?baseUnary(fi):baseIsMap;function isMatch(t,e){return t===e||baseIsMatch(t,e,getMatchData(e))}function isMatchWith(t,e,n){n=typeof n=="function"?n:i;return baseIsMatch(t,e,getMatchData(e),n)}function isNaN(t){return isNumber(t)&&t!=+t}function isNative(t){if(Wi(t)){throw new Yt(s)}return baseIsNative(t)}function isNull(t){return t===null}function isNil(t){return t==null}function isNumber(t){return typeof t=="number"||isObjectLike(t)&&baseGetTag(t)==H}function isPlainObject(t){if(!isObjectLike(t)||baseGetTag(t)!=Y){return false}var e=be(t);if(e===null){return true}var i=he.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&ue.call(i)==le}var Un=pi?baseUnary(pi):baseIsRegExp;function isSafeInteger(t){return isInteger(t)&&t>=-J&&t<=J}var An=di?baseUnary(di):baseIsSet;function isString(t){return typeof t=="string"||!Fn(t)&&isObjectLike(t)&&baseGetTag(t)==nt}function isSymbol(t){return typeof t=="symbol"||isObjectLike(t)&&baseGetTag(t)==ot}var Dn=li?baseUnary(li):baseIsTypedArray;function isUndefined(t){return t===i}function isWeakMap(t){return isObjectLike(t)&&Mi(t)==rt}function isWeakSet(t){return isObjectLike(t)&&baseGetTag(t)==ct}var Rn=createRelationalOperation(baseLt);var Mn=createRelationalOperation(function(t,e){return t<=e});function toArray(t){if(!t){return[]}if(isArrayLike(t)){return isString(t)?stringToArray(t):copyArray(t)}if(Ne&&t[Ne]){return iteratorToArray(t[Ne]())}var e=Mi(t),i=e==K?mapToArray:e==it?setToArray:values;return i(t)}function toFinite(t){if(!t){return t===0?t:0}t=toNumber(t);if(t===T||t===-T){var e=t<0?-1:1;return e*E}return t===t?t:0}function toInteger(t){var e=toFinite(t),i=e%1;return e===e?i?e-i:e:0}function toLength(t){return t?baseClamp(toInteger(t),0,U):0}function toNumber(t){if(typeof t=="number"){return t}if(isSymbol(t)){return j}if(isObject(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=isObject(e)?e+"":e}if(typeof t!="string"){return t===0?t:+t}t=t.replace(Et,"");var i=Gt.test(t);return i||Bt.test(t)?ti(t.slice(2),i?2:8):$t.test(t)?j:+t}function toPlainObject(t){return copyObject(t,keysIn(t))}function toSafeInteger(t){return t?baseClamp(toInteger(t),-J,J):t===0?t:0}function toString(t){return t==null?"":baseToString(t)}var Wn=createAssigner(function(t,e){if(isPrototype(e)||isArrayLike(e)){copyObject(e,keys(e),t);return}for(var i in e){if(he.call(e,i)){assignValue(t,i,e[i])}}});var qn=createAssigner(function(t,e){copyObject(e,keysIn(e),t)});var zn=createAssigner(function(t,e,i,n){copyObject(e,keysIn(e),t,n)});var $n=createAssigner(function(t,e,i,n){copyObject(e,keys(e),t,n)});var Gn=flatRest(baseAt);function create(t,e){var i=xi(t);return e==null?i:baseAssign(i,e)}var Vn=baseRest(function(t,e){t=ee(t);var n=-1;var o=e.length;var s=o>2?e[2]:i;if(s&&isIterateeCall(e[0],e[1],s)){o=1}while(++n1);return e});copyObject(t,getAllKeysIn(t),i);if(n){i=baseClone(i,h|f|p,customOmitClone)}var o=e.length;while(o--){baseUnset(i,e[o])}return i});function omitBy(t,e){return pickBy(t,negate(getIteratee(e)))}var to=flatRest(function(t,e){return t==null?{}:basePick(t,e)});function pickBy(t,e){if(t==null){return{}}var i=arrayMap(getAllKeysIn(t),function(t){return[t]});e=getIteratee(e);return basePickBy(t,i,function(t,i){return e(t,i[0])})}function result(t,e,n){e=castPath(e,t);var o=-1,s=e.length;if(!s){s=1;t=i}while(++oe){var o=t;t=e;e=o}if(n||t%1||e%1){var s=Ke();return qe(t+s*(e-t+Ze("1e-"+((s+"").length-1))),e)}return baseRandom(t,e)}var no=createCompounder(function(t,e,i){e=e.toLowerCase();return t+(i?capitalize(e):e)});function capitalize(t){return ho(toString(t).toLowerCase())}function deburr(t){t=toString(t);return t&&t.replace(Kt,mi).replace(Me,"")}function endsWith(t,e,n){t=toString(t);e=baseToString(e);var o=t.length;n=n===i?o:baseClamp(toInteger(n),0,o);var s=n;n-=e.length;return n>=0&&t.slice(n,s)==e}function escape(t){t=toString(t);return t&&Ot.test(t)?t.replace(Lt,_i):t}function escapeRegExp(t){t=toString(t);return t&&Jt.test(t)?t.replace(Tt,"\\$&"):t}var oo=createCompounder(function(t,e,i){return t+(i?"-":"")+e.toLowerCase()});var so=createCompounder(function(t,e,i){return t+(i?" ":"")+e.toLowerCase()});var ro=createCaseFirst("toLowerCase");function pad(t,e,i){t=toString(t);e=toInteger(e);var n=e?stringSize(t):0;if(!e||n>=e){return t}var o=(e-n)/2;return createPadding(Je(o),i)+t+createPadding(Te(o),i)}function padEnd(t,e,i){t=toString(t);e=toInteger(e);var n=e?stringSize(t):0;return e&&n>>0;if(!n){return[]}t=toString(t);if(t&&(typeof e=="string"||e!=null&&!Un(e))){e=baseToString(e);if(!e&&hasUnicode(t)){return castSlice(stringToArray(t),0,n)}}return t.split(e,n)}var ao=createCompounder(function(t,e,i){return t+(i?" ":"")+ho(e)});function startsWith(t,e,i){t=toString(t);i=i==null?0:baseClamp(toInteger(i),0,t.length);e=baseToString(e);return t.slice(i,i+e.length)==e}function template(t,e,n){var o=lodash.templateSettings;if(n&&isIterateeCall(t,e,n)){e=i}t=toString(t);e=zn({},e,o,customDefaultsAssignIn);var s=zn({},e.imports,o.imports,customDefaultsAssignIn),r=keys(s),c=baseValues(s,r);var a,u,h=0,f=e.interpolate||Ht,p="__p += '";var d=ie((e.escape||Ht).source+"|"+f.source+"|"+(f===Ct?qt:Ht).source+"|"+(e.evaluate||Ht).source+"|$","g");var l="//# sourceURL="+(he.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ve+"]")+"\n";t.replace(d,function(e,i,n,o,s,r){n||(n=o);p+=t.slice(h,r).replace(Xt,escapeStringChar);if(i){a=true;p+="' +\n__e("+i+") +\n'"}if(s){u=true;p+="';\n"+s+";\n__p += '"}if(n){p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}h=r+e.length;return e});p+="';\n";var v=he.call(e,"variable")&&e.variable;if(!v){p="with (obj) {\n"+p+"\n}\n"}p=(u?p.replace(yt,""):p).replace(St,"$1").replace(bt,"$1;");p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var m=fo(function(){return Zt(r,l+"return "+p).apply(i,c)});m.source=p;if(isError(m)){throw m}return m}function toLower(t){return toString(t).toLowerCase()}function toUpper(t){return toString(t).toUpperCase()}function trim(t,e,n){t=toString(t);if(t&&(n||e===i)){return t.replace(Et,"")}if(!t||!(e=baseToString(e))){return t}var o=stringToArray(t),s=stringToArray(e),r=charsStartIndex(o,s),c=charsEndIndex(o,s)+1;return castSlice(o,r,c).join("")}function trimEnd(t,e,n){t=toString(t);if(t&&(n||e===i)){return t.replace(Ut,"")}if(!t||!(e=baseToString(e))){return t}var o=stringToArray(t),s=charsEndIndex(o,stringToArray(e))+1;return castSlice(o,0,s).join("")}function trimStart(t,e,n){t=toString(t);if(t&&(n||e===i)){return t.replace(jt,"")}if(!t||!(e=baseToString(e))){return t}var o=stringToArray(t),s=charsStartIndex(o,stringToArray(e));return castSlice(o,s).join("")}function truncate(t,e){var n=O,o=N;if(isObject(e)){var s="separator"in e?e.separator:s;n="length"in e?toInteger(e.length):n;o="omission"in e?baseToString(e.omission):o}t=toString(t);var r=t.length;if(hasUnicode(t)){var c=stringToArray(t);r=c.length}if(n>=r){return t}var a=n-stringSize(o);if(a<1){return o}var u=c?castSlice(c,0,a).join(""):t.slice(0,a);if(s===i){return u+o}if(c){a+=u.length-a}if(Un(s)){if(t.slice(a).search(s)){var h,f=u;if(!s.global){s=ie(s.source,toString(zt.exec(s))+"g")}s.lastIndex=0;while(h=s.exec(f)){var p=h.index}u=u.slice(0,p===i?a:p)}}else if(t.indexOf(baseToString(s),a)!=a){var d=u.lastIndexOf(s);if(d>-1){u=u.slice(0,d)}}return u+o}function unescape(t){t=toString(t);return t&&It.test(t)?t.replace(wt,gi):t}var uo=createCompounder(function(t,e,i){return t+(i?" ":"")+e.toUpperCase()});var ho=createCaseFirst("toUpperCase");function words(t,e,n){t=toString(t);e=n?i:e;if(e===i){return hasUnicodeWord(t)?unicodeWords(t):asciiWords(t)}return t.match(e)||[]}var fo=baseRest(function(t,e){try{return apply(t,i,e)}catch(t){return isError(t)?t:new Yt(t)}});var po=flatRest(function(t,e){arrayEach(e,function(e){e=toKey(e);baseAssignValue(t,e,Sn(t[e],t))});return t});function cond(t){var e=t==null?0:t.length,i=getIteratee();t=!e?[]:arrayMap(t,function(t){if(typeof t[1]!="function"){throw new oe(r)}return[i(t[0]),t[1]]});return baseRest(function(i){var n=-1;while(++nJ){return[]}var i=U,n=qe(t,U);e=getIteratee(e);t-=U;var o=baseTimes(n,e);while(++i0||e<0)){return new LazyWrapper(n)}if(t<0){n=n.takeRight(-t)}else if(t){n=n.drop(t)}if(e!==i){e=toInteger(e);n=e<0?n.dropRight(-e):n.take(e-t)}return n};LazyWrapper.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()};LazyWrapper.prototype.toArray=function(){return this.take(U)};baseForOwn(LazyWrapper.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),s=lodash[o?"take"+(e=="last"?"Right":""):e],r=o||/^find/.test(e);if(!s){return}lodash.prototype[e]=function(){var e=this.__wrapped__,c=o?[1]:arguments,a=e instanceof LazyWrapper,u=c[0],h=a||Fn(e);var f=function(t){var e=s.apply(lodash,arrayPush([t],c));return o&&p?e[0]:e};if(h&&n&&typeof u=="function"&&u.length!=1){a=h=false}var p=this.__chain__,d=!!this.__actions__.length,l=r&&!p,v=a&&!d;if(!r&&h){e=v?e:new LazyWrapper(this);var m=t.apply(e,c);m.__actions__.push({func:thru,args:[f],thisArg:i});return new LodashWrapper(m,p)}if(l&&v){return t.apply(this,c)}m=this.thru(f);return l?o?m.value()[0]:m.value():m}});arrayEach(["pop","push","shift","sort","splice","unshift"],function(t){var e=se[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);lodash.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var o=this.value();return e.apply(Fn(o)?o:[],t)}return this[i](function(i){return e.apply(Fn(i)?i:[],t)})}});baseForOwn(LazyWrapper.prototype,function(t,e){var i=lodash[e];if(i){var n=i.name+"";if(!he.call(ai,n)){ai[n]=[]}ai[n].push({name:e,func:i})}});ai[createHybrid(i,m).name]=[{name:"wrapper",func:i}];LazyWrapper.prototype.clone=lazyClone;LazyWrapper.prototype.reverse=lazyReverse;LazyWrapper.prototype.value=lazyValue;lodash.prototype.at=hn;lodash.prototype.chain=wrapperChain;lodash.prototype.commit=wrapperCommit;lodash.prototype.next=wrapperNext;lodash.prototype.plant=wrapperPlant;lodash.prototype.reverse=wrapperReverse;lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue;lodash.prototype.first=lodash.prototype.head;if(Ne){lodash.prototype[Ne]=wrapperToIterator}return lodash};var Si=yi();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){ni._=Si;define(function(){return Si})}else if(si){(si.exports=Si)._=Si;oi._=Si}else{ni._=Si}}).call(this)},80900:t=>{var e=1e3;var i=e*60;var n=i*60;var o=n*24;var s=o*365.25;t.exports=function(t,e){e=e||{};var i=typeof t;if(i==="string"&&t.length>0){return parse(t)}else if(i==="number"&&isNaN(t)===false){return e.long?fmtLong(t):fmtShort(t)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function parse(t){t=String(t);if(t.length>100){return}var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!r){return}var c=parseFloat(r[1]);var a=(r[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*i;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return undefined}}function fmtShort(t){if(t>=o){return Math.round(t/o)+"d"}if(t>=n){return Math.round(t/n)+"h"}if(t>=i){return Math.round(t/i)+"m"}if(t>=e){return Math.round(t/e)+"s"}return t+"ms"}function fmtLong(t){return plural(t,o,"day")||plural(t,n,"hour")||plural(t,i,"minute")||plural(t,e,"second")||t+" ms"}function plural(t,e,i){if(t{"use strict";var n=i(28289);t.exports=ArrayIterator;function ArrayIterator(t,e,i,n){this.array=t;this.start=e||0;this.stop=i||Infinity;this.step=n||1}ArrayIterator.prototype.next=function(){var t;if(this.start{"use strict";t.exports=Iteration;function Iteration(t,e,i){this.value=t;this.done=e;this.index=i}Iteration.prototype.equals=function(t){return typeof t=="object"&&t.value===this.value&&t.done===this.done&&t.index===this.index}},14801:(t,e,i)=>{"use strict";var n=i(28289);var o=i(57045);t.exports=ObjectIterator;function ObjectIterator(t,e,i,n){this.object=t;this.keysIterator=new o(Object.keys(t),e,i,n)}ObjectIterator.prototype.next=function(){var t=this.keysIterator.next();if(t.done){return t}var e=t.value;return new n(this.object[e],false,e)}},71591:(t,e,i)=>{"use strict";var n=i(57045);var o=i(14801);t.exports=iterate;function iterate(t,e,i,s){if(!t){return empty}else if(Array.isArray(t)){return new n(t,e,i,s)}else if(typeof t.next==="function"){return t}else if(typeof t.iterate==="function"){return t.iterate(e,i,s)}else if(typeof t==="object"){return new o(t)}else{throw new TypeError("Can't iterate "+t)}}},56172:(t,e,i)=>{"use strict";var n=false;try{throw new Error}catch(t){n=!!t.stack}var o=captureLine();var s;var r=i(42414);var c=i(71591);var a=i(87943);function isObject(t){return t===Object(t)}var u="From previous event:";function makeStackTraceLong(t,e){if(n&&e.stack&&typeof t==="object"&&t!==null&&t.stack&&t.stack.indexOf(u)===-1){var i=[];for(var o=e;!!o&&h.get(o);o=h.get(o).became){if(o.stack){i.unshift(o.stack)}}i.unshift(t.stack);var s=i.join("\n"+u+"\n");t.stack=filterStackString(s)}}function filterStackString(t){if(Q.isIntrospective){return t}var e=t.split("\n");var i=[];for(var n=0;n=o&&n<=_}function captureLine(){if(!n){return}try{throw new Error}catch(n){var t=n.stack.split("\n");var e=t[0].indexOf("@")>0?t[1]:t[2];var i=getFileNameAndLineNumber(e);if(!i){return}s=i[0];return i[1]}}function deprecate(t,e,i){return function Q_deprecate(){if(typeof console!=="undefined"&&typeof console.warn==="function"){if(i){console.warn(e+" is deprecated, use "+i+" instead.",new Error("").stack)}else{console.warn(e+" is deprecated.",new Error("").stack)}}return t.apply(this,arguments)}}var h=new r;function Q_getHandler(t){var e=h.get(t);if(!e||!e.became){return e}e=follow(e);h.set(t,e);return e}function follow(t){if(!t.became){return t}else{t.became=follow(t.became);return t.became}}var f=new Error("Can't resolve a promise with itself");var p=Q_reject(f);var d=Q_getHandler(p);var l=new r;t.exports=Q;function Q(t){if(Q_isPromise(t)){return t}else if(isThenable(t)){if(!l.has(t)){l.set(t,new Promise(new Thenable(t)))}return l.get(t)}else{return new Promise(new Fulfilled(t))}}Q.longStackSupport=false;Q.reject=Q_reject;function Q_reject(t){return new Promise(new Rejected(t))}Q.defer=defer;function defer(){var t=new Pending;var e=new Promise(t);var i=new Deferred(e);if(Q.longStackSupport&&n){try{throw new Error}catch(t){e.stack=t.stack.substring(t.stack.indexOf("\n")+1)}}return i}Q.when=function Q_when(t,e,i,n){return Q(t).then(e,i,n)};Q.all=Q_all;function Q_all(t){if(Q_isPromise(t)){if(typeof console!=="undefined"&&typeof console.warn==="function"){console.warn("Q.all no longer directly unwraps a promise. Use Q(array).all()")}return Q(t).all()}var e=0;var i=defer();var n=Array(t.length);var o=[];var s=-Infinity;var r;Array.prototype.forEach.call(t,function Q_all_each(c,a){var u;if(Q_isPromise(c)&&(u=Q_getHandler(c)).state==="fulfilled"){n[a]=u.value}else{++e;c=Q(c);c.then(function Q_all_eachFulfilled(t){n[a]=t;if(--e===0){i.resolve(n)}},i.reject);c.observeEstimate(function Q_all_eachEstimate(e){var n=o[a];o[a]=e;if(e>s){s=e}else if(n===s&&e<=s){computeEstimate()}if(o.length===t.length&&s!==r){i.setEstimate(s);r=s}})}});function computeEstimate(){s=-Infinity;for(var t=0;ts){s=o[t]}}}if(e===0){i.resolve(n)}return i.promise}Q.allSettled=Q_allSettled;function Q_allSettled(t){if(Q_isPromise(t)){if(typeof console!=="undefined"&&typeof console.warn==="function"){console.warn("Q.allSettled no longer directly unwraps a promise. Use Q(array).allSettled()")}return Q(t).allSettled()}return Q_all(t.map(function Q_allSettled_each(t){t=Q(t);function regardless(){return t.inspect()}return t.then(regardless,regardless)}))}Q.delay=function Q_delay(t,e){if(e===void 0){e=t;t=void 0}return Q(t).delay(e)};Q.timeout=function Q_timeout(t,e,i){return Q(t).timeout(e,i)};Q.spread=Q_spread;function Q_spread(t,e,i){return Q(t).spread(e,i)}Q.join=function Q_join(t,e){return Q.spread([t,e],function Q_joined(t,e){if(t===e){return t}else{throw new Error("Can't join: not the same: "+t+" "+e)}})};Q.race=Q_race;function Q_race(t){return new Promise(function(e){t.forEach(function(t){Q(t).then(e.resolve,e.reject)})})}Q.try=function Q_try(t){return Q(t).dispatch("call",[[]])};Q.function=Promise_function;function Promise_function(t){return function promiseFunctionWrapper(){var e=new Array(arguments.length);for(var i=0;i{"use strict";var n=String.prototype.replace;var o=/%20/g;var s=i(72360);var r={RFC1738:"RFC1738",RFC3986:"RFC3986"};t.exports=s.assign({default:r.RFC3986,formatters:{RFC1738:function(t){return n.call(t,o,"+")},RFC3986:function(t){return String(t)}}},r)},22760:(t,e,i)=>{"use strict";var n=i(79954);var o=i(33912);var s=i(74907);t.exports={formats:s,parse:o,stringify:n}},33912:(t,e,i)=>{"use strict";var n=i(72360);var o=Object.prototype.hasOwnProperty;var s=Array.isArray;var r={allowDots:false,allowPrototypes:false,arrayLimit:20,charset:"utf-8",charsetSentinel:false,comma:false,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1e3,parseArrays:true,plainObjects:false,strictNullHandling:false};var c=function(t){return t.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(parseInt(e,10))})};var a=function(t,e){if(t&&typeof t==="string"&&e.comma&&t.indexOf(",")>-1){return t.split(",")}return t};var u="utf8=%26%2310003%3B";var h="utf8=%E2%9C%93";var f=function parseQueryStringValues(t,e){var i={};var f=e.ignoreQueryPrefix?t.replace(/^\?/,""):t;var p=e.parameterLimit===Infinity?undefined:e.parameterLimit;var d=f.split(e.delimiter,p);var l=-1;var v;var m=e.charset;if(e.charsetSentinel){for(v=0;v-1){b=s(b)?[b]:b}if(o.call(i,S)){i[S]=n.combine(i[S],b)}else{i[S]=b}}return i};var p=function(t,e,i,n){var o=n?e:a(e,i);for(var s=t.length-1;s>=0;--s){var r;var c=t[s];if(c==="[]"&&i.parseArrays){r=[].concat(o)}else{r=i.plainObjects?Object.create(null):{};var u=c.charAt(0)==="["&&c.charAt(c.length-1)==="]"?c.slice(1,-1):c;var h=parseInt(u,10);if(!i.parseArrays&&u===""){r={0:o}}else if(!isNaN(h)&&c!==u&&String(h)===u&&h>=0&&(i.parseArrays&&h<=i.arrayLimit)){r=[];r[h]=o}else{r[u]=o}}o=r}return o};var d=function parseQueryStringKeys(t,e,i,n){if(!t){return}var s=i.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;var r=/(\[[^[\]]*])/;var c=/(\[[^[\]]*])/g;var a=i.depth>0&&r.exec(s);var u=a?s.slice(0,a.index):s;var h=[];if(u){if(!i.plainObjects&&o.call(Object.prototype,u)){if(!i.allowPrototypes){return}}h.push(u)}var f=0;while(i.depth>0&&(a=c.exec(s))!==null&&f{"use strict";var n=i(72360);var o=i(74907);var s=Object.prototype.hasOwnProperty;var r={brackets:function brackets(t){return t+"[]"},comma:"comma",indices:function indices(t,e){return t+"["+e+"]"},repeat:function repeat(t){return t}};var c=Array.isArray;var a=Array.prototype.push;var u=function(t,e){a.apply(t,c(e)?e:[e])};var h=Date.prototype.toISOString;var f=o["default"];var p={addQueryPrefix:false,allowDots:false,charset:"utf-8",charsetSentinel:false,delimiter:"&",encode:true,encoder:n.encode,encodeValuesOnly:false,format:f,formatter:o.formatters[f],indices:false,serializeDate:function serializeDate(t){return h.call(t)},skipNulls:false,strictNullHandling:false};var d=function isNonNullishPrimitive(t){return typeof t==="string"||typeof t==="number"||typeof t==="boolean"||typeof t==="symbol"||typeof t==="bigint"};var l=function stringify(t,e,i,o,s,r,a,h,f,l,v,m,_){var g=t;if(typeof a==="function"){g=a(e,g)}else if(g instanceof Date){g=l(g)}else if(i==="comma"&&c(g)){g=n.maybeMap(g,function(t){if(t instanceof Date){return l(t)}return t}).join(",")}if(g===null){if(o){return r&&!m?r(e,p.encoder,_,"key"):e}g=""}if(d(g)||n.isBuffer(g)){if(r){var y=m?e:r(e,p.encoder,_,"key");return[v(y)+"="+v(r(g,p.encoder,_,"value"))]}return[v(e)+"="+v(String(g))]}var S=[];if(typeof g==="undefined"){return S}var b;if(c(a)){b=a}else{var w=Object.keys(g);b=h?w.sort(h):w}for(var L=0;L0?_+m:""}},72360:t=>{"use strict";var e=Object.prototype.hasOwnProperty;var i=Array.isArray;var n=function(){var t=[];for(var e=0;e<256;++e){t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase())}return t}();var o=function compactQueue(t){while(t.length>1){var e=t.pop();var n=e.obj[e.prop];if(i(n)){var o=[];for(var s=0;s=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122){s+=o.charAt(r);continue}if(c<128){s=s+n[c];continue}if(c<2048){s=s+(n[192|c>>6]+n[128|c&63]);continue}if(c<55296||c>=57344){s=s+(n[224|c>>12]+n[128|c>>6&63]+n[128|c&63]);continue}r+=1;c=65536+((c&1023)<<10|o.charCodeAt(r)&1023);s+=n[240|c>>18]+n[128|c>>12&63]+n[128|c>>6&63]+n[128|c&63]}return s};var h=function compact(t){var e=[{obj:{o:t},prop:"o"}];var i=[];for(var n=0;n{"use strict";var i=Object.prototype.hasOwnProperty,n;function decode(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function encode(t){try{return encodeURIComponent(t)}catch(t){return null}}function querystring(t){var e=/([^=?#&]+)=?([^&]*)/g,i={},n;while(n=e.exec(t)){var o=decode(n[1]),s=decode(n[2]);if(o===null||s===null||o in i)continue;i[o]=s}return i}function querystringify(t,e){e=e||"";var o=[],s,r;if("string"!==typeof e)e="?";for(r in t){if(i.call(t,r)){s=t[r];if(!s&&(s===null||s===n||isNaN(s))){s=""}r=encode(r);s=encode(s);if(r===null||s===null)continue;o.push(r+"="+s)}}return o.length?e+o.join("&"):""}e.stringify=querystringify;e.parse=querystring},44742:t=>{"use strict";t.exports=function required(t,e){e=e.split(":")[0];t=+t;if(!t)return false;switch(e){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return false}return t!==0}},21867:(t,e,i)=>{var n=i(64293);var o=n.Buffer;function copyProps(t,e){for(var i in t){e[i]=t[i]}}if(o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow){t.exports=n}else{copyProps(n,e);e.Buffer=SafeBuffer}function SafeBuffer(t,e,i){return o(t,e,i)}SafeBuffer.prototype=Object.create(o.prototype);copyProps(o,SafeBuffer);SafeBuffer.from=function(t,e,i){if(typeof t==="number"){throw new TypeError("Argument must not be a number")}return o(t,e,i)};SafeBuffer.alloc=function(t,e,i){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}var n=o(t);if(e!==undefined){if(typeof i==="string"){n.fill(e,i)}else{n.fill(e)}}else{n.fill(0)}return n};SafeBuffer.allocUnsafe=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return o(t)};SafeBuffer.allocUnsafeSlow=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(t)}},8812:(t,e,i)=>{"use strict";const n=i(76417);const o=i(50806);t.exports=function scmp(t,e){if(!Buffer.isBuffer(t)||!Buffer.isBuffer(e)){throw new Error("Both scmp args must be Buffers")}if(t.length!==e.length){return false}if(n.timingSafeEqual){return n.timingSafeEqual(t,e)}return o(t,e)}},50806:t=>{"use strict";t.exports=function scmpCompare(t,e){const i=t.length;let n=0;for(let o=0;o{"use strict";const n=i(12087);const o=i(33867);const s=i(31621);const{env:r}=process;let c;if(s("no-color")||s("no-colors")||s("color=false")||s("color=never")){c=0}else if(s("color")||s("colors")||s("color=true")||s("color=always")){c=1}if("FORCE_COLOR"in r){if(r.FORCE_COLOR==="true"){c=1}else if(r.FORCE_COLOR==="false"){c=0}else{c=r.FORCE_COLOR.length===0?1:Math.min(parseInt(r.FORCE_COLOR,10),3)}}function translateLevel(t){if(t===0){return false}return{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function supportsColor(t,e){if(c===0){return 0}if(s("color=16m")||s("color=full")||s("color=truecolor")){return 3}if(s("color=256")){return 2}if(t&&!e&&c===undefined){return 0}const i=c||0;if(r.TERM==="dumb"){return i}if(process.platform==="win32"){const t=n.release().split(".");if(Number(t[0])>=10&&Number(t[2])>=10586){return Number(t[2])>=14931?3:2}return 1}if("CI"in r){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(t=>t in r)||r.CI_NAME==="codeship"){return 1}return i}if("TEAMCITY_VERSION"in r){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0}if(r.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in r){const t=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(r.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)){return 1}if("COLORTERM"in r){return 1}return i}function getSupportLevel(t){const e=supportsColor(t,t&&t.isTTY);return translateLevel(e)}t.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,o.isatty(1))),stderr:translateLevel(supportsColor(true,o.isatty(2)))}},64580:(t,e,i)=>{"use strict";var n=i(90250);function Domain(t,e){this.twilio=t;this.baseUrl=e}Domain.prototype.absoluteUrl=function(t){return n.trim(this.baseUrl,"/")+"/"+n.trim(t,"/")};Domain.prototype.request=function(t){return this.twilio.request(n.assign({},t,{uri:this.absoluteUrl(t.uri)}))};t.exports=Domain},60938:(t,e,i)=>{"use strict";var n=i(90250);var o=i(50284);function Page(t,e,i){var n=this.processResponse(e);this._version=t;this._payload=n;this._solution=i;this.nextPageUrl=this.getNextPageUrl();this.previousPageUrl=this.getPreviousPageUrl();this.instances=this.loadInstances(this.loadPage(n))}Page.prototype.META_KEYS=["end","first_page_uri","last_page_uri","next_page_uri","num_pages","page","page_size","previous_page_uri","start","total","uri"];Page.prototype.getPreviousPageUrl=function(){if("meta"in this._payload&&"previous_page_url"in this._payload.meta&&this._payload.meta.previous_page_url){return this._payload.meta.previous_page_url}if("previous_page_uri"in this._payload&&this._payload.previous_page_uri){return this._version._domain.absoluteUrl(this._payload.previous_page_uri)}return undefined};Page.prototype.getNextPageUrl=function(){if("meta"in this._payload&&"next_page_url"in this._payload.meta&&this._payload.meta.next_page_url){return this._payload.meta.next_page_url}if("next_page_uri"in this._payload&&this._payload.next_page_uri){return this._version._domain.absoluteUrl(this._payload.next_page_uri)}return undefined};Page.prototype.getInstance=function(t){throw new Error("Page.get_instance() must be implemented in the derived class")};Page.prototype.loadInstances=function(t){return n.map(t,function(t){return this.getInstance(t)}.bind(this))};Page.prototype.nextPage=function(){if(!this.nextPageUrl){return undefined}var t=this._version._domain.twilio.request({method:"GET",uri:this.nextPageUrl});t=t.then(function(t){return new this.constructor(this._version,t,this._solution)}.bind(this));return t};Page.prototype.previousPage=function(){if(!this.previousPageUrl){return undefined}var t=this._version._domain.twilio.request({method:"GET",uri:this.previousPageUrl});t=t.then(function(t){return new this.constructor(this._version,t,this._solution)}.bind(this));return t};Page.prototype.processResponse=function(t){if(t.statusCode!==200){throw new o(t)}if(typeof t.body==="string"){return JSON.parse(t.body)}return t.body};Page.prototype.loadPage=function(t){if("meta"in t&&"key"in t.meta){return t[t.meta.key]}var e=n.chain(t).keys().difference(this.META_KEYS).value();if(e.length===1){return t[e[0]]}throw new Error("Page Records cannot be deserialized")};t.exports=Page},77761:(t,e,i)=>{"use strict";var n=i(90250);var o=i(96545);var s=i(35747);var r=i(98605);var c=i(57211);var a=i(56172);var u=i(22760);var h=i(12785);var f=i(51438);o.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded";var p=function(){};p.prototype.request=function(t){t=t||{};if(!t.method){throw new Error("http method is required")}if(!t.uri){throw new Error("uri is required")}var e=a.defer();var i=t.headers||{};if(!i.Connection&&!i.connection){i.Connection="close"}if(t.username&&t.password){var p=Buffer.from(t.username+":"+t.password).toString("base64");i.Authorization="Basic "+p}var d={timeout:t.timeout||3e4,maxRedirects:t.allowRedirects?10:0,url:t.uri,method:t.method,headers:t.headers,httpAgent:t.forever?new r.Agent({keepAlive:true}):undefined,httpsAgent:t.forever?new c.Agent({keepAlive:true}):undefined,validateStatus:t=>t>=100&&t<600};if(process.env.TWILIO_CA_BUNDLE!==undefined){if(this.ca===undefined){this.ca=s.readFileSync(process.env.TWILIO_CA_BUNDLE)}d.ca=this.ca}if(!n.isNull(t.data)){d.data=u.stringify(t.data,{arrayFormat:"repeat"})}if(!n.isNull(t.params)){d.params=t.params;d.paramsSerializer=(t=>{return u.stringify(t,{arrayFormat:"repeat"})})}var l={method:d.method,url:d.url,auth:p||null,params:d.params,data:t.data,headers:d.headers,ca:d.ca};if(t.logLevel==="debug"){this.logRequest(d)}var v=this;this.lastResponse=undefined;this.lastRequest=new f(l);o(d).then(i=>{if(t.logLevel==="debug"){console.log(`response.statusCode: ${i.status}`);console.log(`response.headers: ${JSON.stringify(i.headers)}`)}v.lastResponse=new h(i.status,i.data,i.headers);e.resolve({statusCode:i.status,body:i.data})}).catch(t=>{v.lastResponse=undefined;e.reject(t)});return e.promise};p.prototype.filterLoggingHeaders=function(t){return Object.keys(t).filter(t=>{return!"authorization".includes(t.toLowerCase())})};p.prototype.logRequest=function(t){console.log("-- BEGIN Twilio API Request --");console.log(`${t.method} ${t.url}`);if(t.params){console.log("Querystring:");console.log(t.params)}if(t.headers){console.log("Headers:");const e=this.filterLoggingHeaders(t.headers);e.forEach(e=>console.log(`${e}: ${t.headers[e]}`))}console.log("-- END Twilio API Request --")};t.exports=p},50284:t=>{"use strict";class RestException extends Error{constructor(t){super("[HTTP "+t.statusCode+"] Failed to execute request");const e=typeof t.body==="string"?JSON.parse(t.body):t.body;this.status=t.statusCode;this.message=e.message;this.code=e.code;this.moreInfo=e.more_info;this.details=e.details}}t.exports=RestException},64351:(t,e,i)=>{"use strict";var n=i(90250);var o=i(50284);function Version(t,e){this._domain=t;this._version=e}Version.prototype.absoluteUrl=function(t){return this._domain.absoluteUrl(this.relativeUrl(t))};Version.prototype.relativeUrl=function(t){return n.trim(this._version,"/")+"/"+n.trim(t,"/")};Version.prototype.request=function(t){return this._domain.request(n.assign({},t,{uri:this.relativeUrl(t.uri)}))};Version.prototype.fetch=function(t){var e=this.request(t);e=e.then(function success(t){if(t.statusCode<200||t.statusCode>=400){throw new o(t)}if(typeof t.body==="string"){return JSON.parse(t.body)}return t.body});return e};Version.prototype.update=function(t){var e=this.request(t);e=e.then(function success(t){if(t.statusCode<200||t.statusCode>=300){throw new o(t)}if(typeof t.body==="string"){return JSON.parse(t.body)}return t.body});return e};Version.prototype.remove=function(t){var e=this.request(t);e=e.then(function success(t){if(t.statusCode<200||t.statusCode>=300){throw new o(t)}return t.statusCode===204});return e};Version.prototype.create=function(t){var e=this.request(t);e=e.then(function success(t){if(t.statusCode<200||t.statusCode>=300){throw new o(t)}if(typeof t.body==="string"){return JSON.parse(t.body)}return t.body});return e};Version.prototype.page=function(t){return this.request(t)};Version.prototype.readLimits=function(t){var e=t.limit;var i;var o=t.pageSize;if(!n.isNil(e)&&(!n.isFinite(e)||e<=0)){throw new TypeError("Parameter limit must be a positive integer")}if(!n.isNil(o)&&(!n.isFinite(o)||o<=0)){throw new TypeError("Parameter pageSize must be a positive integer")}if(e){if(!o){o=e}i=parseInt(Math.ceil(e/parseFloat(o)),10)}return{limit:e,pageSize:o,pageLimit:i}};t.exports=Version},80513:(t,e,i)=>{"use strict";var n=i(90250);var o=i(7401);var s=i(94359);o.extend(s);function parseDate(t,e){var i=o.utc(t,e);if(i.isValid()){return i.toDate()}return t}function parseNumber(t,e){var i=e(t);if(isNaN(i)){return t}return i}function iso8601Date(t){return parseDate(t,"YYYY-MM-DD")}function iso8601DateTime(t){return parseDate(t,"YYYY-MM-DD[T]HH:mm:ss[Z]")}function rfc2822DateTime(t){return parseDate(t,"ddd, DD MMM YYYY HH:mm:ss [+0000]")}function decimal(t){return parseNumber(t,parseFloat)}function integer(t){return parseNumber(t,n.parseInt)}t.exports={iso8601Date:iso8601Date,iso8601DateTime:iso8601DateTime,rfc2822DateTime:rfc2822DateTime,decimal:decimal,integer:integer}},76306:(t,e,i)=>{"use strict";var n=i(31669);function ObsoleteClient(t,e,i){throw new Error(this.constructor.name+" has been removed from this version of the library. Please refer to https://www.twilio.com/docs/libraries/node for more information.")}function RestClient(t,e,i){RestClient.super_.call(this,t,e,i)}n.inherits(RestClient,ObsoleteClient);function IpMessagingClient(t,e,i){IpMessagingClient.super_.call(this,t,e,i)}n.inherits(IpMessagingClient,ObsoleteClient);function PricingClient(t,e,i){PricingClient.super_.call(this,t,e,i)}n.inherits(PricingClient,ObsoleteClient);function MonitorClient(t,e,i){MonitorClient.super_.call(this,t,e,i)}n.inherits(MonitorClient,ObsoleteClient);function TaskRouterClient(t,e,i){TaskRouterClient.super_.call(this,t,e,i)}n.inherits(TaskRouterClient,ObsoleteClient);function LookupsClient(t,e,i){LookupsClient.super_.call(this,t,e,i)}n.inherits(LookupsClient,ObsoleteClient);function TrunkingClient(t,e,i){TrunkingClient.super_.call(this,t,e,i)}n.inherits(TrunkingClient,ObsoleteClient);t.exports={RestClient:RestClient,IpMessagingClient:IpMessagingClient,PricingClient:PricingClient,MonitorClient:MonitorClient,TaskRouterClient:TaskRouterClient,LookupsClient:LookupsClient,TrunkingClient:TrunkingClient}},6372:(t,e,i)=>{"use strict";var n=i(90250);var o=i(7401);var s=i(94359);o.extend(s);t.exports={};t.exports.iso8601Date=function(t){if(n.isUndefined(t)||n.isString(t)||!n.isDate(t)){return t}else{return o.utc(t).format("YYYY-MM-DD")}};t.exports.iso8601DateTime=function(t){if(n.isUndefined(t)||n.isString(t)||!(t instanceof Date)){return t}else{return o.utc(t).format("YYYY-MM-DD[T]HH:mm:ss[Z]")}};t.exports.prefixedCollapsibleMap=function(t,e){if(n.isUndefined(t)||!n.isPlainObject(t)){return{}}function flatten(t,e,i){e=e||{};i=i||[];n.each(n.keys(t),function(o){if(n.isPlainObject(t[o])){flatten(t[o],e,n.union(i,[o]))}else{e[n.join(n.union(i,[o]),".")]=t[o]}});return e}var i=flatten(t);var o=i;if(e){o={};n.each(n.keys(i),function(t){o[e+"."+t]=i[t]})}return o};t.exports.object=function(t){if(n.isObject(t)||n.isArray(t)){return JSON.stringify(t)}return t};t.exports.bool=function(t){if(n.isString(t)){return t}if(n.isBoolean(t)){return t.toString()}return t};t.exports.map=function(t,e){if(n.isArray(t)){return n.map(t,e)}return t}},72142:(t,e,i)=>{"use strict";var n=i(90250);function of(t){return n.omitBy(t,n.isUndefined)}t.exports={of:of}},51438:(t,e,i)=>{"use strict";var n=i(90250);var o=function(t){t=t||{};this.method=t.method||this.ANY;this.url=t.url||this.ANY;this.auth=t.auth||this.ANY;this.params=t.params||this.ANY;this.data=t.data||this.ANY;this.headers=t.headers||this.ANY;this.ca=t.ca};o.prototype.ANY="*";o.prototype.attributeEqual=function(t,e){if(t===this.ANY||e===this.ANY){return true}t=t||undefined;e=e||undefined;return n.isEqual(t,e)};o.prototype.isEqual=function(t){return this.attributeEqual(this.method,t.method)&&this.attributeEqual(this.url,t.url)&&this.attributeEqual(this.auth,t.auth)&&this.attributeEqual(this.params,t.params)&&this.attributeEqual(this.data,t.data)&&this.attributeEqual(this.headers,t.headers)};o.prototype.toString=function(){var t="";if(this.auth&&this.auth!==this.ANY){t=this.auth+" "}var e="";if(this.params&&this.params!==this.ANY){e="?"+n.join(n.chain(n.keys(this.params)).map(function(t){return t+"="+this.params[t]}.bind(this)).value(),"&")}var i="";if(this.data&&this.data!==this.ANY){if(this.method==="GET"){i="\n -G"}i=i+"\n"+n.join(n.map(this.data,function(t,e){return" -d "+e+"="+t}),"\n")}var o="";if(this.headers&&this.headers!==this.ANY){o="\n"+n.join(n.map(this.headers,function(t,e){return" -H "+e+"="+t}),"\n")}return t+this.method+" "+this.url+e+i+o};t.exports=o},12785:t=>{"use strict";var e=function(t,e,i){this.statusCode=t;this.body=e;this.headers=i};e.prototype.toString=function(){return"HTTP "+this.statusCode+" "+this.body};t.exports=e},75595:(t,e,i)=>{"use strict";var n=i(98239);var o=i(19149);var s=i(76306);var r=function(t,e,i){return new n(t,e,i)};r.Twilio=n;r.jwt={};r.twiml={};var c;Object.defineProperty(r.jwt,"AccessToken",{get:function(){return c=c||i(59733)}});var a;Object.defineProperty(r.jwt,"ClientCapability",{get:function(){return a=a||i(44594)}});var u;Object.defineProperty(r.jwt,"taskrouter",{get:function(){return u=u||{TaskRouterCapability:i(68382),util:i(88790)}}});var h;Object.defineProperty(r.twiml,"VoiceResponse",{get:function(){return h=h||i(28905)}});var f;Object.defineProperty(r.twiml,"MessagingResponse",{get:function(){return f=f||i(53341)}});var p;Object.defineProperty(r.twiml,"FaxResponse",{get:function(){return p=p||i(18682)}});r.RestClient=s.RestClient;r.PricingClient=s.PricingClient;r.MonitorClient=s.MonitorClient;r.TaskRouterClient=s.TaskRouterClient;r.IpMessagingClient=s.IpMessagingClient;r.LookupsClient=s.LookupsClient;r.TrunkingClient=s.TrunkingClient;r.validateRequest=o.validateRequest;r.validateRequestWithBody=o.validateRequestWithBody;r.validateExpressRequest=o.validateExpressRequest;r.webhook=o.webhook;t.exports=r},59733:(t,e,i)=>{"use strict";var n=i(90250);var o=i(77486);var s=i(31669);function TaskRouterGrant(t){t=t||{};this.workspaceSid=t.workspaceSid;this.workerSid=t.workerSid;this.role=t.role}n.extend(TaskRouterGrant.prototype,{key:"task_router",toPayload:function(){var t={};if(this.workspaceSid){t.workspace_sid=this.workspaceSid}if(this.workerSid){t.worker_sid=this.workerSid}if(this.role){t.role=this.role}return t}});function ChatGrant(t){t=t||{};this.serviceSid=t.serviceSid;this.endpointId=t.endpointId;this.deploymentRoleSid=t.deploymentRoleSid;this.pushCredentialSid=t.pushCredentialSid}n.extend(ChatGrant.prototype,{key:"chat",toPayload:function(){var t={};if(this.serviceSid){t.service_sid=this.serviceSid}if(this.endpointId){t.endpoint_id=this.endpointId}if(this.deploymentRoleSid){t.deployment_role_sid=this.deploymentRoleSid}if(this.pushCredentialSid){t.push_credential_sid=this.pushCredentialSid}return t}});function IpMessagingGrant(t){ChatGrant.call(this,t)}IpMessagingGrant.prototype=n.create(ChatGrant.prototype,n.assign({_super:ChatGrant.prototype,constructor:ChatGrant}));IpMessagingGrant.prototype.key="ip_messaging";function ConversationsGrant(t){t=t||{};this.configurationProfileSid=t.configurationProfileSid}n.extend(ConversationsGrant.prototype,{key:"rtc",toPayload:function(){var t={};if(this.configurationProfileSid){t.configuration_profile_sid=this.configurationProfileSid}return t}});function VideoGrant(t){t=t||{};this.room=t.room}n.extend(VideoGrant.prototype,{key:"video",toPayload:function(){var t={};if(this.room){t.room=this.room}return t}});function SyncGrant(t){t=t||{};this.serviceSid=t.serviceSid;this.endpointId=t.endpointId}n.extend(SyncGrant.prototype,{key:"data_sync",toPayload:function(){var t={};if(this.serviceSid){t.service_sid=this.serviceSid}if(this.endpointId){t.endpoint_id=this.endpointId}return t}});function VoiceGrant(t){t=t||{};this.incomingAllow=t.incomingAllow;this.outgoingApplicationSid=t.outgoingApplicationSid;this.outgoingApplicationParams=t.outgoingApplicationParams;this.pushCredentialSid=t.pushCredentialSid;this.endpointId=t.endpointId}n.extend(VoiceGrant.prototype,{key:"voice",toPayload:function(){var t={};if(this.incomingAllow===true){t.incoming={allow:true}}if(this.outgoingApplicationSid){t.outgoing={};t.outgoing.application_sid=this.outgoingApplicationSid;if(this.outgoingApplicationParams){t.outgoing.params=this.outgoingApplicationParams}}if(this.pushCredentialSid){t.push_credential_sid=this.pushCredentialSid}if(this.endpointId){t.endpoint_id=this.endpointId}return t}});function AccessToken(t,e,i,n){if(!t){throw new Error("accountSid is required")}if(!e){throw new Error("keySid is required")}if(!i){throw new Error("secret is required")}n=n||{};this.accountSid=t;this.keySid=e;this.secret=i;this.ttl=n.ttl||3600;this.identity=n.identity;this.nbf=n.nbf;this.region=n.region;this.grants=[]}AccessToken.IpMessagingGrant=s.deprecate(IpMessagingGrant,"IpMessagingGrant is deprecated, use ChatGrant instead.");AccessToken.ChatGrant=ChatGrant;AccessToken.VoiceGrant=VoiceGrant;AccessToken.SyncGrant=SyncGrant;AccessToken.VideoGrant=VideoGrant;AccessToken.ConversationsGrant=s.deprecate(ConversationsGrant,"ConversationsGrant is deprecated, use VideoGrant instead.");AccessToken.TaskRouterGrant=TaskRouterGrant;AccessToken.DEFAULT_ALGORITHM="HS256";AccessToken.ALGORITHMS=["HS256","HS384","HS512"];n.extend(AccessToken.prototype,{addGrant:function(t){this.grants.push(t)},toJwt:function(t){t=t||AccessToken.DEFAULT_ALGORITHM;if(!n.includes(AccessToken.ALGORITHMS,t)){throw new Error("Algorithm not supported. Allowed values are "+AccessToken.ALGORITHMS.join(", "))}var e={};if(n.isInteger(this.identity)||n.isString(this.identity)){e.identity=String(this.identity)}n.each(this.grants,function(t){e[t.key]=t.toPayload()});var i=Math.floor(Date.now()/1e3);var s={jti:this.keySid+"-"+i,grants:e};if(n.isNumber(this.nbf)){s.nbf=this.nbf}var r={cty:"twilio-fpa;v=1",typ:"JWT"};if(this.region&&n.isString(this.region)){r.twr=this.region}return o.sign(s,this.secret,{header:r,algorithm:t,issuer:this.keySid,subject:this.accountSid,expiresIn:this.ttl})}});t.exports=AccessToken},44594:(t,e,i)=>{"use strict";var n=i(90250);var o=i(77486);var s=i(71191);function EventStreamScope(t){this.filters=t||{}}n.extend(EventStreamScope.prototype,{scope:"scope:stream:subscribe",payload:function(){var t=["path=/2010-04-01/Events"];if(!n.isEmpty(this.filters)){var e=n.map(this.filters,function(t,e){return n.join([s.escape(e),s.escape(t)],"=")});var i=n.join(e,"&");t.push(n.join(["appParams",s.escape(i)],"="))}var o=n.join(t,"&");return n.join([this.scope,o],"?")}});function IncomingClientScope(t){this.clientName=t}n.extend(IncomingClientScope.prototype,{scope:"scope:client:incoming",payload:function(){var t=n.join(["clientName",s.escape(this.clientName)],"=");return n.join([this.scope,t],"?")}});function OutgoingClientScope(t){if(n.isUndefined(t)){throw new Error('Required parameter "options" missing.')}if(n.isUndefined(t.applicationSid)){throw new Error('Required parameter "options.applicationSid" missing.')}t=t||{};this.applicationSid=t.applicationSid;this.clientName=t.clientName;this.params=t.params}n.extend(OutgoingClientScope.prototype,{scope:"scope:client:outgoing",payload:function(){var t=[n.join(["appSid",s.escape(this.applicationSid)],"=")];if(n.isString(this.clientName)){t.push(n.join(["clientName",s.escape(this.clientName)],"="))}if(n.isObject(this.params)){var e=n.map(this.params,function(t,e){return n.join([s.escape(e),s.escape(t)],"=")});var i=n.join(e,"&");t.push(n.join(["appParams",s.escape(i)],"="))}var o=n.join(t,"&");return n.join([this.scope,o],"?")}});function ClientCapability(t){if(n.isUndefined(t)){throw new Error('Required parameter "options" missing.')}if(n.isUndefined(t.accountSid)){throw new Error('Required parameter "options.accountSid" missing.')}if(n.isUndefined(t.authToken)){throw new Error('Required parameter "options.authToken" missing.')}t=t||{};this.accountSid=t.accountSid;this.authToken=t.authToken;this.ttl=t.ttl||3600;this.scopes=[]}ClientCapability.EventStreamScope=EventStreamScope;ClientCapability.IncomingClientScope=IncomingClientScope;ClientCapability.OutgoingClientScope=OutgoingClientScope;n.extend(ClientCapability.prototype,{addScope:function(t){this.scopes.push(t)},toJwt:function(){var t={scope:n.join(n.map(this.scopes,function(t){return t.payload()})," "),iss:this.accountSid,exp:Math.floor(new Date/1e3)+this.ttl};return o.sign(t,this.authToken)}});t.exports=ClientCapability},68382:(t,e,i)=>{"use strict";var n=i(77486);var o=i(90250);function Policy(t){t=t||{};this.url=t.url;this.method=t.method||"GET";this.queryFilter=t.queryFilter||{};this.postFilter=t.postFilter||{};this.allow=t.allow||true}o.extend(Policy.prototype,{payload:function(){return{url:this.url,method:this.method,query_filter:this.queryFilter,post_filter:this.postFilter,allow:this.allow}}});function TaskRouterCapability(t){if(o.isUndefined(t)){throw new Error('Required parameter "options" missing.')}if(o.isUndefined(t.accountSid)){throw new Error('Required parameter "options.accountSid" missing.')}if(o.isUndefined(t.authToken)){throw new Error('Required parameter "options.authToken" missing.')}if(o.isUndefined(t.workspaceSid)){throw new Error('Required parameter "options.workspaceSid" missing.')}if(o.isUndefined(t.channelId)){throw new Error('Required parameter "options.channelId" missing.')}this.accountSid=t.accountSid;this.authToken=t.authToken;this.workspaceSid=t.workspaceSid;this.channelId=t.channelId;this.friendlyName=t.friendlyName;this.ttl=t.ttl||3600;this.version=t.version||"v1";this.policies=[]}TaskRouterCapability.Policy=Policy;o.extend(TaskRouterCapability.prototype,{addPolicy:function(t){this.policies.push(t)},toJwt:function(){var t={iss:this.accountSid,exp:Math.floor(new Date/1e3)+this.ttl,version:this.version,friendly_name:this.friendlyName,account_sid:this.accountSid,channel:this.channelId,workspace_sid:this.workspaceSid,policies:o.map(this.policies,function(t){return t.payload()})};if(o.startsWith(this.channelId,"WK")){t.worker_sid=this.channelId}else if(o.startsWith(this.channelId,"WQ")){t.taskqueue_sid=this.channelId}return n.sign(t,this.authToken)}});t.exports=TaskRouterCapability},88790:(t,e,i)=>{"use strict";var n=i(90250);var o=i(68382).Policy;var s="https://event-bridge.twilio.com/v1/wschannels";var r="https://taskrouter.twilio.com";var c="v1";function defaultWorkerPolicies(t,e,i){var s=new o({url:n.join([r,t,"Workspaces",e,"Activities"],"/"),method:"GET",allow:true});var c=new o({url:n.join([r,t,"Workspaces",e,"Tasks","**"],"/"),method:"GET",allow:true});var a=new o({url:n.join([r,t,"Workspaces",e,"Workers",i,"Reservations","**"],"/"),method:"GET",allow:true});var u=new o({url:n.join([r,t,"Workspaces",e,"Workers",i],"/"),method:"GET",allow:true});return[s,c,a,u]}function defaultEventBridgePolicies(t,e){var i=n.join([s,t,e],"/");return[new o({url:i,method:"GET",allow:true}),new o({url:i,method:"POST",allow:true})]}function workspacesUrl(t){return n.join(n.filter([r,c,"Workspaces",t],n.isString),"/")}function taskQueuesUrl(t,e){return n.join(n.filter([workspacesUrl(t),"TaskQueues",e],n.isString),"/")}function tasksUrl(t,e){return n.join(n.filter([workspacesUrl(t),"Tasks",e],n.isString),"/")}function activitiesUrl(t,e){return n.join(n.filter([workspacesUrl(t),"Activities",e],n.isString),"/")}function workersUrl(t,e){return n.join(n.filter([workspacesUrl(t),"Workers",e],n.isString),"/")}function reservationsUrl(t,e,i){return n.join(n.filter([workersUrl(t,e),"Reservations",i],n.isString),"/")}t.exports={defaultWorkerPolicies:defaultWorkerPolicies,defaultEventBridgePolicies:defaultEventBridgePolicies,workspacesUrl:workspacesUrl,taskQueuesUrl:taskQueuesUrl,tasksUrl:tasksUrl,activitiesUrl:activitiesUrl,workersUrl:workersUrl,reservationsUrl:reservationsUrl}},57983:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(5020);function Accounts(t){o.prototype.constructor.call(this,t,"https://accounts.twilio.com");this._v1=undefined}n.extend(Accounts.prototype,o.prototype);Accounts.prototype.constructor=Accounts;Object.defineProperty(Accounts.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Accounts.prototype,"authTokenPromotion",{get:function(){return this.v1.authTokenPromotion}});Object.defineProperty(Accounts.prototype,"credentials",{get:function(){return this.v1.credentials}});Object.defineProperty(Accounts.prototype,"secondaryAuthToken",{get:function(){return this.v1.secondaryAuthToken}});t.exports=Accounts},15165:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(59650);function Api(t){o.prototype.constructor.call(this,t,"https://api.twilio.com");this._v2010=undefined}n.extend(Api.prototype,o.prototype);Api.prototype.constructor=Api;Object.defineProperty(Api.prototype,"v2010",{get:function(){this._v2010=this._v2010||new s(this);return this._v2010}});Object.defineProperty(Api.prototype,"account",{get:function(){return this.v2010.account}});Object.defineProperty(Api.prototype,"accounts",{get:function(){return this.v2010.accounts}});Object.defineProperty(Api.prototype,"addresses",{get:function(){return this.account.addresses}});Object.defineProperty(Api.prototype,"applications",{get:function(){return this.account.applications}});Object.defineProperty(Api.prototype,"authorizedConnectApps",{get:function(){return this.account.authorizedConnectApps}});Object.defineProperty(Api.prototype,"availablePhoneNumbers",{get:function(){return this.account.availablePhoneNumbers}});Object.defineProperty(Api.prototype,"balance",{get:function(){return this.account.balance}});Object.defineProperty(Api.prototype,"calls",{get:function(){return this.account.calls}});Object.defineProperty(Api.prototype,"conferences",{get:function(){return this.account.conferences}});Object.defineProperty(Api.prototype,"connectApps",{get:function(){return this.account.connectApps}});Object.defineProperty(Api.prototype,"incomingPhoneNumbers",{get:function(){return this.account.incomingPhoneNumbers}});Object.defineProperty(Api.prototype,"keys",{get:function(){return this.account.keys}});Object.defineProperty(Api.prototype,"messages",{get:function(){return this.account.messages}});Object.defineProperty(Api.prototype,"newKeys",{get:function(){return this.account.newKeys}});Object.defineProperty(Api.prototype,"newSigningKeys",{get:function(){return this.account.newSigningKeys}});Object.defineProperty(Api.prototype,"notifications",{get:function(){return this.account.notifications}});Object.defineProperty(Api.prototype,"outgoingCallerIds",{get:function(){return this.account.outgoingCallerIds}});Object.defineProperty(Api.prototype,"queues",{get:function(){return this.account.queues}});Object.defineProperty(Api.prototype,"recordings",{get:function(){return this.account.recordings}});Object.defineProperty(Api.prototype,"signingKeys",{get:function(){return this.account.signingKeys}});Object.defineProperty(Api.prototype,"sip",{get:function(){return this.account.sip}});Object.defineProperty(Api.prototype,"shortCodes",{get:function(){return this.account.shortCodes}});Object.defineProperty(Api.prototype,"tokens",{get:function(){return this.account.tokens}});Object.defineProperty(Api.prototype,"transcriptions",{get:function(){return this.account.transcriptions}});Object.defineProperty(Api.prototype,"usage",{get:function(){return this.account.usage}});Object.defineProperty(Api.prototype,"validationRequests",{get:function(){return this.account.validationRequests}});t.exports=Api},6824:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(6522);function Autopilot(t){o.prototype.constructor.call(this,t,"https://autopilot.twilio.com");this._v1=undefined}n.extend(Autopilot.prototype,o.prototype);Autopilot.prototype.constructor=Autopilot;Object.defineProperty(Autopilot.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Autopilot.prototype,"assistants",{get:function(){return this.v1.assistants}});Object.defineProperty(Autopilot.prototype,"restoreAssistant",{get:function(){return this.v1.restoreAssistant}});t.exports=Autopilot},48999:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(51999);function Bulkexports(t){o.prototype.constructor.call(this,t,"https://bulkexports.twilio.com");this._v1=undefined}n.extend(Bulkexports.prototype,o.prototype);Bulkexports.prototype.constructor=Bulkexports;Object.defineProperty(Bulkexports.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Bulkexports.prototype,"exports",{get:function(){return this.v1.exports}});Object.defineProperty(Bulkexports.prototype,"exportConfiguration",{get:function(){return this.v1.exportConfiguration}});t.exports=Bulkexports},85546:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(21772);var r=i(65979);function Chat(t){o.prototype.constructor.call(this,t,"https://chat.twilio.com");this._v1=undefined;this._v2=undefined}n.extend(Chat.prototype,o.prototype);Chat.prototype.constructor=Chat;Object.defineProperty(Chat.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Chat.prototype,"v2",{get:function(){this._v2=this._v2||new r(this);return this._v2}});Object.defineProperty(Chat.prototype,"credentials",{get:function(){return this.v2.credentials}});Object.defineProperty(Chat.prototype,"services",{get:function(){return this.v2.services}});t.exports=Chat},99118:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(12918);function Conversations(t){o.prototype.constructor.call(this,t,"https://conversations.twilio.com");this._v1=undefined}n.extend(Conversations.prototype,o.prototype);Conversations.prototype.constructor=Conversations;Object.defineProperty(Conversations.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Conversations.prototype,"configuration",{get:function(){return this.v1.configuration}});Object.defineProperty(Conversations.prototype,"conversations",{get:function(){return this.v1.conversations}});Object.defineProperty(Conversations.prototype,"credentials",{get:function(){return this.v1.credentials}});Object.defineProperty(Conversations.prototype,"roles",{get:function(){return this.v1.roles}});Object.defineProperty(Conversations.prototype,"services",{get:function(){return this.v1.services}});Object.defineProperty(Conversations.prototype,"users",{get:function(){return this.v1.users}});t.exports=Conversations},84429:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(47767);function Events(t){o.prototype.constructor.call(this,t,"https://events.twilio.com");this._v1=undefined}n.extend(Events.prototype,o.prototype);Events.prototype.constructor=Events;Object.defineProperty(Events.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Events.prototype,"eventTypes",{get:function(){return this.v1.eventTypes}});Object.defineProperty(Events.prototype,"schemas",{get:function(){return this.v1.schemas}});Object.defineProperty(Events.prototype,"sinks",{get:function(){return this.v1.sinks}});Object.defineProperty(Events.prototype,"subscriptions",{get:function(){return this.v1.subscriptions}});t.exports=Events},68262:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(23827);function Fax(t){o.prototype.constructor.call(this,t,"https://fax.twilio.com");this._v1=undefined}n.extend(Fax.prototype,o.prototype);Fax.prototype.constructor=Fax;Object.defineProperty(Fax.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Fax.prototype,"faxes",{get:function(){return this.v1.faxes}});t.exports=Fax},43888:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(47633);function FlexApi(t){o.prototype.constructor.call(this,t,"https://flex-api.twilio.com");this._v1=undefined}n.extend(FlexApi.prototype,o.prototype);FlexApi.prototype.constructor=FlexApi;Object.defineProperty(FlexApi.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(FlexApi.prototype,"channel",{get:function(){return this.v1.channel}});Object.defineProperty(FlexApi.prototype,"configuration",{get:function(){return this.v1.configuration}});Object.defineProperty(FlexApi.prototype,"flexFlow",{get:function(){return this.v1.flexFlow}});Object.defineProperty(FlexApi.prototype,"webChannel",{get:function(){return this.v1.webChannel}});t.exports=FlexApi},32062:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(46133);function Insights(t){o.prototype.constructor.call(this,t,"https://insights.twilio.com");this._v1=undefined}n.extend(Insights.prototype,o.prototype);Insights.prototype.constructor=Insights;Object.defineProperty(Insights.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Insights.prototype,"calls",{get:function(){return this.v1.calls}});Object.defineProperty(Insights.prototype,"rooms",{get:function(){return this.v1.rooms}});t.exports=Insights},87891:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(76365);var r=i(17014);function IpMessaging(t){o.prototype.constructor.call(this,t,"https://ip-messaging.twilio.com");this._v1=undefined;this._v2=undefined}n.extend(IpMessaging.prototype,o.prototype);IpMessaging.prototype.constructor=IpMessaging;Object.defineProperty(IpMessaging.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(IpMessaging.prototype,"v2",{get:function(){this._v2=this._v2||new r(this);return this._v2}});Object.defineProperty(IpMessaging.prototype,"credentials",{get:function(){return this.v2.credentials}});Object.defineProperty(IpMessaging.prototype,"services",{get:function(){return this.v2.services}});t.exports=IpMessaging},10016:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(23896);function Lookups(t){o.prototype.constructor.call(this,t,"https://lookups.twilio.com");this._v1=undefined}n.extend(Lookups.prototype,o.prototype);Lookups.prototype.constructor=Lookups;Object.defineProperty(Lookups.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Lookups.prototype,"phoneNumbers",{get:function(){return this.v1.phoneNumbers}});t.exports=Lookups},46063:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(98776);function Messaging(t){o.prototype.constructor.call(this,t,"https://messaging.twilio.com");this._v1=undefined}n.extend(Messaging.prototype,o.prototype);Messaging.prototype.constructor=Messaging;Object.defineProperty(Messaging.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Messaging.prototype,"deactivations",{get:function(){return this.v1.deactivations}});Object.defineProperty(Messaging.prototype,"services",{get:function(){return this.v1.services}});t.exports=Messaging},52240:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(99630);function Monitor(t){o.prototype.constructor.call(this,t,"https://monitor.twilio.com");this._v1=undefined}n.extend(Monitor.prototype,o.prototype);Monitor.prototype.constructor=Monitor;Object.defineProperty(Monitor.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Monitor.prototype,"alerts",{get:function(){return this.v1.alerts}});Object.defineProperty(Monitor.prototype,"events",{get:function(){return this.v1.events}});t.exports=Monitor},96951:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(88117);function Notify(t){o.prototype.constructor.call(this,t,"https://notify.twilio.com");this._v1=undefined}n.extend(Notify.prototype,o.prototype);Notify.prototype.constructor=Notify;Object.defineProperty(Notify.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Notify.prototype,"credentials",{get:function(){return this.v1.credentials}});Object.defineProperty(Notify.prototype,"services",{get:function(){return this.v1.services}});t.exports=Notify},60482:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(16213);function Numbers(t){o.prototype.constructor.call(this,t,"https://numbers.twilio.com");this._v2=undefined}n.extend(Numbers.prototype,o.prototype);Numbers.prototype.constructor=Numbers;Object.defineProperty(Numbers.prototype,"v2",{get:function(){this._v2=this._v2||new s(this);return this._v2}});Object.defineProperty(Numbers.prototype,"regulatoryCompliance",{get:function(){return this.v2.regulatoryCompliance}});t.exports=Numbers},70930:(t,e,i)=>{"use strict";var n=i(90250);var o=i(1382);var s=i(82477);var r=i(64580);var c=i(39874);var a=i(87505);var u=i(71881);var h=i(63819);var f=i(89265);var p=i(87152);function Preview(t){r.prototype.constructor.call(this,t,"https://preview.twilio.com");this._bulk_exports=undefined;this._deployed_devices=undefined;this._hosted_numbers=undefined;this._marketplace=undefined;this._sync=undefined;this._understand=undefined;this._wireless=undefined;this._trusted_comms=undefined}n.extend(Preview.prototype,r.prototype);Preview.prototype.constructor=Preview;Object.defineProperty(Preview.prototype,"bulk_exports",{get:function(){this._bulk_exports=this._bulk_exports||new o(this);return this._bulk_exports}});Object.defineProperty(Preview.prototype,"deployed_devices",{get:function(){this._deployed_devices=this._deployed_devices||new s(this);return this._deployed_devices}});Object.defineProperty(Preview.prototype,"hosted_numbers",{get:function(){this._hosted_numbers=this._hosted_numbers||new c(this);return this._hosted_numbers}});Object.defineProperty(Preview.prototype,"marketplace",{get:function(){this._marketplace=this._marketplace||new a(this);return this._marketplace}});Object.defineProperty(Preview.prototype,"sync",{get:function(){this._sync=this._sync||new u(this);return this._sync}});Object.defineProperty(Preview.prototype,"understand",{get:function(){this._understand=this._understand||new f(this);return this._understand}});Object.defineProperty(Preview.prototype,"wireless",{get:function(){this._wireless=this._wireless||new p(this);return this._wireless}});Object.defineProperty(Preview.prototype,"trusted_comms",{get:function(){this._trusted_comms=this._trusted_comms||new h(this);return this._trusted_comms}});Object.defineProperty(Preview.prototype,"exports",{get:function(){return this.bulk_exports.exports}});Object.defineProperty(Preview.prototype,"exportConfiguration",{get:function(){return this.bulk_exports.exportConfiguration}});Object.defineProperty(Preview.prototype,"fleets",{get:function(){return this.deployed_devices.fleets}});Object.defineProperty(Preview.prototype,"authorizationDocuments",{get:function(){return this.hosted_numbers.authorizationDocuments}});Object.defineProperty(Preview.prototype,"hostedNumberOrders",{get:function(){return this.hosted_numbers.hostedNumberOrders}});Object.defineProperty(Preview.prototype,"availableAddOns",{get:function(){return this.marketplace.availableAddOns}});Object.defineProperty(Preview.prototype,"installedAddOns",{get:function(){return this.marketplace.installedAddOns}});Object.defineProperty(Preview.prototype,"services",{get:function(){return this.sync.services}});Object.defineProperty(Preview.prototype,"assistants",{get:function(){return this.understand.assistants}});Object.defineProperty(Preview.prototype,"commands",{get:function(){return this.wireless.commands}});Object.defineProperty(Preview.prototype,"ratePlans",{get:function(){return this.wireless.ratePlans}});Object.defineProperty(Preview.prototype,"sims",{get:function(){return this.wireless.sims}});Object.defineProperty(Preview.prototype,"brandedChannels",{get:function(){return this.trusted_comms.brandedChannels}});Object.defineProperty(Preview.prototype,"brandsInformation",{get:function(){return this.trusted_comms.brandsInformation}});Object.defineProperty(Preview.prototype,"cps",{get:function(){return this.trusted_comms.cps}});Object.defineProperty(Preview.prototype,"currentCalls",{get:function(){return this.trusted_comms.currentCalls}});t.exports=Preview},9037:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(49274);var r=i(27068);function Pricing(t){o.prototype.constructor.call(this,t,"https://pricing.twilio.com");this._v1=undefined;this._v2=undefined}n.extend(Pricing.prototype,o.prototype);Pricing.prototype.constructor=Pricing;Object.defineProperty(Pricing.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Pricing.prototype,"v2",{get:function(){this._v2=this._v2||new r(this);return this._v2}});Object.defineProperty(Pricing.prototype,"messaging",{get:function(){return this.v1.messaging}});Object.defineProperty(Pricing.prototype,"phoneNumbers",{get:function(){return this.v1.phoneNumbers}});Object.defineProperty(Pricing.prototype,"voice",{get:function(){return this.v2.voice}});t.exports=Pricing},31947:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(3986);function Proxy(t){o.prototype.constructor.call(this,t,"https://proxy.twilio.com");this._v1=undefined}n.extend(Proxy.prototype,o.prototype);Proxy.prototype.constructor=Proxy;Object.defineProperty(Proxy.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Proxy.prototype,"services",{get:function(){return this.v1.services}});t.exports=Proxy},7473:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(98995);function Serverless(t){o.prototype.constructor.call(this,t,"https://serverless.twilio.com");this._v1=undefined}n.extend(Serverless.prototype,o.prototype);Serverless.prototype.constructor=Serverless;Object.defineProperty(Serverless.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Serverless.prototype,"services",{get:function(){return this.v1.services}});t.exports=Serverless},25320:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(67727);var r=i(81292);function Studio(t){o.prototype.constructor.call(this,t,"https://studio.twilio.com");this._v1=undefined;this._v2=undefined}n.extend(Studio.prototype,o.prototype);Studio.prototype.constructor=Studio;Object.defineProperty(Studio.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Studio.prototype,"v2",{get:function(){this._v2=this._v2||new r(this);return this._v2}});Object.defineProperty(Studio.prototype,"flows",{get:function(){return this.v2.flows}});Object.defineProperty(Studio.prototype,"flowValidate",{get:function(){return this.v2.flowValidate}});t.exports=Studio},64165:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(16029);function Supersim(t){o.prototype.constructor.call(this,t,"https://supersim.twilio.com");this._v1=undefined}n.extend(Supersim.prototype,o.prototype);Supersim.prototype.constructor=Supersim;Object.defineProperty(Supersim.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Supersim.prototype,"commands",{get:function(){return this.v1.commands}});Object.defineProperty(Supersim.prototype,"fleets",{get:function(){return this.v1.fleets}});Object.defineProperty(Supersim.prototype,"networks",{get:function(){return this.v1.networks}});Object.defineProperty(Supersim.prototype,"networkAccessProfiles",{get:function(){return this.v1.networkAccessProfiles}});Object.defineProperty(Supersim.prototype,"sims",{get:function(){return this.v1.sims}});Object.defineProperty(Supersim.prototype,"usageRecords",{get:function(){return this.v1.usageRecords}});t.exports=Supersim},44495:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(34949);function Sync(t){o.prototype.constructor.call(this,t,"https://sync.twilio.com");this._v1=undefined}n.extend(Sync.prototype,o.prototype);Sync.prototype.constructor=Sync;Object.defineProperty(Sync.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Sync.prototype,"services",{get:function(){return this.v1.services}});t.exports=Sync},43191:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(28079);function Taskrouter(t){o.prototype.constructor.call(this,t,"https://taskrouter.twilio.com");this._v1=undefined}n.extend(Taskrouter.prototype,o.prototype);Taskrouter.prototype.constructor=Taskrouter;Object.defineProperty(Taskrouter.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Taskrouter.prototype,"workspaces",{get:function(){return this.v1.workspaces}});t.exports=Taskrouter},66569:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(99996);function Trunking(t){o.prototype.constructor.call(this,t,"https://trunking.twilio.com");this._v1=undefined}n.extend(Trunking.prototype,o.prototype);Trunking.prototype.constructor=Trunking;Object.defineProperty(Trunking.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Trunking.prototype,"trunks",{get:function(){return this.v1.trunks}});t.exports=Trunking},98239:(t,e,i)=>{"use strict";var n=i(87751);var o=i(78835);var s=i(31669);var r=i(50284);function Twilio(t,e,i){i=i||{};var n=i.env||process.env;this.username=t||n.TWILIO_ACCOUNT_SID;this.password=e||n.TWILIO_AUTH_TOKEN;this.accountSid=i.accountSid||this.username;this._httpClient=i.httpClient;if(!i.lazyLoading){this._httpClient=this.httpClient}this.edge=i.edge||n.TWILIO_EDGE;this.region=i.region||n.TWILIO_REGION;this.logLevel=i.logLevel||n.TWILIO_LOG_LEVEL;if(!this.username){throw new Error("username is required")}if(!this.password){throw new Error("password is required")}if(!this.accountSid.startsWith("AC")){throw new Error("accountSid must start with AC")}this._accounts=undefined;this._api=undefined;this._autopilot=undefined;this._chat=undefined;this._conversations=undefined;this._events=undefined;this._fax=undefined;this._flexApi=undefined;this._insights=undefined;this._ipMessaging=undefined;this._lookups=undefined;this._messaging=undefined;this._monitor=undefined;this._notify=undefined;this._numbers=undefined;this._preview=undefined;this._pricing=undefined;this._proxy=undefined;this._serverless=undefined;this._studio=undefined;this._sync=undefined;this._taskrouter=undefined;this._trunking=undefined;this._verify=undefined;this._video=undefined;this._voice=undefined;this._wireless=undefined;this._supersim=undefined;this._bulkexports=undefined;if(!i.lazyLoading){this.accounts;this.api;this.autopilot;this.chat;this.conversations;this.events;this.fax;this.flexApi;this.insights;this.ipMessaging;this.lookups;this.messaging;this.monitor;this.notify;this.numbers;this.preview;this.pricing;this.proxy;this.serverless;this.studio;this.sync;this.taskrouter;this.trunking;this.verify;this.video;this.voice;this.wireless;this.supersim;this.bulkexports}}Twilio.prototype.request=function request(t){t=t||{};if(!t.method){throw new Error("method is required")}if(!t.uri){throw new Error("uri is required")}var e=t.username||this.username;var i=t.password||this.password;var r=t.headers||{};r["User-Agent"]=s.format("twilio-node/%s (node.js %s)",n.version,process.version);r["Accept-Charset"]="utf-8";if(t.method==="POST"&&!r["Content-Type"]){r["Content-Type"]="application/x-www-form-urlencoded"}if(!r.Accept){r.Accept="application/json"}var c=new o.URL(t.uri);c.hostname=this.getHostname(c.hostname,this.edge,this.region);return this.httpClient.request({method:t.method,uri:c.href,username:e,password:i,headers:r,params:t.params,data:t.data,timeout:t.timeout,allowRedirects:t.allowRedirects,logLevel:t.logLevel||this.logLevel})};Twilio.prototype.getHostname=function getHostname(t,e,i){const n="us1";const o=t.split(".").slice(-2).join(".");const s=t.split("."+o)[0];let[r,c,a]=s.split(".");if(c&&!a){a=c;c=undefined}a=i||a||e&&n;if(!a){return t}c=e||c;return[r,c,a,o].filter(t=>t).join(".")};Twilio.prototype.validateSslCert=function validateSslCert(){return this.httpClient.request({method:"GET",uri:"https://api.twilio.com:8443/2010-04-01/.json"}).then(t=>{if(t.statusCode<200||t.statusCode>=300){throw new r(t)}return t})};Object.defineProperty(Twilio.prototype,"httpClient",{get:function(){if(!this._httpClient){var t=i(77761);this._httpClient=new t}return this._httpClient}});Object.defineProperty(Twilio.prototype,"accounts",{get:function(){if(!this._accounts){var t=i(57983);this._accounts=new t(this)}return this._accounts}});Object.defineProperty(Twilio.prototype,"api",{get:function(){if(!this._api){var t=i(15165);this._api=new t(this)}return this._api}});Object.defineProperty(Twilio.prototype,"autopilot",{get:function(){if(!this._autopilot){var t=i(6824);this._autopilot=new t(this)}return this._autopilot}});Object.defineProperty(Twilio.prototype,"chat",{get:function(){if(!this._chat){var t=i(85546);this._chat=new t(this)}return this._chat}});Object.defineProperty(Twilio.prototype,"conversations",{get:function(){if(!this._conversations){var t=i(99118);this._conversations=new t(this)}return this._conversations}});Object.defineProperty(Twilio.prototype,"events",{get:function(){if(!this._events){var t=i(84429);this._events=new t(this)}return this._events}});Object.defineProperty(Twilio.prototype,"fax",{get:function(){if(!this._fax){var t=i(68262);this._fax=new t(this)}return this._fax}});Object.defineProperty(Twilio.prototype,"flexApi",{get:function(){if(!this._flexApi){var t=i(43888);this._flexApi=new t(this)}return this._flexApi}});Object.defineProperty(Twilio.prototype,"insights",{get:function(){if(!this._insights){var t=i(32062);this._insights=new t(this)}return this._insights}});Object.defineProperty(Twilio.prototype,"ipMessaging",{get:function(){if(!this._ipMessaging){var t=i(87891);this._ipMessaging=new t(this)}return this._ipMessaging}});Object.defineProperty(Twilio.prototype,"lookups",{get:function(){if(!this._lookups){var t=i(10016);this._lookups=new t(this)}return this._lookups}});Object.defineProperty(Twilio.prototype,"messaging",{get:function(){if(!this._messaging){var t=i(46063);this._messaging=new t(this)}return this._messaging}});Object.defineProperty(Twilio.prototype,"monitor",{get:function(){if(!this._monitor){var t=i(52240);this._monitor=new t(this)}return this._monitor}});Object.defineProperty(Twilio.prototype,"notify",{get:function(){if(!this._notify){var t=i(96951);this._notify=new t(this)}return this._notify}});Object.defineProperty(Twilio.prototype,"numbers",{get:function(){if(!this._numbers){var t=i(60482);this._numbers=new t(this)}return this._numbers}});Object.defineProperty(Twilio.prototype,"preview",{get:function(){if(!this._preview){var t=i(70930);this._preview=new t(this)}return this._preview}});Object.defineProperty(Twilio.prototype,"pricing",{get:function(){if(!this._pricing){var t=i(9037);this._pricing=new t(this)}return this._pricing}});Object.defineProperty(Twilio.prototype,"proxy",{get:function(){if(!this._proxy){var t=i(31947);this._proxy=new t(this)}return this._proxy}});Object.defineProperty(Twilio.prototype,"serverless",{get:function(){if(!this._serverless){var t=i(7473);this._serverless=new t(this)}return this._serverless}});Object.defineProperty(Twilio.prototype,"studio",{get:function(){if(!this._studio){var t=i(25320);this._studio=new t(this)}return this._studio}});Object.defineProperty(Twilio.prototype,"sync",{get:function(){if(!this._sync){var t=i(44495);this._sync=new t(this)}return this._sync}});Object.defineProperty(Twilio.prototype,"taskrouter",{get:function(){if(!this._taskrouter){var t=i(43191);this._taskrouter=new t(this)}return this._taskrouter}});Object.defineProperty(Twilio.prototype,"trunking",{get:function(){if(!this._trunking){var t=i(66569);this._trunking=new t(this)}return this._trunking}});Object.defineProperty(Twilio.prototype,"verify",{get:function(){if(!this._verify){var t=i(32822);this._verify=new t(this)}return this._verify}});Object.defineProperty(Twilio.prototype,"video",{get:function(){if(!this._video){var t=i(29977);this._video=new t(this)}return this._video}});Object.defineProperty(Twilio.prototype,"voice",{get:function(){if(!this._voice){var t=i(24744);this._voice=new t(this)}return this._voice}});Object.defineProperty(Twilio.prototype,"wireless",{get:function(){if(!this._wireless){var t=i(22242);this._wireless=new t(this)}return this._wireless}});Object.defineProperty(Twilio.prototype,"supersim",{get:function(){if(!this._supersim){var t=i(64165);this._supersim=new t(this)}return this._supersim}});Object.defineProperty(Twilio.prototype,"bulkexports",{get:function(){if(!this._bulkexports){var t=i(48999);this._bulkexports=new t(this)}return this._bulkexports}});Object.defineProperty(Twilio.prototype,"addresses",{get:function(){return this.api.account.addresses}});Object.defineProperty(Twilio.prototype,"applications",{get:function(){return this.api.account.applications}});Object.defineProperty(Twilio.prototype,"authorizedConnectApps",{get:function(){return this.api.account.authorizedConnectApps}});Object.defineProperty(Twilio.prototype,"availablePhoneNumbers",{get:function(){return this.api.account.availablePhoneNumbers}});Object.defineProperty(Twilio.prototype,"balance",{get:function(){return this.api.account.balance}});Object.defineProperty(Twilio.prototype,"calls",{get:function(){return this.api.account.calls}});Object.defineProperty(Twilio.prototype,"conferences",{get:function(){return this.api.account.conferences}});Object.defineProperty(Twilio.prototype,"connectApps",{get:function(){return this.api.account.connectApps}});Object.defineProperty(Twilio.prototype,"incomingPhoneNumbers",{get:function(){return this.api.account.incomingPhoneNumbers}});Object.defineProperty(Twilio.prototype,"keys",{get:function(){return this.api.account.keys}});Object.defineProperty(Twilio.prototype,"messages",{get:function(){return this.api.account.messages}});Object.defineProperty(Twilio.prototype,"newKeys",{get:function(){return this.api.account.newKeys}});Object.defineProperty(Twilio.prototype,"newSigningKeys",{get:function(){return this.api.account.newSigningKeys}});Object.defineProperty(Twilio.prototype,"notifications",{get:function(){return this.api.account.notifications}});Object.defineProperty(Twilio.prototype,"outgoingCallerIds",{get:function(){return this.api.account.outgoingCallerIds}});Object.defineProperty(Twilio.prototype,"queues",{get:function(){return this.api.account.queues}});Object.defineProperty(Twilio.prototype,"recordings",{get:function(){return this.api.account.recordings}});Object.defineProperty(Twilio.prototype,"signingKeys",{get:function(){return this.api.account.signingKeys}});Object.defineProperty(Twilio.prototype,"sip",{get:function(){return this.api.account.sip}});Object.defineProperty(Twilio.prototype,"shortCodes",{get:function(){return this.api.account.shortCodes}});Object.defineProperty(Twilio.prototype,"tokens",{get:function(){return this.api.account.tokens}});Object.defineProperty(Twilio.prototype,"transcriptions",{get:function(){return this.api.account.transcriptions}});Object.defineProperty(Twilio.prototype,"usage",{get:function(){return this.api.account.usage}});Object.defineProperty(Twilio.prototype,"validationRequests",{get:function(){return this.api.account.validationRequests}});t.exports=Twilio},32822:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(79352);function Verify(t){o.prototype.constructor.call(this,t,"https://verify.twilio.com");this._v2=undefined}n.extend(Verify.prototype,o.prototype);Verify.prototype.constructor=Verify;Object.defineProperty(Verify.prototype,"v2",{get:function(){this._v2=this._v2||new s(this);return this._v2}});Object.defineProperty(Verify.prototype,"forms",{get:function(){return this.v2.forms}});Object.defineProperty(Verify.prototype,"services",{get:function(){return this.v2.services}});t.exports=Verify},29977:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(41933);function Video(t){o.prototype.constructor.call(this,t,"https://video.twilio.com");this._v1=undefined}n.extend(Video.prototype,o.prototype);Video.prototype.constructor=Video;Object.defineProperty(Video.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Video.prototype,"compositions",{get:function(){return this.v1.compositions}});Object.defineProperty(Video.prototype,"compositionHooks",{get:function(){return this.v1.compositionHooks}});Object.defineProperty(Video.prototype,"compositionSettings",{get:function(){return this.v1.compositionSettings}});Object.defineProperty(Video.prototype,"recordings",{get:function(){return this.v1.recordings}});Object.defineProperty(Video.prototype,"recordingSettings",{get:function(){return this.v1.recordingSettings}});Object.defineProperty(Video.prototype,"rooms",{get:function(){return this.v1.rooms}});t.exports=Video},24744:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(24691);function Voice(t){o.prototype.constructor.call(this,t,"https://voice.twilio.com");this._v1=undefined}n.extend(Voice.prototype,o.prototype);Voice.prototype.constructor=Voice;Object.defineProperty(Voice.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Voice.prototype,"byocTrunks",{get:function(){return this.v1.byocTrunks}});Object.defineProperty(Voice.prototype,"connectionPolicies",{get:function(){return this.v1.connectionPolicies}});Object.defineProperty(Voice.prototype,"dialingPermissions",{get:function(){return this.v1.dialingPermissions}});Object.defineProperty(Voice.prototype,"ipRecords",{get:function(){return this.v1.ipRecords}});Object.defineProperty(Voice.prototype,"sourceIpMappings",{get:function(){return this.v1.sourceIpMappings}});t.exports=Voice},22242:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64580);var s=i(57415);function Wireless(t){o.prototype.constructor.call(this,t,"https://wireless.twilio.com");this._v1=undefined}n.extend(Wireless.prototype,o.prototype);Wireless.prototype.constructor=Wireless;Object.defineProperty(Wireless.prototype,"v1",{get:function(){this._v1=this._v1||new s(this);return this._v1}});Object.defineProperty(Wireless.prototype,"usageRecords",{get:function(){return this.v1.usageRecords}});Object.defineProperty(Wireless.prototype,"commands",{get:function(){return this.v1.commands}});Object.defineProperty(Wireless.prototype,"ratePlans",{get:function(){return this.v1.ratePlans}});Object.defineProperty(Wireless.prototype,"sims",{get:function(){return this.v1.sims}});t.exports=Wireless},5020:(t,e,i)=>{"use strict";var n=i(90250);var o=i(69221).AuthTokenPromotionList;var s=i(53028).CredentialList;var r=i(38505).SecondaryAuthTokenList;var c=i(64351);function V1(t){c.prototype.constructor.call(this,t,"v1");this._authTokenPromotion=undefined;this._credentials=undefined;this._secondaryAuthToken=undefined}n.extend(V1.prototype,c.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"authTokenPromotion",{get:function(){this._authTokenPromotion=this._authTokenPromotion||new o(this);return this._authTokenPromotion}});Object.defineProperty(V1.prototype,"credentials",{get:function(){this._credentials=this._credentials||new s(this);return this._credentials}});Object.defineProperty(V1.prototype,"secondaryAuthToken",{get:function(){this._secondaryAuthToken=this._secondaryAuthToken||new r(this);return this._secondaryAuthToken}});t.exports=V1},69221:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AuthTokenPromotionList(t){function AuthTokenPromotionListInstance(t){return AuthTokenPromotionListInstance.get(t)}AuthTokenPromotionListInstance._version=t;AuthTokenPromotionListInstance._solution={};AuthTokenPromotionListInstance.get=function get(){return new p(this._version)};AuthTokenPromotionListInstance.toJSON=function toJSON(){return this._solution};AuthTokenPromotionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthTokenPromotionListInstance};h=function AuthTokenPromotionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AuthTokenPromotionInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.authToken=e.auth_token;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.update=function update(t){return this._proxy.update(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AuthTokenPromotionContext(t){this._version=t;this._solution={};this._uri=`/AuthTokens/Promote`};p.prototype.update=function update(t){var e=n.defer();var i=this._version.update({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthTokenPromotionList:u,AuthTokenPromotionPage:h,AuthTokenPromotionInstance:f,AuthTokenPromotionContext:p}},53028:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(24295).AwsList;var r=i(77791).PublicKeyList;var c;c=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._publicKey=undefined;CredentialListInstance._aws=undefined;Object.defineProperty(CredentialListInstance,"publicKey",{get:function publicKey(){if(!this._publicKey){this._publicKey=new r(this._version)}return this._publicKey}});Object.defineProperty(CredentialListInstance,"aws",{get:function aws(){if(!this._aws){this._aws=new s(this._version)}return this._aws}});CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return CredentialListInstance};t.exports={CredentialList:c}},24295:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AwsList(t){function AwsListInstance(t){return AwsListInstance.get(t)}AwsListInstance._version=t;AwsListInstance._solution={};AwsListInstance._uri=`/Credentials/AWS`;AwsListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AwsListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AwsListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AwsListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AwsListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.credentials)){throw new Error('Required parameter "opts.credentials" missing.')}var i=n.defer();var s=a.of({Credentials:o.get(t,"credentials"),FriendlyName:o.get(t,"friendlyName"),AccountSid:o.get(t,"accountSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AwsListInstance.get=function get(t){return new p(this._version,t)};AwsListInstance.toJSON=function toJSON(){return this._solution};AwsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AwsListInstance};h=function AwsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AwsInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AwsContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/AWS/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AwsList:u,AwsPage:h,AwsInstance:f,AwsContext:p}},77791:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function PublicKeyList(t){function PublicKeyListInstance(t){return PublicKeyListInstance.get(t)}PublicKeyListInstance._version=t;PublicKeyListInstance._solution={};PublicKeyListInstance._uri=`/Credentials/PublicKeys`;PublicKeyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PublicKeyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PublicKeyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PublicKeyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PublicKeyListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.publicKey)){throw new Error('Required parameter "opts.publicKey" missing.')}var i=n.defer();var s=a.of({PublicKey:o.get(t,"publicKey"),FriendlyName:o.get(t,"friendlyName"),AccountSid:o.get(t,"accountSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PublicKeyListInstance.get=function get(t){return new p(this._version,t)};PublicKeyListInstance.toJSON=function toJSON(){return this._solution};PublicKeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PublicKeyListInstance};h=function PublicKeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PublicKeyInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PublicKeyContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/PublicKeys/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PublicKeyList:u,PublicKeyPage:h,PublicKeyInstance:f,PublicKeyContext:p}},38505:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SecondaryAuthTokenList(t){function SecondaryAuthTokenListInstance(t){return SecondaryAuthTokenListInstance.get(t)}SecondaryAuthTokenListInstance._version=t;SecondaryAuthTokenListInstance._solution={};SecondaryAuthTokenListInstance.get=function get(){return new p(this._version)};SecondaryAuthTokenListInstance.toJSON=function toJSON(){return this._solution};SecondaryAuthTokenListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SecondaryAuthTokenListInstance};h=function SecondaryAuthTokenPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SecondaryAuthTokenInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.secondaryAuthToken=e.secondary_auth_token;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.create=function create(t){return this._proxy.create(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SecondaryAuthTokenContext(t){this._version=t;this._solution={};this._uri=`/AuthTokens/Secondary`};p.prototype.create=function create(t){var e=n.defer();var i=this._version.create({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SecondaryAuthTokenList:u,SecondaryAuthTokenPage:h,SecondaryAuthTokenInstance:f,SecondaryAuthTokenContext:p}},59650:(t,e,i)=>{"use strict";var n=i(90250);var o=i(72241).AccountContext;var s=i(72241).AccountList;var r=i(64351);function V2010(t){r.prototype.constructor.call(this,t,"2010-04-01");this._accounts=undefined;this._account=undefined}n.extend(V2010.prototype,r.prototype);V2010.prototype.constructor=V2010;Object.defineProperty(V2010.prototype,"accounts",{get:function(){this._accounts=this._accounts||new s(this);return this._accounts}});Object.defineProperty(V2010.prototype,"account",{get:function(){if(!this._account){this._account=new o(this,this._domain.twilio.accountSid)}return this._account},set:function(t){this._account=t}});Object.defineProperty(V2010.prototype,"addresses",{get:function(){return this.account.addresses}});Object.defineProperty(V2010.prototype,"applications",{get:function(){return this.account.applications}});Object.defineProperty(V2010.prototype,"authorizedConnectApps",{get:function(){return this.account.authorizedConnectApps}});Object.defineProperty(V2010.prototype,"availablePhoneNumbers",{get:function(){return this.account.availablePhoneNumbers}});Object.defineProperty(V2010.prototype,"balance",{get:function(){return this.account.balance}});Object.defineProperty(V2010.prototype,"calls",{get:function(){return this.account.calls}});Object.defineProperty(V2010.prototype,"conferences",{get:function(){return this.account.conferences}});Object.defineProperty(V2010.prototype,"connectApps",{get:function(){return this.account.connectApps}});Object.defineProperty(V2010.prototype,"incomingPhoneNumbers",{get:function(){return this.account.incomingPhoneNumbers}});Object.defineProperty(V2010.prototype,"keys",{get:function(){return this.account.keys}});Object.defineProperty(V2010.prototype,"messages",{get:function(){return this.account.messages}});Object.defineProperty(V2010.prototype,"newKeys",{get:function(){return this.account.newKeys}});Object.defineProperty(V2010.prototype,"newSigningKeys",{get:function(){return this.account.newSigningKeys}});Object.defineProperty(V2010.prototype,"notifications",{get:function(){return this.account.notifications}});Object.defineProperty(V2010.prototype,"outgoingCallerIds",{get:function(){return this.account.outgoingCallerIds}});Object.defineProperty(V2010.prototype,"queues",{get:function(){return this.account.queues}});Object.defineProperty(V2010.prototype,"recordings",{get:function(){return this.account.recordings}});Object.defineProperty(V2010.prototype,"signingKeys",{get:function(){return this.account.signingKeys}});Object.defineProperty(V2010.prototype,"sip",{get:function(){return this.account.sip}});Object.defineProperty(V2010.prototype,"shortCodes",{get:function(){return this.account.shortCodes}});Object.defineProperty(V2010.prototype,"tokens",{get:function(){return this.account.tokens}});Object.defineProperty(V2010.prototype,"transcriptions",{get:function(){return this.account.transcriptions}});Object.defineProperty(V2010.prototype,"usage",{get:function(){return this.account.usage}});Object.defineProperty(V2010.prototype,"validationRequests",{get:function(){return this.account.validationRequests}});t.exports=V2010},72241:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(79442).AddressList;var c=i(49982).ApplicationList;var a=i(30361).AuthorizedConnectAppList;var u=i(8883).AvailablePhoneNumberCountryList;var h=i(54086).BalanceList;var f=i(1606).CallList;var p=i(41322).ConferenceList;var d=i(48104).ConnectAppList;var l=i(73350).IncomingPhoneNumberList;var v=i(36378).KeyList;var m=i(76433).MessageList;var _=i(52411).NewKeyList;var g=i(63159).NewSigningKeyList;var y=i(47066).NotificationList;var S=i(34642).OutgoingCallerIdList;var b=i(60938);var w=i(95601).QueueList;var L=i(28672).RecordingList;var I=i(72435).ShortCodeList;var O=i(40489).SigningKeyList;var N=i(93613).SipList;var x=i(87639).TokenList;var C=i(84673).TranscriptionList;var P=i(22812).UsageList;var k=i(86218).ValidationRequestList;var F=i(80513);var T=i(72142);var J;var E;var j;var U;J=function AccountList(t){function AccountListInstance(t){return AccountListInstance.get(t)}AccountListInstance._version=t;AccountListInstance._solution={};AccountListInstance._uri=`/Accounts.json`;AccountListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=T.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new j(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AccountListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AccountListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AccountListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=T.of({FriendlyName:o.get(t,"friendlyName"),Status:o.get(t,"status"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new E(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AccountListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new E(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AccountListInstance.get=function get(t){return new U(this._version,t)};AccountListInstance.toJSON=function toJSON(){return this._solution};AccountListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AccountListInstance};E=function AccountPage(t,e,i){this._solution=i;b.prototype.constructor.call(this,t,e,this._solution)};o.extend(E.prototype,b.prototype);E.prototype.constructor=E;E.prototype.getInstance=function getInstance(t){return new j(this._version,t)};E.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};E.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};j=function AccountInstance(t,e,i){this._version=t;this.authToken=e.auth_token;this.dateCreated=F.rfc2822DateTime(e.date_created);this.dateUpdated=F.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.ownerAccountSid=e.owner_account_sid;this.sid=e.sid;this.status=e.status;this.subresourceUris=e.subresource_uris;this.type=e.type;this.uri=e.uri;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(j.prototype,"_proxy",{get:function(){if(!this._context){this._context=new U(this._version,this._solution.sid)}return this._context}});j.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};j.prototype.update=function update(t,e){return this._proxy.update(t,e)};j.prototype.addresses=function addresses(){return this._proxy.addresses};j.prototype.applications=function applications(){return this._proxy.applications};j.prototype.authorizedConnectApps=function authorizedConnectApps(){return this._proxy.authorizedConnectApps};j.prototype.availablePhoneNumbers=function availablePhoneNumbers(){return this._proxy.availablePhoneNumbers};j.prototype.balance=function balance(){return this._proxy.balance};j.prototype.calls=function calls(){return this._proxy.calls};j.prototype.conferences=function conferences(){return this._proxy.conferences};j.prototype.connectApps=function connectApps(){return this._proxy.connectApps};j.prototype.incomingPhoneNumbers=function incomingPhoneNumbers(){return this._proxy.incomingPhoneNumbers};j.prototype.keys=function keys(){return this._proxy.keys};j.prototype.messages=function messages(){return this._proxy.messages};j.prototype.newKeys=function newKeys(){return this._proxy.newKeys};j.prototype.newSigningKeys=function newSigningKeys(){return this._proxy.newSigningKeys};j.prototype.notifications=function notifications(){return this._proxy.notifications};j.prototype.outgoingCallerIds=function outgoingCallerIds(){return this._proxy.outgoingCallerIds};j.prototype.queues=function queues(){return this._proxy.queues};j.prototype.recordings=function recordings(){return this._proxy.recordings};j.prototype.signingKeys=function signingKeys(){return this._proxy.signingKeys};j.prototype.sip=function sip(){return this._proxy.sip};j.prototype.shortCodes=function shortCodes(){return this._proxy.shortCodes};j.prototype.tokens=function tokens(){return this._proxy.tokens};j.prototype.transcriptions=function transcriptions(){return this._proxy.transcriptions};j.prototype.usage=function usage(){return this._proxy.usage};j.prototype.validationRequests=function validationRequests(){return this._proxy.validationRequests};j.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};j.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};U=function AccountContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Accounts/${e}.json`;this._addresses=undefined;this._applications=undefined;this._authorizedConnectApps=undefined;this._availablePhoneNumbers=undefined;this._balance=undefined;this._calls=undefined;this._conferences=undefined;this._connectApps=undefined;this._incomingPhoneNumbers=undefined;this._keys=undefined;this._messages=undefined;this._newKeys=undefined;this._newSigningKeys=undefined;this._notifications=undefined;this._outgoingCallerIds=undefined;this._queues=undefined;this._recordings=undefined;this._signingKeys=undefined;this._sip=undefined;this._shortCodes=undefined;this._tokens=undefined;this._transcriptions=undefined;this._usage=undefined;this._validationRequests=undefined};U.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new j(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};U.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=T.of({FriendlyName:o.get(t,"friendlyName"),Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new j(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(U.prototype,"addresses",{get:function(){if(!this._addresses){this._addresses=new r(this._version,this._solution.sid)}return this._addresses}});Object.defineProperty(U.prototype,"applications",{get:function(){if(!this._applications){this._applications=new c(this._version,this._solution.sid)}return this._applications}});Object.defineProperty(U.prototype,"authorizedConnectApps",{get:function(){if(!this._authorizedConnectApps){this._authorizedConnectApps=new a(this._version,this._solution.sid)}return this._authorizedConnectApps}});Object.defineProperty(U.prototype,"availablePhoneNumbers",{get:function(){if(!this._availablePhoneNumbers){this._availablePhoneNumbers=new u(this._version,this._solution.sid)}return this._availablePhoneNumbers}});Object.defineProperty(U.prototype,"balance",{get:function(){if(!this._balance){this._balance=new h(this._version,this._solution.sid)}return this._balance}});Object.defineProperty(U.prototype,"calls",{get:function(){if(!this._calls){this._calls=new f(this._version,this._solution.sid)}return this._calls}});Object.defineProperty(U.prototype,"conferences",{get:function(){if(!this._conferences){this._conferences=new p(this._version,this._solution.sid)}return this._conferences}});Object.defineProperty(U.prototype,"connectApps",{get:function(){if(!this._connectApps){this._connectApps=new d(this._version,this._solution.sid)}return this._connectApps}});Object.defineProperty(U.prototype,"incomingPhoneNumbers",{get:function(){if(!this._incomingPhoneNumbers){this._incomingPhoneNumbers=new l(this._version,this._solution.sid)}return this._incomingPhoneNumbers}});Object.defineProperty(U.prototype,"keys",{get:function(){if(!this._keys){this._keys=new v(this._version,this._solution.sid)}return this._keys}});Object.defineProperty(U.prototype,"messages",{get:function(){if(!this._messages){this._messages=new m(this._version,this._solution.sid)}return this._messages}});Object.defineProperty(U.prototype,"newKeys",{get:function(){if(!this._newKeys){this._newKeys=new _(this._version,this._solution.sid)}return this._newKeys}});Object.defineProperty(U.prototype,"newSigningKeys",{get:function(){if(!this._newSigningKeys){this._newSigningKeys=new g(this._version,this._solution.sid)}return this._newSigningKeys}});Object.defineProperty(U.prototype,"notifications",{get:function(){if(!this._notifications){this._notifications=new y(this._version,this._solution.sid)}return this._notifications}});Object.defineProperty(U.prototype,"outgoingCallerIds",{get:function(){if(!this._outgoingCallerIds){this._outgoingCallerIds=new S(this._version,this._solution.sid)}return this._outgoingCallerIds}});Object.defineProperty(U.prototype,"queues",{get:function(){if(!this._queues){this._queues=new w(this._version,this._solution.sid)}return this._queues}});Object.defineProperty(U.prototype,"recordings",{get:function(){if(!this._recordings){this._recordings=new L(this._version,this._solution.sid)}return this._recordings}});Object.defineProperty(U.prototype,"signingKeys",{get:function(){if(!this._signingKeys){this._signingKeys=new O(this._version,this._solution.sid)}return this._signingKeys}});Object.defineProperty(U.prototype,"sip",{get:function(){if(!this._sip){this._sip=new N(this._version,this._solution.sid)}return this._sip}});Object.defineProperty(U.prototype,"shortCodes",{get:function(){if(!this._shortCodes){this._shortCodes=new I(this._version,this._solution.sid)}return this._shortCodes}});Object.defineProperty(U.prototype,"tokens",{get:function(){if(!this._tokens){this._tokens=new x(this._version,this._solution.sid)}return this._tokens}});Object.defineProperty(U.prototype,"transcriptions",{get:function(){if(!this._transcriptions){this._transcriptions=new C(this._version,this._solution.sid)}return this._transcriptions}});Object.defineProperty(U.prototype,"usage",{get:function(){if(!this._usage){this._usage=new P(this._version,this._solution.sid)}return this._usage}});Object.defineProperty(U.prototype,"validationRequests",{get:function(){if(!this._validationRequests){this._validationRequests=new k(this._version,this._solution.sid)}return this._validationRequests}});U.prototype.toJSON=function toJSON(){return this._solution};U.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AccountList:J,AccountPage:E,AccountInstance:j,AccountContext:U}},79442:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(42385).DependentPhoneNumberList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function AddressList(t,e){function AddressListInstance(t){return AddressListInstance.get(t)}AddressListInstance._version=t;AddressListInstance._solution={accountSid:e};AddressListInstance._uri=`/Accounts/${e}/Addresses.json`;AddressListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.customerName)){throw new Error('Required parameter "opts.customerName" missing.')}if(o.isUndefined(t.street)){throw new Error('Required parameter "opts.street" missing.')}if(o.isUndefined(t.city)){throw new Error('Required parameter "opts.city" missing.')}if(o.isUndefined(t.region)){throw new Error('Required parameter "opts.region" missing.')}if(o.isUndefined(t.postalCode)){throw new Error('Required parameter "opts.postalCode" missing.')}if(o.isUndefined(t.isoCountry)){throw new Error('Required parameter "opts.isoCountry" missing.')}var i=n.defer();var s=h.of({CustomerName:o.get(t,"customerName"),Street:o.get(t,"street"),City:o.get(t,"city"),Region:o.get(t,"region"),PostalCode:o.get(t,"postalCode"),IsoCountry:o.get(t,"isoCountry"),FriendlyName:o.get(t,"friendlyName"),EmergencyEnabled:u.bool(o.get(t,"emergencyEnabled")),AutoCorrectAddress:u.bool(o.get(t,"autoCorrectAddress"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AddressListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AddressListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AddressListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({CustomerName:o.get(t,"customerName"),FriendlyName:o.get(t,"friendlyName"),IsoCountry:o.get(t,"isoCountry"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AddressListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AddressListInstance.get=function get(t){return new l(this._version,this._solution.accountSid,t)};AddressListInstance.toJSON=function toJSON(){return this._solution};AddressListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AddressListInstance};p=function AddressPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.accountSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AddressInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.city=e.city;this.customerName=e.customer_name;this.dateCreated=a.rfc2822DateTime(e.date_created);this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.isoCountry=e.iso_country;this.postalCode=e.postal_code;this.region=e.region;this.sid=e.sid;this.street=e.street;this.uri=e.uri;this.emergencyEnabled=e.emergency_enabled;this.validated=e.validated;this.verified=e.verified;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.dependentPhoneNumbers=function dependentPhoneNumbers(){return this._proxy.dependentPhoneNumbers};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function AddressContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Addresses/${i}.json`;this._dependentPhoneNumbers=undefined};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({FriendlyName:o.get(t,"friendlyName"),CustomerName:o.get(t,"customerName"),Street:o.get(t,"street"),City:o.get(t,"city"),Region:o.get(t,"region"),PostalCode:o.get(t,"postalCode"),EmergencyEnabled:u.bool(o.get(t,"emergencyEnabled")),AutoCorrectAddress:u.bool(o.get(t,"autoCorrectAddress"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"dependentPhoneNumbers",{get:function(){if(!this._dependentPhoneNumbers){this._dependentPhoneNumbers=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._dependentPhoneNumbers}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AddressList:f,AddressPage:p,AddressInstance:d,AddressContext:l}},42385:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function DependentPhoneNumberList(t,e,i){function DependentPhoneNumberListInstance(t){return DependentPhoneNumberListInstance.get(t)}DependentPhoneNumberListInstance._version=t;DependentPhoneNumberListInstance._solution={accountSid:e,addressSid:i};DependentPhoneNumberListInstance._uri=`/Accounts/${e}/Addresses/${i}/DependentPhoneNumbers.json`;DependentPhoneNumberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DependentPhoneNumberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DependentPhoneNumberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DependentPhoneNumberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DependentPhoneNumberListInstance.toJSON=function toJSON(){return this._solution};DependentPhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DependentPhoneNumberListInstance};h=function DependentPhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.addressSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DependentPhoneNumberInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.voiceUrl=e.voice_url;this.voiceMethod=e.voice_method;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.addressRequirements=e.address_requirements;this.capabilities=e.capabilities;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.apiVersion=e.api_version;this.smsApplicationSid=e.sms_application_sid;this.voiceApplicationSid=e.voice_application_sid;this.trunkSid=e.trunk_sid;this.emergencyStatus=e.emergency_status;this.emergencyAddressSid=e.emergency_address_sid;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,addressSid:n}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DependentPhoneNumberList:u,DependentPhoneNumberPage:h,DependentPhoneNumberInstance:f}},49982:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ApplicationList(t,e){function ApplicationListInstance(t){return ApplicationListInstance.get(t)}ApplicationListInstance._version=t;ApplicationListInstance._solution={accountSid:e};ApplicationListInstance._uri=`/Accounts/${e}/Applications.json`;ApplicationListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ApiVersion:o.get(t,"apiVersion"),VoiceUrl:o.get(t,"voiceUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceCallerIdLookup:a.bool(o.get(t,"voiceCallerIdLookup")),SmsUrl:o.get(t,"smsUrl"),SmsMethod:o.get(t,"smsMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsStatusCallback:o.get(t,"smsStatusCallback"),MessageStatusCallback:o.get(t,"messageStatusCallback"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ApplicationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ApplicationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ApplicationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ApplicationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ApplicationListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};ApplicationListInstance.toJSON=function toJSON(){return this._solution};ApplicationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ApplicationListInstance};f=function ApplicationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ApplicationInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.messageStatusCallback=e.message_status_callback;this.sid=e.sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsStatusCallback=e.sms_status_callback;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.uri=e.uri;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ApplicationContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Applications/${i}.json`};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),ApiVersion:o.get(t,"apiVersion"),VoiceUrl:o.get(t,"voiceUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceCallerIdLookup:a.bool(o.get(t,"voiceCallerIdLookup")),SmsUrl:o.get(t,"smsUrl"),SmsMethod:o.get(t,"smsMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsStatusCallback:o.get(t,"smsStatusCallback"),MessageStatusCallback:o.get(t,"messageStatusCallback")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ApplicationList:h,ApplicationPage:f,ApplicationInstance:p,ApplicationContext:d}},30361:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AuthorizedConnectAppList(t,e){function AuthorizedConnectAppListInstance(t){return AuthorizedConnectAppListInstance.get(t)}AuthorizedConnectAppListInstance._version=t;AuthorizedConnectAppListInstance._solution={accountSid:e};AuthorizedConnectAppListInstance._uri=`/Accounts/${e}/AuthorizedConnectApps.json`;AuthorizedConnectAppListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AuthorizedConnectAppListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AuthorizedConnectAppListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthorizedConnectAppListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthorizedConnectAppListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};AuthorizedConnectAppListInstance.toJSON=function toJSON(){return this._solution};AuthorizedConnectAppListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthorizedConnectAppListInstance};h=function AuthorizedConnectAppPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AuthorizedConnectAppInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.connectAppCompanyName=e.connect_app_company_name;this.connectAppDescription=e.connect_app_description;this.connectAppFriendlyName=e.connect_app_friendly_name;this.connectAppHomepageUrl=e.connect_app_homepage_url;this.connectAppSid=e.connect_app_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.permissions=e.permissions;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,connectAppSid:n||this.connectAppSid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.connectAppSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AuthorizedConnectAppContext(t,e,i){this._version=t;this._solution={accountSid:e,connectAppSid:i};this._uri=`/Accounts/${e}/AuthorizedConnectApps/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.connectAppSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthorizedConnectAppList:u,AuthorizedConnectAppPage:h,AuthorizedConnectAppInstance:f,AuthorizedConnectAppContext:p}},8883:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(16077).LocalList;var c=i(90884).MachineToMachineList;var a=i(5309).MobileList;var u=i(49122).NationalList;var h=i(60938);var f=i(4772).SharedCostList;var p=i(66499).TollFreeList;var d=i(29353).VoipList;var l=i(72142);var v;var m;var _;var g;v=function AvailablePhoneNumberCountryList(t,e){function AvailablePhoneNumberCountryListInstance(t){return AvailablePhoneNumberCountryListInstance.get(t)}AvailablePhoneNumberCountryListInstance._version=t;AvailablePhoneNumberCountryListInstance._solution={accountSid:e};AvailablePhoneNumberCountryListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers.json`;AvailablePhoneNumberCountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AvailablePhoneNumberCountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AvailablePhoneNumberCountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=l.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailablePhoneNumberCountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new m(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailablePhoneNumberCountryListInstance.get=function get(t){return new g(this._version,this._solution.accountSid,t)};AvailablePhoneNumberCountryListInstance.toJSON=function toJSON(){return this._solution};AvailablePhoneNumberCountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AvailablePhoneNumberCountryListInstance};m=function AvailablePhoneNumberCountryPage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(m.prototype,h.prototype);m.prototype.constructor=m;m.prototype.getInstance=function getInstance(t){return new _(this._version,t,this._solution.accountSid)};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function AvailablePhoneNumberCountryInstance(t,e,i,n){this._version=t;this.countryCode=e.country_code;this.country=e.country;this.uri=e.uri;this.beta=e.beta;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,countryCode:n||this.countryCode}};Object.defineProperty(_.prototype,"_proxy",{get:function(){if(!this._context){this._context=new g(this._version,this._solution.accountSid,this._solution.countryCode)}return this._context}});_.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};_.prototype.local=function local(){return this._proxy.local};_.prototype.tollFree=function tollFree(){return this._proxy.tollFree};_.prototype.mobile=function mobile(){return this._proxy.mobile};_.prototype.national=function national(){return this._proxy.national};_.prototype.voip=function voip(){return this._proxy.voip};_.prototype.sharedCost=function sharedCost(){return this._proxy.sharedCost};_.prototype.machineToMachine=function machineToMachine(){return this._proxy.machineToMachine};_.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};g=function AvailablePhoneNumberCountryContext(t,e,i){this._version=t;this._solution={accountSid:e,countryCode:i};this._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}.json`;this._local=undefined;this._tollFree=undefined;this._mobile=undefined;this._national=undefined;this._voip=undefined;this._sharedCost=undefined;this._machineToMachine=undefined};g.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new _(this._version,t,this._solution.accountSid,this._solution.countryCode))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(g.prototype,"local",{get:function(){if(!this._local){this._local=new r(this._version,this._solution.accountSid,this._solution.countryCode)}return this._local}});Object.defineProperty(g.prototype,"tollFree",{get:function(){if(!this._tollFree){this._tollFree=new p(this._version,this._solution.accountSid,this._solution.countryCode)}return this._tollFree}});Object.defineProperty(g.prototype,"mobile",{get:function(){if(!this._mobile){this._mobile=new a(this._version,this._solution.accountSid,this._solution.countryCode)}return this._mobile}});Object.defineProperty(g.prototype,"national",{get:function(){if(!this._national){this._national=new u(this._version,this._solution.accountSid,this._solution.countryCode)}return this._national}});Object.defineProperty(g.prototype,"voip",{get:function(){if(!this._voip){this._voip=new d(this._version,this._solution.accountSid,this._solution.countryCode)}return this._voip}});Object.defineProperty(g.prototype,"sharedCost",{get:function(){if(!this._sharedCost){this._sharedCost=new f(this._version,this._solution.accountSid,this._solution.countryCode)}return this._sharedCost}});Object.defineProperty(g.prototype,"machineToMachine",{get:function(){if(!this._machineToMachine){this._machineToMachine=new c(this._version,this._solution.accountSid,this._solution.countryCode)}return this._machineToMachine}});g.prototype.toJSON=function toJSON(){return this._solution};g.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AvailablePhoneNumberCountryList:v,AvailablePhoneNumberCountryPage:m,AvailablePhoneNumberCountryInstance:_,AvailablePhoneNumberCountryContext:g}},16077:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function LocalList(t,e,i){function LocalListInstance(t){return LocalListInstance.get(t)}LocalListInstance._version=t;LocalListInstance._solution={accountSid:e,countryCode:i};LocalListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/Local.json`;LocalListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};LocalListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};LocalListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LocalListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LocalListInstance.toJSON=function toJSON(){return this._solution};LocalListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return LocalListInstance};f=function LocalPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function LocalInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={LocalList:h,LocalPage:f,LocalInstance:p}},90884:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function MachineToMachineList(t,e,i){function MachineToMachineListInstance(t){return MachineToMachineListInstance.get(t)}MachineToMachineListInstance._version=t;MachineToMachineListInstance._solution={accountSid:e,countryCode:i};MachineToMachineListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/MachineToMachine.json`;MachineToMachineListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MachineToMachineListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MachineToMachineListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MachineToMachineListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MachineToMachineListInstance.toJSON=function toJSON(){return this._solution};MachineToMachineListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MachineToMachineListInstance};f=function MachineToMachinePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MachineToMachineInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MachineToMachineList:h,MachineToMachinePage:f,MachineToMachineInstance:p}},5309:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function MobileList(t,e,i){function MobileListInstance(t){return MobileListInstance.get(t)}MobileListInstance._version=t;MobileListInstance._solution={accountSid:e,countryCode:i};MobileListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/Mobile.json`;MobileListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MobileListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MobileListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MobileListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MobileListInstance.toJSON=function toJSON(){return this._solution};MobileListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MobileListInstance};f=function MobilePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MobileInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MobileList:h,MobilePage:f,MobileInstance:p}},49122:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function NationalList(t,e,i){function NationalListInstance(t){return NationalListInstance.get(t)}NationalListInstance._version=t;NationalListInstance._solution={accountSid:e,countryCode:i};NationalListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/National.json`;NationalListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NationalListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NationalListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NationalListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NationalListInstance.toJSON=function toJSON(){return this._solution};NationalListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NationalListInstance};f=function NationalPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function NationalInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NationalList:h,NationalPage:f,NationalInstance:p}},4772:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function SharedCostList(t,e,i){function SharedCostListInstance(t){return SharedCostListInstance.get(t)}SharedCostListInstance._version=t;SharedCostListInstance._solution={accountSid:e,countryCode:i};SharedCostListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/SharedCost.json`;SharedCostListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SharedCostListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SharedCostListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SharedCostListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SharedCostListInstance.toJSON=function toJSON(){return this._solution};SharedCostListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SharedCostListInstance};f=function SharedCostPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SharedCostInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SharedCostList:h,SharedCostPage:f,SharedCostInstance:p}},66499:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function TollFreeList(t,e,i){function TollFreeListInstance(t){return TollFreeListInstance.get(t)}TollFreeListInstance._version=t;TollFreeListInstance._solution={accountSid:e,countryCode:i};TollFreeListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/TollFree.json`;TollFreeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TollFreeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TollFreeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TollFreeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TollFreeListInstance.toJSON=function toJSON(){return this._solution};TollFreeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TollFreeListInstance};f=function TollFreePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TollFreeInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TollFreeList:h,TollFreePage:f,TollFreeInstance:p}},29353:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function VoipList(t,e,i){function VoipListInstance(t){return VoipListInstance.get(t)}VoipListInstance._version=t;VoipListInstance._solution={accountSid:e,countryCode:i};VoipListInstance._uri=`/Accounts/${e}/AvailablePhoneNumbers/${i}/Voip.json`;VoipListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};VoipListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};VoipListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AreaCode:o.get(t,"areaCode"),Contains:o.get(t,"contains"),SmsEnabled:a.bool(o.get(t,"smsEnabled")),MmsEnabled:a.bool(o.get(t,"mmsEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),ExcludeAllAddressRequired:a.bool(o.get(t,"excludeAllAddressRequired")),ExcludeLocalAddressRequired:a.bool(o.get(t,"excludeLocalAddressRequired")),ExcludeForeignAddressRequired:a.bool(o.get(t,"excludeForeignAddressRequired")),Beta:a.bool(o.get(t,"beta")),NearNumber:o.get(t,"nearNumber"),NearLatLong:o.get(t,"nearLatLong"),Distance:o.get(t,"distance"),InPostalCode:o.get(t,"inPostalCode"),InRegion:o.get(t,"inRegion"),InRateCenter:o.get(t,"inRateCenter"),InLata:o.get(t,"inLata"),InLocality:o.get(t,"inLocality"),FaxEnabled:a.bool(o.get(t,"faxEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VoipListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VoipListInstance.toJSON=function toJSON(){return this._solution};VoipListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return VoipListInstance};f=function VoipPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.countryCode)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function VoipInstance(t,e,i,n){this._version=t;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.lata=e.lata;this.locality=e.locality;this.rateCenter=e.rate_center;this.latitude=c.decimal(e.latitude);this.longitude=c.decimal(e.longitude);this.region=e.region;this.postalCode=e.postal_code;this.isoCountry=e.iso_country;this.addressRequirements=e.address_requirements;this.beta=e.beta;this.capabilities=e.capabilities;this._context=undefined;this._solution={accountSid:i,countryCode:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={VoipList:h,VoipPage:f,VoipInstance:p}},54086:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function BalanceList(t,e){function BalanceListInstance(t){return BalanceListInstance.get(t)}BalanceListInstance._version=t;BalanceListInstance._solution={accountSid:e};BalanceListInstance._uri=`/Accounts/${e}/Balance.json`;BalanceListInstance.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.accountSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};BalanceListInstance.toJSON=function toJSON(){return this._solution};BalanceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BalanceListInstance};u=function BalancePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.accountSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function BalanceInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.balance=e.balance;this.currency=e.currency;this._context=undefined;this._solution={accountSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BalanceList:a,BalancePage:u,BalanceInstance:h}},1606:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(74502).EventList;var c=i(49781).FeedbackList;var a=i(27616).FeedbackSummaryList;var u=i(62974).NotificationList;var h=i(60938);var f=i(47427).PaymentList;var p=i(40728).RecordingList;var d=i(80513);var l=i(6372);var v=i(72142);var m;var _;var g;var y;m=function CallList(t,e){function CallListInstance(t){return CallListInstance.get(t)}CallListInstance._version=t;CallListInstance._solution={accountSid:e};CallListInstance._uri=`/Accounts/${e}/Calls.json`;CallListInstance._feedbackSummaries=undefined;CallListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.from)){throw new Error('Required parameter "opts.from" missing.')}var i=n.defer();var s=v.of({To:o.get(t,"to"),From:o.get(t,"from"),Url:o.get(t,"url"),Twiml:o.get(t,"twiml"),ApplicationSid:o.get(t,"applicationSid"),Method:o.get(t,"method"),FallbackUrl:o.get(t,"fallbackUrl"),FallbackMethod:o.get(t,"fallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackEvent:l.map(o.get(t,"statusCallbackEvent"),function(t){return t}),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),SendDigits:o.get(t,"sendDigits"),Timeout:o.get(t,"timeout"),Record:l.bool(o.get(t,"record")),RecordingChannels:o.get(t,"recordingChannels"),RecordingStatusCallback:o.get(t,"recordingStatusCallback"),RecordingStatusCallbackMethod:o.get(t,"recordingStatusCallbackMethod"),SipAuthUsername:o.get(t,"sipAuthUsername"),SipAuthPassword:o.get(t,"sipAuthPassword"),MachineDetection:o.get(t,"machineDetection"),MachineDetectionTimeout:o.get(t,"machineDetectionTimeout"),RecordingStatusCallbackEvent:l.map(o.get(t,"recordingStatusCallbackEvent"),function(t){return t}),Trim:o.get(t,"trim"),CallerId:o.get(t,"callerId"),MachineDetectionSpeechThreshold:o.get(t,"machineDetectionSpeechThreshold"),MachineDetectionSpeechEndThreshold:o.get(t,"machineDetectionSpeechEndThreshold"),MachineDetectionSilenceTimeout:o.get(t,"machineDetectionSilenceTimeout"),AsyncAmd:o.get(t,"asyncAmd"),AsyncAmdStatusCallback:o.get(t,"asyncAmdStatusCallback"),AsyncAmdStatusCallbackMethod:o.get(t,"asyncAmdStatusCallbackMethod"),Byoc:o.get(t,"byoc"),CallReason:o.get(t,"callReason"),RecordingTrack:o.get(t,"recordingTrack")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new g(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CallListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CallListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CallListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=v.of({To:o.get(t,"to"),From:o.get(t,"from"),ParentCallSid:o.get(t,"parentCallSid"),Status:o.get(t,"status"),"StartTime<":l.iso8601DateTime(o.get(t,"startTimeBefore")),StartTime:l.iso8601DateTime(o.get(t,"startTime")),"StartTime>":l.iso8601DateTime(o.get(t,"startTimeAfter")),"EndTime<":l.iso8601DateTime(o.get(t,"endTimeBefore")),EndTime:l.iso8601DateTime(o.get(t,"endTime")),"EndTime>":l.iso8601DateTime(o.get(t,"endTimeAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new _(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CallListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new _(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CallListInstance.get=function get(t){return new y(this._version,this._solution.accountSid,t)};Object.defineProperty(CallListInstance,"feedbackSummaries",{get:function feedbackSummaries(){if(!this._feedbackSummaries){this._feedbackSummaries=new a(this._version,this._solution.accountSid)}return this._feedbackSummaries}});CallListInstance.toJSON=function toJSON(){return this._solution};CallListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CallListInstance};_=function CallPage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(_.prototype,h.prototype);_.prototype.constructor=_;_.prototype.getInstance=function getInstance(t){return new g(this._version,t,this._solution.accountSid)};_.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};g=function CallInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.dateCreated=d.rfc2822DateTime(e.date_created);this.dateUpdated=d.rfc2822DateTime(e.date_updated);this.parentCallSid=e.parent_call_sid;this.accountSid=e.account_sid;this.to=e.to;this.toFormatted=e.to_formatted;this.from=e.from;this.fromFormatted=e.from_formatted;this.phoneNumberSid=e.phone_number_sid;this.status=e.status;this.startTime=d.rfc2822DateTime(e.start_time);this.endTime=d.rfc2822DateTime(e.end_time);this.duration=e.duration;this.price=e.price;this.priceUnit=e.price_unit;this.direction=e.direction;this.answeredBy=e.answered_by;this.annotation=e.annotation;this.apiVersion=e.api_version;this.forwardedFrom=e.forwarded_from;this.groupSid=e.group_sid;this.callerName=e.caller_name;this.queueTime=e.queue_time;this.trunkSid=e.trunk_sid;this.uri=e.uri;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(g.prototype,"_proxy",{get:function(){if(!this._context){this._context=new y(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});g.prototype.remove=function remove(t){return this._proxy.remove(t)};g.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};g.prototype.update=function update(t,e){return this._proxy.update(t,e)};g.prototype.recordings=function recordings(){return this._proxy.recordings};g.prototype.notifications=function notifications(){return this._proxy.notifications};g.prototype.feedback=function feedback(){return this._proxy.feedback};g.prototype.events=function events(){return this._proxy.events};g.prototype.payments=function payments(){return this._proxy.payments};g.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};g.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};y=function CallContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Calls/${i}.json`;this._recordings=undefined;this._notifications=undefined;this._feedback=undefined;this._events=undefined;this._payments=undefined};y.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};y.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new g(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};y.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=v.of({Url:o.get(t,"url"),Method:o.get(t,"method"),Status:o.get(t,"status"),FallbackUrl:o.get(t,"fallbackUrl"),FallbackMethod:o.get(t,"fallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),Twiml:o.get(t,"twiml")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new g(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(y.prototype,"recordings",{get:function(){if(!this._recordings){this._recordings=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._recordings}});Object.defineProperty(y.prototype,"notifications",{get:function(){if(!this._notifications){this._notifications=new u(this._version,this._solution.accountSid,this._solution.sid)}return this._notifications}});Object.defineProperty(y.prototype,"feedback",{get:function(){if(!this._feedback){this._feedback=new c(this._version,this._solution.accountSid,this._solution.sid)}return this._feedback}});Object.defineProperty(y.prototype,"events",{get:function(){if(!this._events){this._events=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._events}});Object.defineProperty(y.prototype,"payments",{get:function(){if(!this._payments){this._payments=new f(this._version,this._solution.accountSid,this._solution.sid)}return this._payments}});y.prototype.toJSON=function toJSON(){return this._solution};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CallList:m,CallPage:_,CallInstance:g,CallContext:y}},74502:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function EventList(t,e,i){function EventListInstance(t){return EventListInstance.get(t)}EventListInstance._version=t;EventListInstance._solution={accountSid:e,callSid:i};EventListInstance._uri=`/Accounts/${e}/Calls/${i}/Events.json`;EventListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EventListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EventListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.toJSON=function toJSON(){return this._solution};EventListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EventListInstance};u=function EventPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.accountSid,this._solution.callSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function EventInstance(t,e,i,n){this._version=t;this.request=e.request;this.response=e.response;this._context=undefined;this._solution={accountSid:i,callSid:n}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EventList:a,EventPage:u,EventInstance:h}},49781:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function FeedbackList(t,e,i){function FeedbackListInstance(t){return FeedbackListInstance.get(t)}FeedbackListInstance._version=t;FeedbackListInstance._solution={accountSid:e,callSid:i};FeedbackListInstance.get=function get(){return new d(this._version,this._solution.accountSid,this._solution.callSid)};FeedbackListInstance.toJSON=function toJSON(){return this._solution};FeedbackListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FeedbackListInstance};f=function FeedbackPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.callSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FeedbackInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.issues=e.issues;this.qualityScore=c.integer(e.quality_score);this.sid=e.sid;this._context=undefined;this._solution={accountSid:i,callSid:n}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.callSid)}return this._context}});p.prototype.create=function create(t,e){return this._proxy.create(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FeedbackContext(t,e,i){this._version=t;this._solution={accountSid:e,callSid:i};this._uri=`/Accounts/${e}/Calls/${i}/Feedback.json`};d.prototype.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.qualityScore)){throw new Error('Required parameter "opts.qualityScore" missing.')}var i=n.defer();var s=u.of({QualityScore:o.get(t,"qualityScore"),Issue:a.map(o.get(t,"issue"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.qualityScore)){throw new Error('Required parameter "opts.qualityScore" missing.')}var i=n.defer();var s=u.of({QualityScore:o.get(t,"qualityScore"),Issue:a.map(o.get(t,"issue"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FeedbackList:h,FeedbackPage:f,FeedbackInstance:p,FeedbackContext:d}},27616:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function FeedbackSummaryList(t,e){function FeedbackSummaryListInstance(t){return FeedbackSummaryListInstance.get(t)}FeedbackSummaryListInstance._version=t;FeedbackSummaryListInstance._solution={accountSid:e};FeedbackSummaryListInstance._uri=`/Accounts/${e}/Calls/FeedbackSummary.json`;FeedbackSummaryListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.startDate)){throw new Error('Required parameter "opts.startDate" missing.')}if(o.isUndefined(t.endDate)){throw new Error('Required parameter "opts.endDate" missing.')}var i=n.defer();var s=u.of({StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FeedbackSummaryListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};FeedbackSummaryListInstance.toJSON=function toJSON(){return this._solution};FeedbackSummaryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FeedbackSummaryListInstance};f=function FeedbackSummaryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FeedbackSummaryInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.callCount=c.integer(e.call_count);this.callFeedbackCount=c.integer(e.call_feedback_count);this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.endDate=c.iso8601DateTime(e.end_date);this.includeSubaccounts=e.include_subaccounts;this.issues=e.issues;this.qualityScoreAverage=c.decimal(e.quality_score_average);this.qualityScoreMedian=c.decimal(e.quality_score_median);this.qualityScoreStandardDeviation=c.decimal(e.quality_score_standard_deviation);this.sid=e.sid;this.startDate=c.iso8601DateTime(e.start_date);this.status=e.status;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FeedbackSummaryContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Calls/FeedbackSummary/${i}.json`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FeedbackSummaryList:h,FeedbackSummaryPage:f,FeedbackSummaryInstance:p,FeedbackSummaryContext:d}},62974:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function NotificationList(t,e,i){function NotificationListInstance(t){return NotificationListInstance.get(t)}NotificationListInstance._version=t;NotificationListInstance._solution={accountSid:e,callSid:i};NotificationListInstance._uri=`/Accounts/${e}/Calls/${i}/Notifications.json`;NotificationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NotificationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NotificationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Log:o.get(t,"log"),"MessageDate<":a.iso8601Date(o.get(t,"messageDateBefore")),MessageDate:a.iso8601Date(o.get(t,"messageDate")),"MessageDate>":a.iso8601Date(o.get(t,"messageDateAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NotificationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NotificationListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.callSid,t)};NotificationListInstance.toJSON=function toJSON(){return this._solution};NotificationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NotificationListInstance};f=function NotificationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.callSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function NotificationInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callSid=e.call_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.errorCode=e.error_code;this.log=e.log;this.messageDate=c.rfc2822DateTime(e.message_date);this.messageText=e.message_text;this.moreInfo=e.more_info;this.requestMethod=e.request_method;this.requestUrl=e.request_url;this.requestVariables=e.request_variables;this.responseBody=e.response_body;this.responseHeaders=e.response_headers;this.sid=e.sid;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,callSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.callSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function NotificationContext(t,e,i,n){this._version=t;this._solution={accountSid:e,callSid:i,sid:n};this._uri=`/Accounts/${e}/Calls/${i}/Notifications/${n}.json`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NotificationList:h,NotificationPage:f,NotificationInstance:p,NotificationContext:d}},47427:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function PaymentList(t,e,i){function PaymentListInstance(t){return PaymentListInstance.get(t)}PaymentListInstance._version=t;PaymentListInstance._solution={accountSid:e,callSid:i};PaymentListInstance._uri=`/Accounts/${e}/Calls/${i}/Payments.json`;PaymentListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.idempotencyKey)){throw new Error('Required parameter "opts.idempotencyKey" missing.')}if(o.isUndefined(t.statusCallback)){throw new Error('Required parameter "opts.statusCallback" missing.')}var i=n.defer();var s=u.of({IdempotencyKey:o.get(t,"idempotencyKey"),StatusCallback:o.get(t,"statusCallback"),BankAccountType:o.get(t,"bankAccountType"),ChargeAmount:o.get(t,"chargeAmount"),Currency:o.get(t,"currency"),Description:o.get(t,"description"),Input:o.get(t,"input"),MinPostalCodeLength:o.get(t,"minPostalCodeLength"),Parameter:a.object(o.get(t,"parameter")),PaymentConnector:o.get(t,"paymentConnector"),PaymentMethod:o.get(t,"paymentMethod"),PostalCode:a.bool(o.get(t,"postalCode")),SecurityCode:a.bool(o.get(t,"securityCode")),Timeout:o.get(t,"timeout"),TokenType:o.get(t,"tokenType"),ValidCardTypes:o.get(t,"validCardTypes")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PaymentListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.callSid,t)};PaymentListInstance.toJSON=function toJSON(){return this._solution};PaymentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PaymentListInstance};f=function PaymentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.callSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PaymentInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.callSid=e.call_sid;this.sid=e.sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,callSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.callSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function PaymentContext(t,e,i,n){this._version=t;this._solution={accountSid:e,callSid:i,sid:n};this._uri=`/Accounts/${e}/Calls/${i}/Payments/${n}.json`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.idempotencyKey)){throw new Error('Required parameter "opts.idempotencyKey" missing.')}if(o.isUndefined(t.statusCallback)){throw new Error('Required parameter "opts.statusCallback" missing.')}var i=n.defer();var s=u.of({IdempotencyKey:o.get(t,"idempotencyKey"),StatusCallback:o.get(t,"statusCallback"),Capture:o.get(t,"capture"),Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PaymentList:h,PaymentPage:f,PaymentInstance:p,PaymentContext:d}},40728:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RecordingList(t,e,i){function RecordingListInstance(t){return RecordingListInstance.get(t)}RecordingListInstance._version=t;RecordingListInstance._solution={accountSid:e,callSid:i};RecordingListInstance._uri=`/Accounts/${e}/Calls/${i}/Recordings.json`;RecordingListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RecordingStatusCallbackEvent:a.map(o.get(t,"recordingStatusCallbackEvent"),function(t){return t}),RecordingStatusCallback:o.get(t,"recordingStatusCallback"),RecordingStatusCallbackMethod:o.get(t,"recordingStatusCallbackMethod"),Trim:o.get(t,"trim"),RecordingChannels:o.get(t,"recordingChannels"),RecordingTrack:o.get(t,"recordingTrack")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RecordingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RecordingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"DateCreated<":a.iso8601Date(o.get(t,"dateCreatedBefore")),DateCreated:a.iso8601Date(o.get(t,"dateCreated")),"DateCreated>":a.iso8601Date(o.get(t,"dateCreatedAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.callSid,t)};RecordingListInstance.toJSON=function toJSON(){return this._solution};RecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingListInstance};f=function RecordingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.callSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RecordingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callSid=e.call_sid;this.conferenceSid=e.conference_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.startTime=c.rfc2822DateTime(e.start_time);this.duration=e.duration;this.sid=e.sid;this.price=c.decimal(e.price);this.uri=e.uri;this.encryptionDetails=e.encryption_details;this.priceUnit=e.price_unit;this.status=e.status;this.channels=c.integer(e.channels);this.source=e.source;this.errorCode=c.integer(e.error_code);this.track=e.track;this._context=undefined;this._solution={accountSid:i,callSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.callSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RecordingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,callSid:i,sid:n};this._uri=`/Accounts/${e}/Calls/${i}/Recordings/${n}.json`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=u.of({Status:o.get(t,"status"),PauseBehavior:o.get(t,"pauseBehavior")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.callSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingList:h,RecordingPage:f,RecordingInstance:p,RecordingContext:d}},41322:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(99793).ParticipantList;var a=i(53471).RecordingList;var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function ConferenceList(t,e){function ConferenceListInstance(t){return ConferenceListInstance.get(t)}ConferenceListInstance._version=t;ConferenceListInstance._solution={accountSid:e};ConferenceListInstance._uri=`/Accounts/${e}/Conferences.json`;ConferenceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConferenceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConferenceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({"DateCreated<":h.iso8601Date(o.get(t,"dateCreatedBefore")),DateCreated:h.iso8601Date(o.get(t,"dateCreated")),"DateCreated>":h.iso8601Date(o.get(t,"dateCreatedAfter")),"DateUpdated<":h.iso8601Date(o.get(t,"dateUpdatedBefore")),DateUpdated:h.iso8601Date(o.get(t,"dateUpdated")),"DateUpdated>":h.iso8601Date(o.get(t,"dateUpdatedAfter")),FriendlyName:o.get(t,"friendlyName"),Status:o.get(t,"status"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConferenceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConferenceListInstance.get=function get(t){return new v(this._version,this._solution.accountSid,t)};ConferenceListInstance.toJSON=function toJSON(){return this._solution};ConferenceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConferenceListInstance};d=function ConferencePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,r.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.accountSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ConferenceInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=u.rfc2822DateTime(e.date_created);this.dateUpdated=u.rfc2822DateTime(e.date_updated);this.apiVersion=e.api_version;this.friendlyName=e.friendly_name;this.region=e.region;this.sid=e.sid;this.status=e.status;this.uri=e.uri;this.subresourceUris=e.subresource_uris;this.reasonConferenceEnded=e.reason_conference_ended;this.callSidEndingConference=e.call_sid_ending_conference;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.participants=function participants(){return this._proxy.participants};l.prototype.recordings=function recordings(){return this._proxy.recordings};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ConferenceContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Conferences/${i}.json`;this._participants=undefined;this._recordings=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({Status:o.get(t,"status"),AnnounceUrl:o.get(t,"announceUrl"),AnnounceMethod:o.get(t,"announceMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"participants",{get:function(){if(!this._participants){this._participants=new c(this._version,this._solution.accountSid,this._solution.sid)}return this._participants}});Object.defineProperty(v.prototype,"recordings",{get:function(){if(!this._recordings){this._recordings=new a(this._version,this._solution.accountSid,this._solution.sid)}return this._recordings}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConferenceList:p,ConferencePage:d,ConferenceInstance:l,ConferenceContext:v}},99793:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ParticipantList(t,e,i){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={accountSid:e,conferenceSid:i};ParticipantListInstance._uri=`/Accounts/${e}/Conferences/${i}/Participants.json`;ParticipantListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.from)){throw new Error('Required parameter "opts.from" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}var i=n.defer();var s=u.of({From:o.get(t,"from"),To:o.get(t,"to"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),StatusCallbackEvent:a.map(o.get(t,"statusCallbackEvent"),function(t){return t}),Label:o.get(t,"label"),Timeout:o.get(t,"timeout"),Record:a.bool(o.get(t,"record")),Muted:a.bool(o.get(t,"muted")),Beep:o.get(t,"beep"),StartConferenceOnEnter:a.bool(o.get(t,"startConferenceOnEnter")),EndConferenceOnExit:a.bool(o.get(t,"endConferenceOnExit")),WaitUrl:o.get(t,"waitUrl"),WaitMethod:o.get(t,"waitMethod"),EarlyMedia:a.bool(o.get(t,"earlyMedia")),MaxParticipants:o.get(t,"maxParticipants"),ConferenceRecord:o.get(t,"conferenceRecord"),ConferenceTrim:o.get(t,"conferenceTrim"),ConferenceStatusCallback:o.get(t,"conferenceStatusCallback"),ConferenceStatusCallbackMethod:o.get(t,"conferenceStatusCallbackMethod"),ConferenceStatusCallbackEvent:a.map(o.get(t,"conferenceStatusCallbackEvent"),function(t){return t}),RecordingChannels:o.get(t,"recordingChannels"),RecordingStatusCallback:o.get(t,"recordingStatusCallback"),RecordingStatusCallbackMethod:o.get(t,"recordingStatusCallbackMethod"),SipAuthUsername:o.get(t,"sipAuthUsername"),SipAuthPassword:o.get(t,"sipAuthPassword"),Region:o.get(t,"region"),ConferenceRecordingStatusCallback:o.get(t,"conferenceRecordingStatusCallback"),ConferenceRecordingStatusCallbackMethod:o.get(t,"conferenceRecordingStatusCallbackMethod"),RecordingStatusCallbackEvent:a.map(o.get(t,"recordingStatusCallbackEvent"),function(t){return t}),ConferenceRecordingStatusCallbackEvent:a.map(o.get(t,"conferenceRecordingStatusCallbackEvent"),function(t){return t}),Coaching:a.bool(o.get(t,"coaching")),CallSidToCoach:o.get(t,"callSidToCoach"),JitterBufferSize:o.get(t,"jitterBufferSize"),Byoc:o.get(t,"byoc"),CallerId:o.get(t,"callerId"),CallReason:o.get(t,"callReason"),RecordingTrack:o.get(t,"recordingTrack")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Muted:a.bool(o.get(t,"muted")),Hold:a.bool(o.get(t,"hold")),Coaching:a.bool(o.get(t,"coaching")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.conferenceSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};f=function ParticipantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ParticipantInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.callSid=e.call_sid;this.label=e.label;this.callSidToCoach=e.call_sid_to_coach;this.coaching=e.coaching;this.conferenceSid=e.conference_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.endConferenceOnExit=e.end_conference_on_exit;this.muted=e.muted;this.hold=e.hold;this.startConferenceOnEnter=e.start_conference_on_enter;this.status=e.status;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,conferenceSid:n,callSid:o||this.callSid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.conferenceSid,this._solution.callSid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ParticipantContext(t,e,i,n){this._version=t;this._solution={accountSid:e,conferenceSid:i,callSid:n};this._uri=`/Accounts/${e}/Conferences/${i}/Participants/${n}.json`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid,this._solution.callSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Muted:a.bool(o.get(t,"muted")),Hold:a.bool(o.get(t,"hold")),HoldUrl:o.get(t,"holdUrl"),HoldMethod:o.get(t,"holdMethod"),AnnounceUrl:o.get(t,"announceUrl"),AnnounceMethod:o.get(t,"announceMethod"),WaitUrl:o.get(t,"waitUrl"),WaitMethod:o.get(t,"waitMethod"),BeepOnExit:a.bool(o.get(t,"beepOnExit")),EndConferenceOnExit:a.bool(o.get(t,"endConferenceOnExit")),Coaching:a.bool(o.get(t,"coaching")),CallSidToCoach:o.get(t,"callSidToCoach")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:h,ParticipantPage:f,ParticipantInstance:p,ParticipantContext:d}},53471:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RecordingList(t,e,i){function RecordingListInstance(t){return RecordingListInstance.get(t)}RecordingListInstance._version=t;RecordingListInstance._solution={accountSid:e,conferenceSid:i};RecordingListInstance._uri=`/Accounts/${e}/Conferences/${i}/Recordings.json`;RecordingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RecordingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RecordingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"DateCreated<":a.iso8601Date(o.get(t,"dateCreatedBefore")),DateCreated:a.iso8601Date(o.get(t,"dateCreated")),"DateCreated>":a.iso8601Date(o.get(t,"dateCreatedAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.conferenceSid,t)};RecordingListInstance.toJSON=function toJSON(){return this._solution};RecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingListInstance};f=function RecordingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RecordingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callSid=e.call_sid;this.conferenceSid=e.conference_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.startTime=c.rfc2822DateTime(e.start_time);this.duration=e.duration;this.sid=e.sid;this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.status=e.status;this.channels=c.integer(e.channels);this.source=e.source;this.errorCode=c.integer(e.error_code);this.encryptionDetails=e.encryption_details;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,conferenceSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.conferenceSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RecordingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,conferenceSid:i,sid:n};this._uri=`/Accounts/${e}/Conferences/${i}/Recordings/${n}.json`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=u.of({Status:o.get(t,"status"),PauseBehavior:o.get(t,"pauseBehavior")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.conferenceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingList:h,RecordingPage:f,RecordingInstance:p,RecordingContext:d}},48104:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function ConnectAppList(t,e){function ConnectAppListInstance(t){return ConnectAppListInstance.get(t)}ConnectAppListInstance._version=t;ConnectAppListInstance._solution={accountSid:e};ConnectAppListInstance._uri=`/Accounts/${e}/ConnectApps.json`;ConnectAppListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConnectAppListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConnectAppListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectAppListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectAppListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};ConnectAppListInstance.toJSON=function toJSON(){return this._solution};ConnectAppListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConnectAppListInstance};h=function ConnectAppPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ConnectAppInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.authorizeRedirectUrl=e.authorize_redirect_url;this.companyName=e.company_name;this.deauthorizeCallbackMethod=e.deauthorize_callback_method;this.deauthorizeCallbackUrl=e.deauthorize_callback_url;this.description=e.description;this.friendlyName=e.friendly_name;this.homepageUrl=e.homepage_url;this.permissions=e.permissions;this.sid=e.sid;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConnectAppContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/ConnectApps/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({AuthorizeRedirectUrl:o.get(t,"authorizeRedirectUrl"),CompanyName:o.get(t,"companyName"),DeauthorizeCallbackMethod:o.get(t,"deauthorizeCallbackMethod"),DeauthorizeCallbackUrl:o.get(t,"deauthorizeCallbackUrl"),Description:o.get(t,"description"),FriendlyName:o.get(t,"friendlyName"),HomepageUrl:o.get(t,"homepageUrl"),Permissions:c.map(o.get(t,"permissions"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConnectAppList:u,ConnectAppPage:h,ConnectAppInstance:f,ConnectAppContext:p}},73350:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(83805).AssignedAddOnList;var c=i(42867).LocalList;var a=i(6179).MobileList;var u=i(60938);var h=i(8039).TollFreeList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function IncomingPhoneNumberList(t,e){function IncomingPhoneNumberListInstance(t){return IncomingPhoneNumberListInstance.get(t)}IncomingPhoneNumberListInstance._version=t;IncomingPhoneNumberListInstance._solution={accountSid:e};IncomingPhoneNumberListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers.json`;IncomingPhoneNumberListInstance._local=undefined;IncomingPhoneNumberListInstance._mobile=undefined;IncomingPhoneNumberListInstance._tollFree=undefined;IncomingPhoneNumberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IncomingPhoneNumberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IncomingPhoneNumberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({Beta:p.bool(o.get(t,"beta")),FriendlyName:o.get(t,"friendlyName"),PhoneNumber:o.get(t,"phoneNumber"),Origin:o.get(t,"origin"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IncomingPhoneNumberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IncomingPhoneNumberListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PhoneNumber:o.get(t,"phoneNumber"),AreaCode:o.get(t,"areaCode"),ApiVersion:o.get(t,"apiVersion"),FriendlyName:o.get(t,"friendlyName"),SmsApplicationSid:o.get(t,"smsApplicationSid"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceApplicationSid:o.get(t,"voiceApplicationSid"),VoiceCallerIdLookup:p.bool(o.get(t,"voiceCallerIdLookup")),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),EmergencyStatus:o.get(t,"emergencyStatus"),EmergencyAddressSid:o.get(t,"emergencyAddressSid"),TrunkSid:o.get(t,"trunkSid"),IdentitySid:o.get(t,"identitySid"),AddressSid:o.get(t,"addressSid"),VoiceReceiveMode:o.get(t,"voiceReceiveMode"),BundleSid:o.get(t,"bundleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IncomingPhoneNumberListInstance.get=function get(t){return new _(this._version,this._solution.accountSid,t)};Object.defineProperty(IncomingPhoneNumberListInstance,"local",{get:function local(){if(!this._local){this._local=new c(this._version,this._solution.accountSid)}return this._local}});Object.defineProperty(IncomingPhoneNumberListInstance,"mobile",{get:function mobile(){if(!this._mobile){this._mobile=new a(this._version,this._solution.accountSid)}return this._mobile}});Object.defineProperty(IncomingPhoneNumberListInstance,"tollFree",{get:function tollFree(){if(!this._tollFree){this._tollFree=new h(this._version,this._solution.accountSid)}return this._tollFree}});IncomingPhoneNumberListInstance.toJSON=function toJSON(){return this._solution};IncomingPhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IncomingPhoneNumberListInstance};v=function IncomingPhoneNumberPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,u.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t,this._solution.accountSid)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function IncomingPhoneNumberInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.addressSid=e.address_sid;this.addressRequirements=e.address_requirements;this.apiVersion=e.api_version;this.beta=e.beta;this.capabilities=e.capabilities;this.dateCreated=f.rfc2822DateTime(e.date_created);this.dateUpdated=f.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.identitySid=e.identity_sid;this.phoneNumber=e.phone_number;this.origin=e.origin;this.sid=e.sid;this.smsApplicationSid=e.sms_application_sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.trunkSid=e.trunk_sid;this.uri=e.uri;this.voiceReceiveMode=e.voice_receive_mode;this.voiceApplicationSid=e.voice_application_sid;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.emergencyStatus=e.emergency_status;this.emergencyAddressSid=e.emergency_address_sid;this.bundleSid=e.bundle_sid;this.status=e.status;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.assignedAddOns=function assignedAddOns(){return this._proxy.assignedAddOns};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function IncomingPhoneNumberContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/IncomingPhoneNumbers/${i}.json`;this._assignedAddOns=undefined};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({AccountSid:o.get(t,"accountSid"),ApiVersion:o.get(t,"apiVersion"),FriendlyName:o.get(t,"friendlyName"),SmsApplicationSid:o.get(t,"smsApplicationSid"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceApplicationSid:o.get(t,"voiceApplicationSid"),VoiceCallerIdLookup:p.bool(o.get(t,"voiceCallerIdLookup")),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),EmergencyStatus:o.get(t,"emergencyStatus"),EmergencyAddressSid:o.get(t,"emergencyAddressSid"),TrunkSid:o.get(t,"trunkSid"),VoiceReceiveMode:o.get(t,"voiceReceiveMode"),IdentitySid:o.get(t,"identitySid"),AddressSid:o.get(t,"addressSid"),BundleSid:o.get(t,"bundleSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(_.prototype,"assignedAddOns",{get:function(){if(!this._assignedAddOns){this._assignedAddOns=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._assignedAddOns}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IncomingPhoneNumberList:l,IncomingPhoneNumberPage:v,IncomingPhoneNumberInstance:m,IncomingPhoneNumberContext:_}},83805:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(39716).AssignedAddOnExtensionList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function AssignedAddOnList(t,e,i){function AssignedAddOnListInstance(t){return AssignedAddOnListInstance.get(t)}AssignedAddOnListInstance._version=t;AssignedAddOnListInstance._solution={accountSid:e,resourceSid:i};AssignedAddOnListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers/${i}/AssignedAddOns.json`;AssignedAddOnListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssignedAddOnListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssignedAddOnListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssignedAddOnListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssignedAddOnListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.installedAddOnSid)){throw new Error('Required parameter "opts.installedAddOnSid" missing.')}var i=n.defer();var s=u.of({InstalledAddOnSid:o.get(t,"installedAddOnSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.resourceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssignedAddOnListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.resourceSid,t)};AssignedAddOnListInstance.toJSON=function toJSON(){return this._solution};AssignedAddOnListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssignedAddOnListInstance};f=function AssignedAddOnPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.resourceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AssignedAddOnInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.resourceSid=e.resource_sid;this.friendlyName=e.friendly_name;this.description=e.description;this.configuration=e.configuration;this.uniqueName=e.unique_name;this.dateCreated=a.rfc2822DateTime(e.date_created);this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.uri=e.uri;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,resourceSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.resourceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.extensions=function extensions(){return this._proxy.extensions};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AssignedAddOnContext(t,e,i,n){this._version=t;this._solution={accountSid:e,resourceSid:i,sid:n};this._uri=`/Accounts/${e}/IncomingPhoneNumbers/${i}/AssignedAddOns/${n}.json`;this._extensions=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.resourceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"extensions",{get:function(){if(!this._extensions){this._extensions=new r(this._version,this._solution.accountSid,this._solution.resourceSid,this._solution.sid)}return this._extensions}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssignedAddOnList:h,AssignedAddOnPage:f,AssignedAddOnInstance:p,AssignedAddOnContext:d}},39716:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function AssignedAddOnExtensionList(t,e,i,r){function AssignedAddOnExtensionListInstance(t){return AssignedAddOnExtensionListInstance.get(t)}AssignedAddOnExtensionListInstance._version=t;AssignedAddOnExtensionListInstance._solution={accountSid:e,resourceSid:i,assignedAddOnSid:r};AssignedAddOnExtensionListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers/${i}/AssignedAddOns/${r}/Extensions.json`;AssignedAddOnExtensionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssignedAddOnExtensionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssignedAddOnExtensionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssignedAddOnExtensionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssignedAddOnExtensionListInstance.get=function get(t){return new f(this._version,this._solution.accountSid,this._solution.resourceSid,this._solution.assignedAddOnSid,t)};AssignedAddOnExtensionListInstance.toJSON=function toJSON(){return this._solution};AssignedAddOnExtensionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssignedAddOnExtensionListInstance};u=function AssignedAddOnExtensionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.accountSid,this._solution.resourceSid,this._solution.assignedAddOnSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function AssignedAddOnExtensionInstance(t,e,i,n,o,s){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.resourceSid=e.resource_sid;this.assignedAddOnSid=e.assigned_add_on_sid;this.friendlyName=e.friendly_name;this.productName=e.product_name;this.uniqueName=e.unique_name;this.uri=e.uri;this.enabled=e.enabled;this._context=undefined;this._solution={accountSid:i,resourceSid:n,assignedAddOnSid:o,sid:s||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.accountSid,this._solution.resourceSid,this._solution.assignedAddOnSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AssignedAddOnExtensionContext(t,e,i,n,o){this._version=t;this._solution={accountSid:e,resourceSid:i,assignedAddOnSid:n,sid:o};this._uri=`/Accounts/${e}/IncomingPhoneNumbers/${i}/AssignedAddOns/${n}/Extensions/${o}.json`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.accountSid,this._solution.resourceSid,this._solution.assignedAddOnSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssignedAddOnExtensionList:a,AssignedAddOnExtensionPage:u,AssignedAddOnExtensionInstance:h,AssignedAddOnExtensionContext:f}},42867:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function LocalList(t,e){function LocalListInstance(t){return LocalListInstance.get(t)}LocalListInstance._version=t;LocalListInstance._solution={accountSid:e};LocalListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers/Local.json`;LocalListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};LocalListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};LocalListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Beta:a.bool(o.get(t,"beta")),FriendlyName:o.get(t,"friendlyName"),PhoneNumber:o.get(t,"phoneNumber"),Origin:o.get(t,"origin"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LocalListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LocalListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumber)){throw new Error('Required parameter "opts.phoneNumber" missing.')}var i=n.defer();var s=u.of({PhoneNumber:o.get(t,"phoneNumber"),ApiVersion:o.get(t,"apiVersion"),FriendlyName:o.get(t,"friendlyName"),SmsApplicationSid:o.get(t,"smsApplicationSid"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceApplicationSid:o.get(t,"voiceApplicationSid"),VoiceCallerIdLookup:a.bool(o.get(t,"voiceCallerIdLookup")),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),IdentitySid:o.get(t,"identitySid"),AddressSid:o.get(t,"addressSid"),EmergencyStatus:o.get(t,"emergencyStatus"),EmergencyAddressSid:o.get(t,"emergencyAddressSid"),TrunkSid:o.get(t,"trunkSid"),VoiceReceiveMode:o.get(t,"voiceReceiveMode"),BundleSid:o.get(t,"bundleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LocalListInstance.toJSON=function toJSON(){return this._solution};LocalListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return LocalListInstance};f=function LocalPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function LocalInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.addressSid=e.address_sid;this.addressRequirements=e.address_requirements;this.apiVersion=e.api_version;this.beta=e.beta;this.capabilities=e.capabilities;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.identitySid=e.identity_sid;this.phoneNumber=e.phone_number;this.origin=e.origin;this.sid=e.sid;this.smsApplicationSid=e.sms_application_sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.trunkSid=e.trunk_sid;this.uri=e.uri;this.voiceReceiveMode=e.voice_receive_mode;this.voiceApplicationSid=e.voice_application_sid;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.emergencyStatus=e.emergency_status;this.emergencyAddressSid=e.emergency_address_sid;this.bundleSid=e.bundle_sid;this.status=e.status;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={LocalList:h,LocalPage:f,LocalInstance:p}},6179:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function MobileList(t,e){function MobileListInstance(t){return MobileListInstance.get(t)}MobileListInstance._version=t;MobileListInstance._solution={accountSid:e};MobileListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers/Mobile.json`;MobileListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MobileListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MobileListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Beta:a.bool(o.get(t,"beta")),FriendlyName:o.get(t,"friendlyName"),PhoneNumber:o.get(t,"phoneNumber"),Origin:o.get(t,"origin"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MobileListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MobileListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumber)){throw new Error('Required parameter "opts.phoneNumber" missing.')}var i=n.defer();var s=u.of({PhoneNumber:o.get(t,"phoneNumber"),ApiVersion:o.get(t,"apiVersion"),FriendlyName:o.get(t,"friendlyName"),SmsApplicationSid:o.get(t,"smsApplicationSid"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceApplicationSid:o.get(t,"voiceApplicationSid"),VoiceCallerIdLookup:a.bool(o.get(t,"voiceCallerIdLookup")),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),IdentitySid:o.get(t,"identitySid"),AddressSid:o.get(t,"addressSid"),EmergencyStatus:o.get(t,"emergencyStatus"),EmergencyAddressSid:o.get(t,"emergencyAddressSid"),TrunkSid:o.get(t,"trunkSid"),VoiceReceiveMode:o.get(t,"voiceReceiveMode"),BundleSid:o.get(t,"bundleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MobileListInstance.toJSON=function toJSON(){return this._solution};MobileListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MobileListInstance};f=function MobilePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MobileInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.addressSid=e.address_sid;this.addressRequirements=e.address_requirements;this.apiVersion=e.api_version;this.beta=e.beta;this.capabilities=e.capabilities;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.identitySid=e.identity_sid;this.phoneNumber=e.phone_number;this.origin=e.origin;this.sid=e.sid;this.smsApplicationSid=e.sms_application_sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.trunkSid=e.trunk_sid;this.uri=e.uri;this.voiceReceiveMode=e.voice_receive_mode;this.voiceApplicationSid=e.voice_application_sid;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.emergencyStatus=e.emergency_status;this.emergencyAddressSid=e.emergency_address_sid;this.bundleSid=e.bundle_sid;this.status=e.status;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MobileList:h,MobilePage:f,MobileInstance:p}},8039:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function TollFreeList(t,e){function TollFreeListInstance(t){return TollFreeListInstance.get(t)}TollFreeListInstance._version=t;TollFreeListInstance._solution={accountSid:e};TollFreeListInstance._uri=`/Accounts/${e}/IncomingPhoneNumbers/TollFree.json`;TollFreeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TollFreeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TollFreeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Beta:a.bool(o.get(t,"beta")),FriendlyName:o.get(t,"friendlyName"),PhoneNumber:o.get(t,"phoneNumber"),Origin:o.get(t,"origin"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TollFreeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TollFreeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumber)){throw new Error('Required parameter "opts.phoneNumber" missing.')}var i=n.defer();var s=u.of({PhoneNumber:o.get(t,"phoneNumber"),ApiVersion:o.get(t,"apiVersion"),FriendlyName:o.get(t,"friendlyName"),SmsApplicationSid:o.get(t,"smsApplicationSid"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),VoiceApplicationSid:o.get(t,"voiceApplicationSid"),VoiceCallerIdLookup:a.bool(o.get(t,"voiceCallerIdLookup")),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),IdentitySid:o.get(t,"identitySid"),AddressSid:o.get(t,"addressSid"),EmergencyStatus:o.get(t,"emergencyStatus"),EmergencyAddressSid:o.get(t,"emergencyAddressSid"),TrunkSid:o.get(t,"trunkSid"),VoiceReceiveMode:o.get(t,"voiceReceiveMode"),BundleSid:o.get(t,"bundleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TollFreeListInstance.toJSON=function toJSON(){return this._solution};TollFreeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TollFreeListInstance};f=function TollFreePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TollFreeInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.addressSid=e.address_sid;this.addressRequirements=e.address_requirements;this.apiVersion=e.api_version;this.beta=e.beta;this.capabilities=e.capabilities;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.identitySid=e.identity_sid;this.phoneNumber=e.phone_number;this.origin=e.origin;this.sid=e.sid;this.smsApplicationSid=e.sms_application_sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.trunkSid=e.trunk_sid;this.uri=e.uri;this.voiceReceiveMode=e.voice_receive_mode;this.voiceApplicationSid=e.voice_application_sid;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.emergencyStatus=e.emergency_status;this.emergencyAddressSid=e.emergency_address_sid;this.bundleSid=e.bundle_sid;this.status=e.status;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TollFreeList:h,TollFreePage:f,TollFreeInstance:p}},36378:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function KeyList(t,e){function KeyListInstance(t){return KeyListInstance.get(t)}KeyListInstance._version=t;KeyListInstance._solution={accountSid:e};KeyListInstance._uri=`/Accounts/${e}/Keys.json`;KeyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};KeyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};KeyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};KeyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};KeyListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};KeyListInstance.toJSON=function toJSON(){return this._solution};KeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return KeyListInstance};h=function KeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function KeyInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function KeyContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Keys/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={KeyList:u,KeyPage:h,KeyInstance:f,KeyContext:p}},76433:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(56300).FeedbackList;var c=i(15532).MediaList;var a=i(60938);var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function MessageList(t,e){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={accountSid:e};MessageListInstance._uri=`/Accounts/${e}/Messages.json`;MessageListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}var i=n.defer();var s=f.of({To:o.get(t,"to"),From:o.get(t,"from"),MessagingServiceSid:o.get(t,"messagingServiceSid"),Body:o.get(t,"body"),MediaUrl:h.map(o.get(t,"mediaUrl"),function(t){return t}),StatusCallback:o.get(t,"statusCallback"),ApplicationSid:o.get(t,"applicationSid"),MaxPrice:o.get(t,"maxPrice"),ProvideFeedback:h.bool(o.get(t,"provideFeedback")),Attempt:o.get(t,"attempt"),ValidityPeriod:o.get(t,"validityPeriod"),ForceDelivery:h.bool(o.get(t,"forceDelivery")),ContentRetention:o.get(t,"contentRetention"),AddressRetention:o.get(t,"addressRetention"),SmartEncoded:h.bool(o.get(t,"smartEncoded")),PersistentAction:h.map(o.get(t,"persistentAction"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({To:o.get(t,"to"),From:o.get(t,"from"),"DateSent<":h.iso8601DateTime(o.get(t,"dateSentBefore")),DateSent:h.iso8601DateTime(o.get(t,"dateSent")),"DateSent>":h.iso8601DateTime(o.get(t,"dateSentAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new v(this._version,this._solution.accountSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};d=function MessagePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,a.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.accountSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function MessageInstance(t,e,i,n){this._version=t;this.body=e.body;this.numSegments=e.num_segments;this.direction=e.direction;this.from=e.from;this.to=e.to;this.dateUpdated=u.rfc2822DateTime(e.date_updated);this.price=e.price;this.errorMessage=e.error_message;this.uri=e.uri;this.accountSid=e.account_sid;this.numMedia=e.num_media;this.status=e.status;this.messagingServiceSid=e.messaging_service_sid;this.sid=e.sid;this.dateSent=u.rfc2822DateTime(e.date_sent);this.dateCreated=u.rfc2822DateTime(e.date_created);this.errorCode=u.integer(e.error_code);this.priceUnit=e.price_unit;this.apiVersion=e.api_version;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.media=function media(){return this._proxy.media};l.prototype.feedback=function feedback(){return this._proxy.feedback};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function MessageContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Messages/${i}.json`;this._media=undefined;this._feedback=undefined};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.body)){throw new Error('Required parameter "opts.body" missing.')}var i=n.defer();var s=f.of({Body:o.get(t,"body")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"media",{get:function(){if(!this._media){this._media=new c(this._version,this._solution.accountSid,this._solution.sid)}return this._media}});Object.defineProperty(v.prototype,"feedback",{get:function(){if(!this._feedback){this._feedback=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._feedback}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:p,MessagePage:d,MessageInstance:l,MessageContext:v}},56300:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function FeedbackList(t,e,i){function FeedbackListInstance(t){return FeedbackListInstance.get(t)}FeedbackListInstance._version=t;FeedbackListInstance._solution={accountSid:e,messageSid:i};FeedbackListInstance._uri=`/Accounts/${e}/Messages/${i}/Feedback.json`;FeedbackListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Outcome:o.get(t,"outcome")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FeedbackListInstance.toJSON=function toJSON(){return this._solution};FeedbackListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FeedbackListInstance};h=function FeedbackPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.messageSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FeedbackInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.messageSid=e.message_sid;this.outcome=e.outcome;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,messageSid:n}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FeedbackList:u,FeedbackPage:h,FeedbackInstance:f}},15532:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MediaList(t,e,i){function MediaListInstance(t){return MediaListInstance.get(t)}MediaListInstance._version=t;MediaListInstance._solution={accountSid:e,messageSid:i};MediaListInstance._uri=`/Accounts/${e}/Messages/${i}/Media.json`;MediaListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MediaListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MediaListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"DateCreated<":a.iso8601DateTime(o.get(t,"dateCreatedBefore")),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),"DateCreated>":a.iso8601DateTime(o.get(t,"dateCreatedAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MediaListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MediaListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.messageSid,t)};MediaListInstance.toJSON=function toJSON(){return this._solution};MediaListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MediaListInstance};f=function MediaPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.messageSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MediaInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.contentType=e.content_type;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.parentSid=e.parent_sid;this.sid=e.sid;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,messageSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.messageSid,this._solution.sid)}return this._context}});p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MediaContext(t,e,i,n){this._version=t;this._solution={accountSid:e,messageSid:i,sid:n};this._uri=`/Accounts/${e}/Messages/${i}/Media/${n}.json`};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.messageSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MediaList:h,MediaPage:f,MediaInstance:p,MediaContext:d}},52411:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function NewKeyList(t,e){function NewKeyListInstance(t){return NewKeyListInstance.get(t)}NewKeyListInstance._version=t;NewKeyListInstance._solution={accountSid:e};NewKeyListInstance._uri=`/Accounts/${e}/Keys.json`;NewKeyListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NewKeyListInstance.toJSON=function toJSON(){return this._solution};NewKeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NewKeyListInstance};h=function NewKeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NewKeyInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.secret=e.secret;this._context=undefined;this._solution={accountSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NewKeyList:u,NewKeyPage:h,NewKeyInstance:f}},63159:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function NewSigningKeyList(t,e){function NewSigningKeyListInstance(t){return NewSigningKeyListInstance.get(t)}NewSigningKeyListInstance._version=t;NewSigningKeyListInstance._solution={accountSid:e};NewSigningKeyListInstance._uri=`/Accounts/${e}/SigningKeys.json`;NewSigningKeyListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NewSigningKeyListInstance.toJSON=function toJSON(){return this._solution};NewSigningKeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NewSigningKeyListInstance};h=function NewSigningKeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NewSigningKeyInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.secret=e.secret;this._context=undefined;this._solution={accountSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NewSigningKeyList:u,NewSigningKeyPage:h,NewSigningKeyInstance:f}},47066:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function NotificationList(t,e){function NotificationListInstance(t){return NotificationListInstance.get(t)}NotificationListInstance._version=t;NotificationListInstance._solution={accountSid:e};NotificationListInstance._uri=`/Accounts/${e}/Notifications.json`;NotificationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NotificationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NotificationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Log:o.get(t,"log"),"MessageDate<":a.iso8601Date(o.get(t,"messageDateBefore")),MessageDate:a.iso8601Date(o.get(t,"messageDate")),"MessageDate>":a.iso8601Date(o.get(t,"messageDateAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NotificationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NotificationListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};NotificationListInstance.toJSON=function toJSON(){return this._solution};NotificationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NotificationListInstance};f=function NotificationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function NotificationInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callSid=e.call_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.errorCode=e.error_code;this.log=e.log;this.messageDate=c.rfc2822DateTime(e.message_date);this.messageText=e.message_text;this.moreInfo=e.more_info;this.requestMethod=e.request_method;this.requestUrl=e.request_url;this.requestVariables=e.request_variables;this.responseBody=e.response_body;this.responseHeaders=e.response_headers;this.sid=e.sid;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function NotificationContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Notifications/${i}.json`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NotificationList:h,NotificationPage:f,NotificationInstance:p,NotificationContext:d}},34642:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function OutgoingCallerIdList(t,e){function OutgoingCallerIdListInstance(t){return OutgoingCallerIdListInstance.get(t)}OutgoingCallerIdListInstance._version=t;OutgoingCallerIdListInstance._solution={accountSid:e};OutgoingCallerIdListInstance._uri=`/Accounts/${e}/OutgoingCallerIds.json`;OutgoingCallerIdListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};OutgoingCallerIdListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};OutgoingCallerIdListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PhoneNumber:o.get(t,"phoneNumber"),FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};OutgoingCallerIdListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};OutgoingCallerIdListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};OutgoingCallerIdListInstance.toJSON=function toJSON(){return this._solution};OutgoingCallerIdListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return OutgoingCallerIdListInstance};h=function OutgoingCallerIdPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function OutgoingCallerIdInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.accountSid=e.account_sid;this.phoneNumber=e.phone_number;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function OutgoingCallerIdContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/OutgoingCallerIds/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={OutgoingCallerIdList:u,OutgoingCallerIdPage:h,OutgoingCallerIdInstance:f,OutgoingCallerIdContext:p}},95601:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(62257).MemberList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function QueueList(t,e){function QueueListInstance(t){return QueueListInstance.get(t)}QueueListInstance._version=t;QueueListInstance._solution={accountSid:e};QueueListInstance._uri=`/Accounts/${e}/Queues.json`;QueueListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};QueueListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};QueueListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueueListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueueListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),MaxSize:o.get(t,"maxSize")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueueListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};QueueListInstance.toJSON=function toJSON(){return this._solution};QueueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return QueueListInstance};f=function QueuePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function QueueInstance(t,e,i,n){this._version=t;this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.currentSize=a.integer(e.current_size);this.friendlyName=e.friendly_name;this.uri=e.uri;this.accountSid=e.account_sid;this.averageWaitTime=a.integer(e.average_wait_time);this.sid=e.sid;this.dateCreated=a.rfc2822DateTime(e.date_created);this.maxSize=a.integer(e.max_size);this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.members=function members(){return this._proxy.members};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function QueueContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Queues/${i}.json`;this._members=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),MaxSize:o.get(t,"maxSize")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"members",{get:function(){if(!this._members){this._members=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._members}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={QueueList:h,QueuePage:f,QueueInstance:p,QueueContext:d}},62257:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function MemberList(t,e,i){function MemberListInstance(t){return MemberListInstance.get(t)}MemberListInstance._version=t;MemberListInstance._solution={accountSid:e,queueSid:i};MemberListInstance._uri=`/Accounts/${e}/Queues/${i}/Members.json`;MemberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MemberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MemberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.queueSid,t)};MemberListInstance.toJSON=function toJSON(){return this._solution};MemberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MemberListInstance};h=function MemberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.queueSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function MemberInstance(t,e,i,n,o){this._version=t;this.callSid=e.call_sid;this.dateEnqueued=c.rfc2822DateTime(e.date_enqueued);this.position=c.integer(e.position);this.uri=e.uri;this.waitTime=c.integer(e.wait_time);this.queueSid=e.queue_sid;this._context=undefined;this._solution={accountSid:i,queueSid:n,callSid:o||this.callSid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.queueSid,this._solution.callSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MemberContext(t,e,i,n){this._version=t;this._solution={accountSid:e,queueSid:i,callSid:n};this._uri=`/Accounts/${e}/Queues/${i}/Members/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.queueSid,this._solution.callSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.url)){throw new Error('Required parameter "opts.url" missing.')}var i=n.defer();var s=a.of({Url:o.get(t,"url"),Method:o.get(t,"method")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.queueSid,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MemberList:u,MemberPage:h,MemberInstance:f,MemberContext:p}},28672:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(28130).AddOnResultList;var c=i(60938);var a=i(67425).TranscriptionList;var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function RecordingList(t,e){function RecordingListInstance(t){return RecordingListInstance.get(t)}RecordingListInstance._version=t;RecordingListInstance._solution={accountSid:e};RecordingListInstance._uri=`/Accounts/${e}/Recordings.json`;RecordingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RecordingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RecordingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({"DateCreated<":h.iso8601DateTime(o.get(t,"dateCreatedBefore")),DateCreated:h.iso8601DateTime(o.get(t,"dateCreated")),"DateCreated>":h.iso8601DateTime(o.get(t,"dateCreatedAfter")),CallSid:o.get(t,"callSid"),ConferenceSid:o.get(t,"conferenceSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.get=function get(t){return new v(this._version,this._solution.accountSid,t)};RecordingListInstance.toJSON=function toJSON(){return this._solution};RecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingListInstance};d=function RecordingPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,c.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.accountSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function RecordingInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callSid=e.call_sid;this.conferenceSid=e.conference_sid;this.dateCreated=u.rfc2822DateTime(e.date_created);this.dateUpdated=u.rfc2822DateTime(e.date_updated);this.startTime=u.rfc2822DateTime(e.start_time);this.duration=e.duration;this.sid=e.sid;this.price=e.price;this.priceUnit=e.price_unit;this.status=e.status;this.channels=u.integer(e.channels);this.source=e.source;this.errorCode=u.integer(e.error_code);this.uri=e.uri;this.encryptionDetails=e.encryption_details;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.transcriptions=function transcriptions(){return this._proxy.transcriptions};l.prototype.addOnResults=function addOnResults(){return this._proxy.addOnResults};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function RecordingContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Recordings/${i}.json`;this._transcriptions=undefined;this._addOnResults=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(v.prototype,"transcriptions",{get:function(){if(!this._transcriptions){this._transcriptions=new a(this._version,this._solution.accountSid,this._solution.sid)}return this._transcriptions}});Object.defineProperty(v.prototype,"addOnResults",{get:function(){if(!this._addOnResults){this._addOnResults=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._addOnResults}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingList:p,RecordingPage:d,RecordingInstance:l,RecordingContext:v}},28130:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(31026).PayloadList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function AddOnResultList(t,e,i){function AddOnResultListInstance(t){return AddOnResultListInstance.get(t)}AddOnResultListInstance._version=t;AddOnResultListInstance._solution={accountSid:e,referenceSid:i};AddOnResultListInstance._uri=`/Accounts/${e}/Recordings/${i}/AddOnResults.json`;AddOnResultListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AddOnResultListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AddOnResultListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AddOnResultListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AddOnResultListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,this._solution.referenceSid,t)};AddOnResultListInstance.toJSON=function toJSON(){return this._solution};AddOnResultListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AddOnResultListInstance};f=function AddOnResultPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid,this._solution.referenceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AddOnResultInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.status=e.status;this.addOnSid=e.add_on_sid;this.addOnConfigurationSid=e.add_on_configuration_sid;this.dateCreated=a.rfc2822DateTime(e.date_created);this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.dateCompleted=a.rfc2822DateTime(e.date_completed);this.referenceSid=e.reference_sid;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,referenceSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.referenceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.payloads=function payloads(){return this._proxy.payloads};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AddOnResultContext(t,e,i,n){this._version=t;this._solution={accountSid:e,referenceSid:i,sid:n};this._uri=`/Accounts/${e}/Recordings/${i}/AddOnResults/${n}.json`;this._payloads=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.referenceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"payloads",{get:function(){if(!this._payloads){this._payloads=new c(this._version,this._solution.accountSid,this._solution.referenceSid,this._solution.sid)}return this._payloads}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AddOnResultList:h,AddOnResultPage:f,AddOnResultInstance:p,AddOnResultContext:d}},31026:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function PayloadList(t,e,i,r){function PayloadListInstance(t){return PayloadListInstance.get(t)}PayloadListInstance._version=t;PayloadListInstance._solution={accountSid:e,referenceSid:i,addOnResultSid:r};PayloadListInstance._uri=`/Accounts/${e}/Recordings/${i}/AddOnResults/${r}/Payloads.json`;PayloadListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PayloadListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PayloadListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PayloadListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PayloadListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.referenceSid,this._solution.addOnResultSid,t)};PayloadListInstance.toJSON=function toJSON(){return this._solution};PayloadListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PayloadListInstance};h=function PayloadPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.referenceSid,this._solution.addOnResultSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PayloadInstance(t,e,i,n,o,s){this._version=t;this.sid=e.sid;this.addOnResultSid=e.add_on_result_sid;this.accountSid=e.account_sid;this.label=e.label;this.addOnSid=e.add_on_sid;this.addOnConfigurationSid=e.add_on_configuration_sid;this.contentType=e.content_type;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.referenceSid=e.reference_sid;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,referenceSid:n,addOnResultSid:o,sid:s||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.referenceSid,this._solution.addOnResultSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PayloadContext(t,e,i,n,o){this._version=t;this._solution={accountSid:e,referenceSid:i,addOnResultSid:n,sid:o};this._uri=`/Accounts/${e}/Recordings/${i}/AddOnResults/${n}/Payloads/${o}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.referenceSid,this._solution.addOnResultSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PayloadList:u,PayloadPage:h,PayloadInstance:f,PayloadContext:p}},67425:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TranscriptionList(t,e,i){function TranscriptionListInstance(t){return TranscriptionListInstance.get(t)}TranscriptionListInstance._version=t;TranscriptionListInstance._solution={accountSid:e,recordingSid:i};TranscriptionListInstance._uri=`/Accounts/${e}/Recordings/${i}/Transcriptions.json`;TranscriptionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TranscriptionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TranscriptionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TranscriptionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TranscriptionListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.recordingSid,t)};TranscriptionListInstance.toJSON=function toJSON(){return this._solution};TranscriptionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TranscriptionListInstance};h=function TranscriptionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.recordingSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TranscriptionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.duration=e.duration;this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.recordingSid=e.recording_sid;this.sid=e.sid;this.status=e.status;this.transcriptionText=e.transcription_text;this.type=e.type;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,recordingSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.recordingSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TranscriptionContext(t,e,i,n){this._version=t;this._solution={accountSid:e,recordingSid:i,sid:n};this._uri=`/Accounts/${e}/Recordings/${i}/Transcriptions/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.recordingSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TranscriptionList:u,TranscriptionPage:h,TranscriptionInstance:f,TranscriptionContext:p}},72435:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ShortCodeList(t,e){function ShortCodeListInstance(t){return ShortCodeListInstance.get(t)}ShortCodeListInstance._version=t;ShortCodeListInstance._solution={accountSid:e};ShortCodeListInstance._uri=`/Accounts/${e}/SMS/ShortCodes.json`;ShortCodeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ShortCodeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ShortCodeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),ShortCode:o.get(t,"shortCode"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};ShortCodeListInstance.toJSON=function toJSON(){return this._solution};ShortCodeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ShortCodeListInstance};h=function ShortCodePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ShortCodeInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.shortCode=e.short_code;this.sid=e.sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ShortCodeContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/SMS/ShortCodes/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),ApiVersion:o.get(t,"apiVersion"),SmsUrl:o.get(t,"smsUrl"),SmsMethod:o.get(t,"smsMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ShortCodeList:u,ShortCodePage:h,ShortCodeInstance:f,ShortCodeContext:p}},40489:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SigningKeyList(t,e){function SigningKeyListInstance(t){return SigningKeyListInstance.get(t)}SigningKeyListInstance._version=t;SigningKeyListInstance._solution={accountSid:e};SigningKeyListInstance._uri=`/Accounts/${e}/SigningKeys.json`;SigningKeyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SigningKeyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SigningKeyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SigningKeyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SigningKeyListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};SigningKeyListInstance.toJSON=function toJSON(){return this._solution};SigningKeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SigningKeyListInstance};h=function SigningKeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SigningKeyInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SigningKeyContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/SigningKeys/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SigningKeyList:u,SigningKeyPage:h,SigningKeyInstance:f,SigningKeyContext:p}},93613:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(99178).CredentialListList;var r=i(72198).DomainList;var c=i(5319).IpAccessControlListList;var a;a=function SipList(t,e){function SipListInstance(t){return SipListInstance.get(t)}SipListInstance._version=t;SipListInstance._solution={accountSid:e};SipListInstance._domains=undefined;SipListInstance._regions=undefined;SipListInstance._ipAccessControlLists=undefined;SipListInstance._credentialLists=undefined;Object.defineProperty(SipListInstance,"domains",{get:function domains(){if(!this._domains){this._domains=new r(this._version,this._solution.accountSid)}return this._domains}});Object.defineProperty(SipListInstance,"ipAccessControlLists",{get:function ipAccessControlLists(){if(!this._ipAccessControlLists){this._ipAccessControlLists=new c(this._version,this._solution.accountSid)}return this._ipAccessControlLists}});Object.defineProperty(SipListInstance,"credentialLists",{get:function credentialLists(){if(!this._credentialLists){this._credentialLists=new s(this._version,this._solution.accountSid)}return this._credentialLists}});SipListInstance.toJSON=function toJSON(){return this._solution};SipListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return SipListInstance};t.exports={SipList:a}},99178:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(61107).CredentialList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function CredentialListList(t,e){function CredentialListListInstance(t){return CredentialListListInstance.get(t)}CredentialListListInstance._version=t;CredentialListListInstance._solution={accountSid:e};CredentialListListInstance._uri=`/Accounts/${e}/SIP/CredentialLists.json`;CredentialListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};CredentialListListInstance.toJSON=function toJSON(){return this._solution};CredentialListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListListInstance};f=function CredentialListPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialListInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=a.rfc2822DateTime(e.date_created);this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.subresourceUris=e.subresource_uris;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.credentials=function credentials(){return this._proxy.credentials};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialListContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/SIP/CredentialLists/${i}.json`;this._credentials=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"credentials",{get:function(){if(!this._credentials){this._credentials=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._credentials}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialListList:h,CredentialListPage:f,CredentialListInstance:p,CredentialListContext:d}},61107:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CredentialList(t,e,i){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={accountSid:e,credentialListSid:i};CredentialListInstance._uri=`/Accounts/${e}/SIP/CredentialLists/${i}/Credentials.json`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.username)){throw new Error('Required parameter "opts.username" missing.')}if(o.isUndefined(t.password)){throw new Error('Required parameter "opts.password" missing.')}var i=n.defer();var s=a.of({Username:o.get(t,"username"),Password:o.get(t,"password")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.credentialListSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.credentialListSid,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};h=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.credentialListSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CredentialInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.credentialListSid=e.credential_list_sid;this.username=e.username;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,credentialListSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.credentialListSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialContext(t,e,i,n){this._version=t;this._solution={accountSid:e,credentialListSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/CredentialLists/${i}/Credentials/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.credentialListSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Password:o.get(t,"password")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.credentialListSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:u,CredentialPage:h,CredentialInstance:f,CredentialContext:p}},72198:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(81039).AuthTypesList;var c=i(29456).CredentialListMappingList;var a=i(99642).IpAccessControlListMappingList;var u=i(60938);var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function DomainList(t,e){function DomainListInstance(t){return DomainListInstance.get(t)}DomainListInstance._version=t;DomainListInstance._solution={accountSid:e};DomainListInstance._uri=`/Accounts/${e}/SIP/Domains.json`;DomainListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DomainListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DomainListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DomainListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DomainListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.domainName)){throw new Error('Required parameter "opts.domainName" missing.')}var i=n.defer();var s=p.of({DomainName:o.get(t,"domainName"),FriendlyName:o.get(t,"friendlyName"),VoiceUrl:o.get(t,"voiceUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceStatusCallbackUrl:o.get(t,"voiceStatusCallbackUrl"),VoiceStatusCallbackMethod:o.get(t,"voiceStatusCallbackMethod"),SipRegistration:f.bool(o.get(t,"sipRegistration")),EmergencyCallingEnabled:f.bool(o.get(t,"emergencyCallingEnabled")),Secure:f.bool(o.get(t,"secure")),ByocTrunkSid:o.get(t,"byocTrunkSid"),EmergencyCallerSid:o.get(t,"emergencyCallerSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DomainListInstance.get=function get(t){return new m(this._version,this._solution.accountSid,t)};DomainListInstance.toJSON=function toJSON(){return this._solution};DomainListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DomainListInstance};l=function DomainPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,u.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.accountSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function DomainInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.authType=e.auth_type;this.dateCreated=h.rfc2822DateTime(e.date_created);this.dateUpdated=h.rfc2822DateTime(e.date_updated);this.domainName=e.domain_name;this.friendlyName=e.friendly_name;this.sid=e.sid;this.uri=e.uri;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceStatusCallbackMethod=e.voice_status_callback_method;this.voiceStatusCallbackUrl=e.voice_status_callback_url;this.voiceUrl=e.voice_url;this.subresourceUris=e.subresource_uris;this.sipRegistration=e.sip_registration;this.emergencyCallingEnabled=e.emergency_calling_enabled;this.secure=e.secure;this.byocTrunkSid=e.byoc_trunk_sid;this.emergencyCallerSid=e.emergency_caller_sid;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.ipAccessControlListMappings=function ipAccessControlListMappings(){return this._proxy.ipAccessControlListMappings};v.prototype.credentialListMappings=function credentialListMappings(){return this._proxy.credentialListMappings};v.prototype.auth=function auth(){return this._proxy.auth};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function DomainContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/SIP/Domains/${i}.json`;this._ipAccessControlListMappings=undefined;this._credentialListMappings=undefined;this._auth=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceStatusCallbackMethod:o.get(t,"voiceStatusCallbackMethod"),VoiceStatusCallbackUrl:o.get(t,"voiceStatusCallbackUrl"),VoiceUrl:o.get(t,"voiceUrl"),SipRegistration:f.bool(o.get(t,"sipRegistration")),DomainName:o.get(t,"domainName"),EmergencyCallingEnabled:f.bool(o.get(t,"emergencyCallingEnabled")),Secure:f.bool(o.get(t,"secure")),ByocTrunkSid:o.get(t,"byocTrunkSid"),EmergencyCallerSid:o.get(t,"emergencyCallerSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"ipAccessControlListMappings",{get:function(){if(!this._ipAccessControlListMappings){this._ipAccessControlListMappings=new a(this._version,this._solution.accountSid,this._solution.sid)}return this._ipAccessControlListMappings}});Object.defineProperty(m.prototype,"credentialListMappings",{get:function(){if(!this._credentialListMappings){this._credentialListMappings=new c(this._version,this._solution.accountSid,this._solution.sid)}return this._credentialListMappings}});Object.defineProperty(m.prototype,"auth",{get:function(){if(!this._auth){this._auth=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._auth}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DomainList:d,DomainPage:l,DomainInstance:v,DomainContext:m}},81039:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(53042).AuthTypeCallsList;var r=i(64360).AuthTypeRegistrationsList;var c;c=function AuthTypesList(t,e,i){function AuthTypesListInstance(t){return AuthTypesListInstance.get(t)}AuthTypesListInstance._version=t;AuthTypesListInstance._solution={accountSid:e,domainSid:i};AuthTypesListInstance._calls=undefined;AuthTypesListInstance._registrations=undefined;Object.defineProperty(AuthTypesListInstance,"calls",{get:function calls(){if(!this._calls){this._calls=new s(this._version,this._solution.accountSid,this._solution.domainSid)}return this._calls}});Object.defineProperty(AuthTypesListInstance,"registrations",{get:function registrations(){if(!this._registrations){this._registrations=new r(this._version,this._solution.accountSid,this._solution.domainSid)}return this._registrations}});AuthTypesListInstance.toJSON=function toJSON(){return this._solution};AuthTypesListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return AuthTypesListInstance};t.exports={AuthTypesList:c}},53042:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(81060).AuthCallsCredentialListMappingList;var r=i(61668).AuthCallsIpAccessControlListMappingList;var c;c=function AuthTypeCallsList(t,e,i){function AuthTypeCallsListInstance(t){return AuthTypeCallsListInstance.get(t)}AuthTypeCallsListInstance._version=t;AuthTypeCallsListInstance._solution={accountSid:e,domainSid:i};AuthTypeCallsListInstance._credentialListMappings=undefined;AuthTypeCallsListInstance._ipAccessControlListMappings=undefined;Object.defineProperty(AuthTypeCallsListInstance,"credentialListMappings",{get:function credentialListMappings(){if(!this._credentialListMappings){this._credentialListMappings=new s(this._version,this._solution.accountSid,this._solution.domainSid)}return this._credentialListMappings}});Object.defineProperty(AuthTypeCallsListInstance,"ipAccessControlListMappings",{get:function ipAccessControlListMappings(){if(!this._ipAccessControlListMappings){this._ipAccessControlListMappings=new r(this._version,this._solution.accountSid,this._solution.domainSid)}return this._ipAccessControlListMappings}});AuthTypeCallsListInstance.toJSON=function toJSON(){return this._solution};AuthTypeCallsListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return AuthTypeCallsListInstance};t.exports={AuthTypeCallsList:c}},81060:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AuthCallsCredentialListMappingList(t,e,i){function AuthCallsCredentialListMappingListInstance(t){return AuthCallsCredentialListMappingListInstance.get(t)}AuthCallsCredentialListMappingListInstance._version=t;AuthCallsCredentialListMappingListInstance._solution={accountSid:e,domainSid:i};AuthCallsCredentialListMappingListInstance._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Calls/CredentialListMappings.json`;AuthCallsCredentialListMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.credentialListSid)){throw new Error('Required parameter "opts.credentialListSid" missing.')}var i=n.defer();var s=a.of({CredentialListSid:o.get(t,"credentialListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsCredentialListMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AuthCallsCredentialListMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AuthCallsCredentialListMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsCredentialListMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsCredentialListMappingListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.domainSid,t)};AuthCallsCredentialListMappingListInstance.toJSON=function toJSON(){return this._solution};AuthCallsCredentialListMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthCallsCredentialListMappingListInstance};h=function AuthCallsCredentialListMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.domainSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AuthCallsCredentialListMappingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this._context=undefined;this._solution={accountSid:i,domainSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.domainSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AuthCallsCredentialListMappingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,domainSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Calls/CredentialListMappings/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthCallsCredentialListMappingList:u,AuthCallsCredentialListMappingPage:h,AuthCallsCredentialListMappingInstance:f,AuthCallsCredentialListMappingContext:p}},61668:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AuthCallsIpAccessControlListMappingList(t,e,i){function AuthCallsIpAccessControlListMappingListInstance(t){return AuthCallsIpAccessControlListMappingListInstance.get(t)}AuthCallsIpAccessControlListMappingListInstance._version=t;AuthCallsIpAccessControlListMappingListInstance._solution={accountSid:e,domainSid:i};AuthCallsIpAccessControlListMappingListInstance._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Calls/IpAccessControlListMappings.json`;AuthCallsIpAccessControlListMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.ipAccessControlListSid)){throw new Error('Required parameter "opts.ipAccessControlListSid" missing.')}var i=n.defer();var s=a.of({IpAccessControlListSid:o.get(t,"ipAccessControlListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsIpAccessControlListMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AuthCallsIpAccessControlListMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AuthCallsIpAccessControlListMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsIpAccessControlListMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthCallsIpAccessControlListMappingListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.domainSid,t)};AuthCallsIpAccessControlListMappingListInstance.toJSON=function toJSON(){return this._solution};AuthCallsIpAccessControlListMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthCallsIpAccessControlListMappingListInstance};h=function AuthCallsIpAccessControlListMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.domainSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AuthCallsIpAccessControlListMappingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this._context=undefined;this._solution={accountSid:i,domainSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.domainSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AuthCallsIpAccessControlListMappingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,domainSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Calls/IpAccessControlListMappings/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthCallsIpAccessControlListMappingList:u,AuthCallsIpAccessControlListMappingPage:h,AuthCallsIpAccessControlListMappingInstance:f,AuthCallsIpAccessControlListMappingContext:p}},64360:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(71061).AuthRegistrationsCredentialListMappingList;var r;r=function AuthTypeRegistrationsList(t,e,i){function AuthTypeRegistrationsListInstance(t){return AuthTypeRegistrationsListInstance.get(t)}AuthTypeRegistrationsListInstance._version=t;AuthTypeRegistrationsListInstance._solution={accountSid:e,domainSid:i};AuthTypeRegistrationsListInstance._credentialListMappings=undefined;Object.defineProperty(AuthTypeRegistrationsListInstance,"credentialListMappings",{get:function credentialListMappings(){if(!this._credentialListMappings){this._credentialListMappings=new s(this._version,this._solution.accountSid,this._solution.domainSid)}return this._credentialListMappings}});AuthTypeRegistrationsListInstance.toJSON=function toJSON(){return this._solution};AuthTypeRegistrationsListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return AuthTypeRegistrationsListInstance};t.exports={AuthTypeRegistrationsList:r}},71061:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AuthRegistrationsCredentialListMappingList(t,e,i){function AuthRegistrationsCredentialListMappingListInstance(t){return AuthRegistrationsCredentialListMappingListInstance.get(t)}AuthRegistrationsCredentialListMappingListInstance._version=t;AuthRegistrationsCredentialListMappingListInstance._solution={accountSid:e,domainSid:i};AuthRegistrationsCredentialListMappingListInstance._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Registrations/CredentialListMappings.json`;AuthRegistrationsCredentialListMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.credentialListSid)){throw new Error('Required parameter "opts.credentialListSid" missing.')}var i=n.defer();var s=a.of({CredentialListSid:o.get(t,"credentialListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthRegistrationsCredentialListMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AuthRegistrationsCredentialListMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AuthRegistrationsCredentialListMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthRegistrationsCredentialListMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthRegistrationsCredentialListMappingListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.domainSid,t)};AuthRegistrationsCredentialListMappingListInstance.toJSON=function toJSON(){return this._solution};AuthRegistrationsCredentialListMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthRegistrationsCredentialListMappingListInstance};h=function AuthRegistrationsCredentialListMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.domainSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AuthRegistrationsCredentialListMappingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this._context=undefined;this._solution={accountSid:i,domainSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.domainSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AuthRegistrationsCredentialListMappingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,domainSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/Domains/${i}/Auth/Registrations/CredentialListMappings/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthRegistrationsCredentialListMappingList:u,AuthRegistrationsCredentialListMappingPage:h,AuthRegistrationsCredentialListMappingInstance:f,AuthRegistrationsCredentialListMappingContext:p}},29456:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CredentialListMappingList(t,e,i){function CredentialListMappingListInstance(t){return CredentialListMappingListInstance.get(t)}CredentialListMappingListInstance._version=t;CredentialListMappingListInstance._solution={accountSid:e,domainSid:i};CredentialListMappingListInstance._uri=`/Accounts/${e}/SIP/Domains/${i}/CredentialListMappings.json`;CredentialListMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.credentialListSid)){throw new Error('Required parameter "opts.credentialListSid" missing.')}var i=n.defer();var s=a.of({CredentialListSid:o.get(t,"credentialListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListMappingListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.domainSid,t)};CredentialListMappingListInstance.toJSON=function toJSON(){return this._solution};CredentialListMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListMappingListInstance};h=function CredentialListMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.domainSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CredentialListMappingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.uri=e.uri;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,domainSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.domainSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialListMappingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,domainSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/Domains/${i}/CredentialListMappings/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialListMappingList:u,CredentialListMappingPage:h,CredentialListMappingInstance:f,CredentialListMappingContext:p}},99642:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function IpAccessControlListMappingList(t,e,i){function IpAccessControlListMappingListInstance(t){return IpAccessControlListMappingListInstance.get(t)}IpAccessControlListMappingListInstance._version=t;IpAccessControlListMappingListInstance._solution={accountSid:e,domainSid:i};IpAccessControlListMappingListInstance._uri=`/Accounts/${e}/SIP/Domains/${i}/IpAccessControlListMappings.json`;IpAccessControlListMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.ipAccessControlListSid)){throw new Error('Required parameter "opts.ipAccessControlListSid" missing.')}var i=n.defer();var s=a.of({IpAccessControlListSid:o.get(t,"ipAccessControlListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IpAccessControlListMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IpAccessControlListMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListMappingListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.domainSid,t)};IpAccessControlListMappingListInstance.toJSON=function toJSON(){return this._solution};IpAccessControlListMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IpAccessControlListMappingListInstance};h=function IpAccessControlListMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.domainSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function IpAccessControlListMappingInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.uri=e.uri;this.subresourceUris=e.subresource_uris;this._context=undefined;this._solution={accountSid:i,domainSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.domainSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function IpAccessControlListMappingContext(t,e,i,n){this._version=t;this._solution={accountSid:e,domainSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/Domains/${i}/IpAccessControlListMappings/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.domainSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IpAccessControlListMappingList:u,IpAccessControlListMappingPage:h,IpAccessControlListMappingInstance:f,IpAccessControlListMappingContext:p}},5319:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(78465).IpAddressList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function IpAccessControlListList(t,e){function IpAccessControlListListInstance(t){return IpAccessControlListListInstance.get(t)}IpAccessControlListListInstance._version=t;IpAccessControlListListInstance._solution={accountSid:e};IpAccessControlListListInstance._uri=`/Accounts/${e}/SIP/IpAccessControlLists.json`;IpAccessControlListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IpAccessControlListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IpAccessControlListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.get=function get(t){return new d(this._version,this._solution.accountSid,t)};IpAccessControlListListInstance.toJSON=function toJSON(){return this._solution};IpAccessControlListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IpAccessControlListListInstance};f=function IpAccessControlListPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function IpAccessControlListInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=a.rfc2822DateTime(e.date_created);this.dateUpdated=a.rfc2822DateTime(e.date_updated);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.ipAddresses=function ipAddresses(){return this._proxy.ipAddresses};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function IpAccessControlListContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/SIP/IpAccessControlLists/${i}.json`;this._ipAddresses=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"ipAddresses",{get:function(){if(!this._ipAddresses){this._ipAddresses=new r(this._version,this._solution.accountSid,this._solution.sid)}return this._ipAddresses}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IpAccessControlListList:h,IpAccessControlListPage:f,IpAccessControlListInstance:p,IpAccessControlListContext:d}},78465:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function IpAddressList(t,e,i){function IpAddressListInstance(t){return IpAddressListInstance.get(t)}IpAddressListInstance._version=t;IpAddressListInstance._solution={accountSid:e,ipAccessControlListSid:i};IpAddressListInstance._uri=`/Accounts/${e}/SIP/IpAccessControlLists/${i}/IpAddresses.json`;IpAddressListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IpAddressListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IpAddressListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAddressListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAddressListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.ipAddress)){throw new Error('Required parameter "opts.ipAddress" missing.')}var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),IpAddress:o.get(t,"ipAddress"),CidrPrefixLength:o.get(t,"cidrPrefixLength")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.ipAccessControlListSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAddressListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,this._solution.ipAccessControlListSid,t)};IpAddressListInstance.toJSON=function toJSON(){return this._solution};IpAddressListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IpAddressListInstance};h=function IpAddressPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid,this._solution.ipAccessControlListSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function IpAddressInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.ipAddress=e.ip_address;this.cidrPrefixLength=c.integer(e.cidr_prefix_length);this.ipAccessControlListSid=e.ip_access_control_list_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,ipAccessControlListSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.ipAccessControlListSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function IpAddressContext(t,e,i,n){this._version=t;this._solution={accountSid:e,ipAccessControlListSid:i,sid:n};this._uri=`/Accounts/${e}/SIP/IpAccessControlLists/${i}/IpAddresses/${n}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.ipAccessControlListSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({IpAddress:o.get(t,"ipAddress"),FriendlyName:o.get(t,"friendlyName"),CidrPrefixLength:o.get(t,"cidrPrefixLength")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.ipAccessControlListSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IpAddressList:u,IpAddressPage:h,IpAddressInstance:f,IpAddressContext:p}},87639:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function TokenList(t,e){function TokenListInstance(t){return TokenListInstance.get(t)}TokenListInstance._version=t;TokenListInstance._solution={accountSid:e};TokenListInstance._uri=`/Accounts/${e}/Tokens.json`;TokenListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Ttl:o.get(t,"ttl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TokenListInstance.toJSON=function toJSON(){return this._solution};TokenListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TokenListInstance};h=function TokenPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TokenInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.iceServers=e.ice_servers;this.password=e.password;this.ttl=e.ttl;this.username=e.username;this._context=undefined;this._solution={accountSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TokenList:u,TokenPage:h,TokenInstance:f}},84673:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TranscriptionList(t,e){function TranscriptionListInstance(t){return TranscriptionListInstance.get(t)}TranscriptionListInstance._version=t;TranscriptionListInstance._solution={accountSid:e};TranscriptionListInstance._uri=`/Accounts/${e}/Transcriptions.json`;TranscriptionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TranscriptionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TranscriptionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TranscriptionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TranscriptionListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};TranscriptionListInstance.toJSON=function toJSON(){return this._solution};TranscriptionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TranscriptionListInstance};h=function TranscriptionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TranscriptionInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.duration=e.duration;this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.recordingSid=e.recording_sid;this.sid=e.sid;this.status=e.status;this.transcriptionText=e.transcription_text;this.type=e.type;this.uri=e.uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TranscriptionContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Transcriptions/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TranscriptionList:u,TranscriptionPage:h,TranscriptionInstance:f,TranscriptionContext:p}},22812:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(35284).RecordList;var r=i(36431).TriggerList;var c;c=function UsageList(t,e){function UsageListInstance(t){return UsageListInstance.get(t)}UsageListInstance._version=t;UsageListInstance._solution={accountSid:e};UsageListInstance._records=undefined;UsageListInstance._triggers=undefined;Object.defineProperty(UsageListInstance,"records",{get:function records(){if(!this._records){this._records=new s(this._version,this._solution.accountSid)}return this._records}});Object.defineProperty(UsageListInstance,"triggers",{get:function triggers(){if(!this._triggers){this._triggers=new r(this._version,this._solution.accountSid)}return this._triggers}});UsageListInstance.toJSON=function toJSON(){return this._solution};UsageListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return UsageListInstance};t.exports={UsageList:c}},35284:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(31425).AllTimeList;var c=i(82870).DailyList;var a=i(94550).LastMonthList;var u=i(95054).MonthlyList;var h=i(60938);var f=i(5046).ThisMonthList;var p=i(68529).TodayList;var d=i(7563).YearlyList;var l=i(11821).YesterdayList;var v=i(80513);var m=i(6372);var _=i(72142);var g;var y;var S;g=function RecordList(t,e){function RecordListInstance(t){return RecordListInstance.get(t)}RecordListInstance._version=t;RecordListInstance._solution={accountSid:e};RecordListInstance._uri=`/Accounts/${e}/Usage/Records.json`;RecordListInstance._allTime=undefined;RecordListInstance._daily=undefined;RecordListInstance._lastMonth=undefined;RecordListInstance._monthly=undefined;RecordListInstance._thisMonth=undefined;RecordListInstance._today=undefined;RecordListInstance._yearly=undefined;RecordListInstance._yesterday=undefined;RecordListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RecordListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RecordListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({Category:o.get(t,"category"),StartDate:m.iso8601Date(o.get(t,"startDate")),EndDate:m.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:m.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(RecordListInstance,"allTime",{get:function allTime(){if(!this._allTime){this._allTime=new r(this._version,this._solution.accountSid)}return this._allTime}});Object.defineProperty(RecordListInstance,"daily",{get:function daily(){if(!this._daily){this._daily=new c(this._version,this._solution.accountSid)}return this._daily}});Object.defineProperty(RecordListInstance,"lastMonth",{get:function lastMonth(){if(!this._lastMonth){this._lastMonth=new a(this._version,this._solution.accountSid)}return this._lastMonth}});Object.defineProperty(RecordListInstance,"monthly",{get:function monthly(){if(!this._monthly){this._monthly=new u(this._version,this._solution.accountSid)}return this._monthly}});Object.defineProperty(RecordListInstance,"thisMonth",{get:function thisMonth(){if(!this._thisMonth){this._thisMonth=new f(this._version,this._solution.accountSid)}return this._thisMonth}});Object.defineProperty(RecordListInstance,"today",{get:function today(){if(!this._today){this._today=new p(this._version,this._solution.accountSid)}return this._today}});Object.defineProperty(RecordListInstance,"yearly",{get:function yearly(){if(!this._yearly){this._yearly=new d(this._version,this._solution.accountSid)}return this._yearly}});Object.defineProperty(RecordListInstance,"yesterday",{get:function yesterday(){if(!this._yesterday){this._yesterday=new l(this._version,this._solution.accountSid)}return this._yesterday}});RecordListInstance.toJSON=function toJSON(){return this._solution};RecordListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordListInstance};y=function RecordPage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(y.prototype,h.prototype);y.prototype.constructor=y;y.prototype.getInstance=function getInstance(t){return new S(this._version,t,this._solution.accountSid)};y.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};S=function RecordInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=v.iso8601Date(e.end_date);this.price=v.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=v.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};S.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};S.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordList:g,RecordPage:y,RecordInstance:S}},31425:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function AllTimeList(t,e){function AllTimeListInstance(t){return AllTimeListInstance.get(t)}AllTimeListInstance._version=t;AllTimeListInstance._solution={accountSid:e};AllTimeListInstance._uri=`/Accounts/${e}/Usage/Records/AllTime.json`;AllTimeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AllTimeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AllTimeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AllTimeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AllTimeListInstance.toJSON=function toJSON(){return this._solution};AllTimeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AllTimeListInstance};f=function AllTimePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AllTimeInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AllTimeList:h,AllTimePage:f,AllTimeInstance:p}},82870:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function DailyList(t,e){function DailyListInstance(t){return DailyListInstance.get(t)}DailyListInstance._version=t;DailyListInstance._solution={accountSid:e};DailyListInstance._uri=`/Accounts/${e}/Usage/Records/Daily.json`;DailyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DailyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DailyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DailyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DailyListInstance.toJSON=function toJSON(){return this._solution};DailyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DailyListInstance};f=function DailyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DailyInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DailyList:h,DailyPage:f,DailyInstance:p}},94550:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function LastMonthList(t,e){function LastMonthListInstance(t){return LastMonthListInstance.get(t)}LastMonthListInstance._version=t;LastMonthListInstance._solution={accountSid:e};LastMonthListInstance._uri=`/Accounts/${e}/Usage/Records/LastMonth.json`;LastMonthListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};LastMonthListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};LastMonthListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LastMonthListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LastMonthListInstance.toJSON=function toJSON(){return this._solution};LastMonthListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return LastMonthListInstance};f=function LastMonthPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function LastMonthInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={LastMonthList:h,LastMonthPage:f,LastMonthInstance:p}},95054:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function MonthlyList(t,e){function MonthlyListInstance(t){return MonthlyListInstance.get(t)}MonthlyListInstance._version=t;MonthlyListInstance._solution={accountSid:e};MonthlyListInstance._uri=`/Accounts/${e}/Usage/Records/Monthly.json`;MonthlyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MonthlyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MonthlyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MonthlyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MonthlyListInstance.toJSON=function toJSON(){return this._solution};MonthlyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MonthlyListInstance};f=function MonthlyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MonthlyInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MonthlyList:h,MonthlyPage:f,MonthlyInstance:p}},5046:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function ThisMonthList(t,e){function ThisMonthListInstance(t){return ThisMonthListInstance.get(t)}ThisMonthListInstance._version=t;ThisMonthListInstance._solution={accountSid:e};ThisMonthListInstance._uri=`/Accounts/${e}/Usage/Records/ThisMonth.json`;ThisMonthListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ThisMonthListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ThisMonthListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ThisMonthListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ThisMonthListInstance.toJSON=function toJSON(){return this._solution};ThisMonthListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ThisMonthListInstance};f=function ThisMonthPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ThisMonthInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ThisMonthList:h,ThisMonthPage:f,ThisMonthInstance:p}},68529:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function TodayList(t,e){function TodayListInstance(t){return TodayListInstance.get(t)}TodayListInstance._version=t;TodayListInstance._solution={accountSid:e};TodayListInstance._uri=`/Accounts/${e}/Usage/Records/Today.json`;TodayListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TodayListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TodayListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TodayListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TodayListInstance.toJSON=function toJSON(){return this._solution};TodayListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TodayListInstance};f=function TodayPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TodayInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TodayList:h,TodayPage:f,TodayInstance:p}},7563:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function YearlyList(t,e){function YearlyListInstance(t){return YearlyListInstance.get(t)}YearlyListInstance._version=t;YearlyListInstance._solution={accountSid:e};YearlyListInstance._uri=`/Accounts/${e}/Usage/Records/Yearly.json`;YearlyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};YearlyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};YearlyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};YearlyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};YearlyListInstance.toJSON=function toJSON(){return this._solution};YearlyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return YearlyListInstance};f=function YearlyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function YearlyInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={YearlyList:h,YearlyPage:f,YearlyInstance:p}},11821:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function YesterdayList(t,e){function YesterdayListInstance(t){return YesterdayListInstance.get(t)}YesterdayListInstance._version=t;YesterdayListInstance._solution={accountSid:e};YesterdayListInstance._uri=`/Accounts/${e}/Usage/Records/Yesterday.json`;YesterdayListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};YesterdayListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};YesterdayListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Category:o.get(t,"category"),StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),IncludeSubaccounts:a.bool(o.get(t,"includeSubaccounts")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};YesterdayListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};YesterdayListInstance.toJSON=function toJSON(){return this._solution};YesterdayListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return YesterdayListInstance};f=function YesterdayPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.accountSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function YesterdayInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.asOf=e.as_of;this.category=e.category;this.count=e.count;this.countUnit=e.count_unit;this.description=e.description;this.endDate=c.iso8601Date(e.end_date);this.price=c.decimal(e.price);this.priceUnit=e.price_unit;this.startDate=c.iso8601Date(e.start_date);this.subresourceUris=e.subresource_uris;this.uri=e.uri;this.usage=e.usage;this.usageUnit=e.usage_unit;this._context=undefined;this._solution={accountSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={YesterdayList:h,YesterdayPage:f,YesterdayInstance:p}},36431:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TriggerList(t,e){function TriggerListInstance(t){return TriggerListInstance.get(t)}TriggerListInstance._version=t;TriggerListInstance._solution={accountSid:e};TriggerListInstance._uri=`/Accounts/${e}/Usage/Triggers.json`;TriggerListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.callbackUrl)){throw new Error('Required parameter "opts.callbackUrl" missing.')}if(o.isUndefined(t.triggerValue)){throw new Error('Required parameter "opts.triggerValue" missing.')}if(o.isUndefined(t.usageCategory)){throw new Error('Required parameter "opts.usageCategory" missing.')}var i=n.defer();var s=a.of({CallbackUrl:o.get(t,"callbackUrl"),TriggerValue:o.get(t,"triggerValue"),UsageCategory:o.get(t,"usageCategory"),CallbackMethod:o.get(t,"callbackMethod"),FriendlyName:o.get(t,"friendlyName"),Recurring:o.get(t,"recurring"),TriggerBy:o.get(t,"triggerBy")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TriggerListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TriggerListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TriggerListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Recurring:o.get(t,"recurring"),TriggerBy:o.get(t,"triggerBy"),UsageCategory:o.get(t,"usageCategory"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TriggerListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TriggerListInstance.get=function get(t){return new p(this._version,this._solution.accountSid,t)};TriggerListInstance.toJSON=function toJSON(){return this._solution};TriggerListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TriggerListInstance};h=function TriggerPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.accountSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TriggerInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.apiVersion=e.api_version;this.callbackMethod=e.callback_method;this.callbackUrl=e.callback_url;this.currentValue=e.current_value;this.dateCreated=c.rfc2822DateTime(e.date_created);this.dateFired=c.rfc2822DateTime(e.date_fired);this.dateUpdated=c.rfc2822DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.recurring=e.recurring;this.sid=e.sid;this.triggerBy=e.trigger_by;this.triggerValue=e.trigger_value;this.uri=e.uri;this.usageCategory=e.usage_category;this.usageRecordUri=e.usage_record_uri;this._context=undefined;this._solution={accountSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.accountSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TriggerContext(t,e,i){this._version=t;this._solution={accountSid:e,sid:i};this._uri=`/Accounts/${e}/Usage/Triggers/${i}.json`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.accountSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TriggerList:u,TriggerPage:h,TriggerInstance:f,TriggerContext:p}},86218:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function ValidationRequestList(t,e){function ValidationRequestListInstance(t){return ValidationRequestListInstance.get(t)}ValidationRequestListInstance._version=t;ValidationRequestListInstance._solution={accountSid:e};ValidationRequestListInstance._uri=`/Accounts/${e}/OutgoingCallerIds.json`;ValidationRequestListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumber)){throw new Error('Required parameter "opts.phoneNumber" missing.')}var i=n.defer();var s=c.of({PhoneNumber:o.get(t,"phoneNumber"),FriendlyName:o.get(t,"friendlyName"),CallDelay:o.get(t,"callDelay"),Extension:o.get(t,"extension"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ValidationRequestListInstance.toJSON=function toJSON(){return this._solution};ValidationRequestListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ValidationRequestListInstance};u=function ValidationRequestPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.accountSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ValidationRequestInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.callSid=e.call_sid;this.friendlyName=e.friendly_name;this.phoneNumber=e.phone_number;this.validationCode=e.validation_code;this._context=undefined;this._solution={accountSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ValidationRequestList:a,ValidationRequestPage:u,ValidationRequestInstance:h}},6522:(t,e,i)=>{"use strict";var n=i(90250);var o=i(86432).AssistantList;var s=i(68679).RestoreAssistantList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._assistants=undefined;this._restoreAssistant=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"assistants",{get:function(){this._assistants=this._assistants||new o(this);return this._assistants}});Object.defineProperty(V1.prototype,"restoreAssistant",{get:function(){this._restoreAssistant=this._restoreAssistant||new s(this);return this._restoreAssistant}});t.exports=V1},86432:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(72436).DefaultsList;var c=i(12256).DialogueList;var a=i(802).FieldTypeList;var u=i(18876).ModelBuildList;var h=i(60938);var f=i(26163).QueryList;var p=i(7122).StyleSheetList;var d=i(57106).TaskList;var l=i(27171).WebhookList;var v=i(80513);var m=i(6372);var _=i(72142);var g;var y;var S;var b;g=function AssistantList(t){function AssistantListInstance(t){return AssistantListInstance.get(t)}AssistantListInstance._version=t;AssistantListInstance._solution={};AssistantListInstance._uri=`/Assistants`;AssistantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssistantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssistantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({FriendlyName:o.get(t,"friendlyName"),LogQueries:m.bool(o.get(t,"logQueries")),UniqueName:o.get(t,"uniqueName"),CallbackUrl:o.get(t,"callbackUrl"),CallbackEvents:o.get(t,"callbackEvents"),StyleSheet:m.object(o.get(t,"styleSheet")),Defaults:m.object(o.get(t,"defaults"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new S(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.get=function get(t){return new b(this._version,t)};AssistantListInstance.toJSON=function toJSON(){return this._solution};AssistantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssistantListInstance};y=function AssistantPage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(y.prototype,h.prototype);y.prototype.constructor=y;y.prototype.getInstance=function getInstance(t){return new S(this._version,t)};y.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};S=function AssistantInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.dateCreated=v.iso8601DateTime(e.date_created);this.dateUpdated=v.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.latestModelBuildSid=e.latest_model_build_sid;this.links=e.links;this.logQueries=e.log_queries;this.developmentStage=e.development_stage;this.needsModelBuild=e.needs_model_build;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this.callbackUrl=e.callback_url;this.callbackEvents=e.callback_events;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(S.prototype,"_proxy",{get:function(){if(!this._context){this._context=new b(this._version,this._solution.sid)}return this._context}});S.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};S.prototype.update=function update(t,e){return this._proxy.update(t,e)};S.prototype.remove=function remove(t){return this._proxy.remove(t)};S.prototype.fieldTypes=function fieldTypes(){return this._proxy.fieldTypes};S.prototype.tasks=function tasks(){return this._proxy.tasks};S.prototype.modelBuilds=function modelBuilds(){return this._proxy.modelBuilds};S.prototype.queries=function queries(){return this._proxy.queries};S.prototype.styleSheet=function styleSheet(){return this._proxy.styleSheet};S.prototype.defaults=function defaults(){return this._proxy.defaults};S.prototype.dialogues=function dialogues(){return this._proxy.dialogues};S.prototype.webhooks=function webhooks(){return this._proxy.webhooks};S.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};S.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};b=function AssistantContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Assistants/${e}`;this._fieldTypes=undefined;this._tasks=undefined;this._modelBuilds=undefined;this._queries=undefined;this._styleSheet=undefined;this._defaults=undefined;this._dialogues=undefined;this._webhooks=undefined};b.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new S(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};b.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({FriendlyName:o.get(t,"friendlyName"),LogQueries:m.bool(o.get(t,"logQueries")),UniqueName:o.get(t,"uniqueName"),CallbackUrl:o.get(t,"callbackUrl"),CallbackEvents:o.get(t,"callbackEvents"),StyleSheet:m.object(o.get(t,"styleSheet")),Defaults:m.object(o.get(t,"defaults")),DevelopmentStage:o.get(t,"developmentStage")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new S(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};b.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(b.prototype,"fieldTypes",{get:function(){if(!this._fieldTypes){this._fieldTypes=new a(this._version,this._solution.sid)}return this._fieldTypes}});Object.defineProperty(b.prototype,"tasks",{get:function(){if(!this._tasks){this._tasks=new d(this._version,this._solution.sid)}return this._tasks}});Object.defineProperty(b.prototype,"modelBuilds",{get:function(){if(!this._modelBuilds){this._modelBuilds=new u(this._version,this._solution.sid)}return this._modelBuilds}});Object.defineProperty(b.prototype,"queries",{get:function(){if(!this._queries){this._queries=new f(this._version,this._solution.sid)}return this._queries}});Object.defineProperty(b.prototype,"styleSheet",{get:function(){if(!this._styleSheet){this._styleSheet=new p(this._version,this._solution.sid)}return this._styleSheet}});Object.defineProperty(b.prototype,"defaults",{get:function(){if(!this._defaults){this._defaults=new r(this._version,this._solution.sid)}return this._defaults}});Object.defineProperty(b.prototype,"dialogues",{get:function(){if(!this._dialogues){this._dialogues=new c(this._version,this._solution.sid)}return this._dialogues}});Object.defineProperty(b.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new l(this._version,this._solution.sid)}return this._webhooks}});b.prototype.toJSON=function toJSON(){return this._solution};b.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssistantList:g,AssistantPage:y,AssistantInstance:S,AssistantContext:b}},72436:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function DefaultsList(t,e){function DefaultsListInstance(t){return DefaultsListInstance.get(t)}DefaultsListInstance._version=t;DefaultsListInstance._solution={assistantSid:e};DefaultsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid)};DefaultsListInstance.toJSON=function toJSON(){return this._solution};DefaultsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DefaultsListInstance};h=function DefaultsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DefaultsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DefaultsContext(t,e){this._version=t;this._solution={assistantSid:e};this._uri=`/Assistants/${e}/Defaults`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Defaults:c.object(o.get(t,"defaults"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DefaultsList:u,DefaultsPage:h,DefaultsInstance:f,DefaultsContext:p}},12256:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function DialogueList(t,e){function DialogueListInstance(t){return DialogueListInstance.get(t)}DialogueListInstance._version=t;DialogueListInstance._solution={assistantSid:e};DialogueListInstance.get=function get(t){return new f(this._version,this._solution.assistantSid,t)};DialogueListInstance.toJSON=function toJSON(){return this._solution};DialogueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DialogueListInstance};u=function DialoguePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.assistantSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function DialogueInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.data=e.data;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DialogueContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Dialogues/${i}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DialogueList:a,DialoguePage:u,DialogueInstance:h,DialogueContext:f}},802:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(1927).FieldValueList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function FieldTypeList(t,e){function FieldTypeListInstance(t){return FieldTypeListInstance.get(t)}FieldTypeListInstance._version=t;FieldTypeListInstance._solution={assistantSid:e};FieldTypeListInstance._uri=`/Assistants/${e}/FieldTypes`;FieldTypeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldTypeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldTypeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.get=function get(t){return new d(this._version,this._solution.assistantSid,t)};FieldTypeListInstance.toJSON=function toJSON(){return this._solution};FieldTypeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldTypeListInstance};f=function FieldTypePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.assistantSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldTypeInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.links=e.links;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fieldValues=function fieldValues(){return this._proxy.fieldValues};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FieldTypeContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/FieldTypes/${i}`;this._fieldValues=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"fieldValues",{get:function(){if(!this._fieldValues){this._fieldValues=new r(this._version,this._solution.assistantSid,this._solution.sid)}return this._fieldValues}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldTypeList:h,FieldTypePage:f,FieldTypeInstance:p,FieldTypeContext:d}},1927:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FieldValueList(t,e,i){function FieldValueListInstance(t){return FieldValueListInstance.get(t)}FieldValueListInstance._version=t;FieldValueListInstance._solution={assistantSid:e,fieldTypeSid:i};FieldValueListInstance._uri=`/Assistants/${e}/FieldTypes/${i}/FieldValues`;FieldValueListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldValueListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldValueListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.value)){throw new Error('Required parameter "opts.value" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),Value:o.get(t,"value"),SynonymOf:o.get(t,"synonymOf")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.fieldTypeSid,t)};FieldValueListInstance.toJSON=function toJSON(){return this._solution};FieldValueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldValueListInstance};h=function FieldValuePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FieldValueInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.fieldTypeSid=e.field_type_sid;this.language=e.language;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.value=e.value;this.url=e.url;this.synonymOf=e.synonym_of;this._context=undefined;this._solution={assistantSid:i,fieldTypeSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldValueContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,fieldTypeSid:i,sid:n};this._uri=`/Assistants/${e}/FieldTypes/${i}/FieldValues/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldValueList:u,FieldValuePage:h,FieldValueInstance:f,FieldValueContext:p}},18876:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ModelBuildList(t,e){function ModelBuildListInstance(t){return ModelBuildListInstance.get(t)}ModelBuildListInstance._version=t;ModelBuildListInstance._solution={assistantSid:e};ModelBuildListInstance._uri=`/Assistants/${e}/ModelBuilds`;ModelBuildListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ModelBuildListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ModelBuildListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({StatusCallback:o.get(t,"statusCallback"),UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,t)};ModelBuildListInstance.toJSON=function toJSON(){return this._solution};ModelBuildListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ModelBuildListInstance};h=function ModelBuildPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ModelBuildInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.assistantSid=e.assistant_sid;this.sid=e.sid;this.status=e.status;this.uniqueName=e.unique_name;this.url=e.url;this.buildDuration=c.integer(e.build_duration);this.errorCode=c.integer(e.error_code);this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ModelBuildContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/ModelBuilds/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ModelBuildList:u,ModelBuildPage:h,ModelBuildInstance:f,ModelBuildContext:p}},26163:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function QueryList(t,e){function QueryListInstance(t){return QueryListInstance.get(t)}QueryListInstance._version=t;QueryListInstance._solution={assistantSid:e};QueryListInstance._uri=`/Assistants/${e}/Queries`;QueryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};QueryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};QueryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),ModelBuild:o.get(t,"modelBuild"),Status:o.get(t,"status"),DialogueSid:o.get(t,"dialogueSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.query)){throw new Error('Required parameter "opts.query" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),Query:o.get(t,"query"),Tasks:o.get(t,"tasks"),ModelBuild:o.get(t,"modelBuild")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,t)};QueryListInstance.toJSON=function toJSON(){return this._solution};QueryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return QueryListInstance};h=function QueryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function QueryInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.results=e.results;this.language=e.language;this.modelBuildSid=e.model_build_sid;this.query=e.query;this.sampleSid=e.sample_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.status=e.status;this.url=e.url;this.sourceChannel=e.source_channel;this.dialogueSid=e.dialogue_sid;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function QueryContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Queries/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({SampleSid:o.get(t,"sampleSid"),Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={QueryList:u,QueryPage:h,QueryInstance:f,QueryContext:p}},7122:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function StyleSheetList(t,e){function StyleSheetListInstance(t){return StyleSheetListInstance.get(t)}StyleSheetListInstance._version=t;StyleSheetListInstance._solution={assistantSid:e};StyleSheetListInstance.get=function get(){return new p(this._version,this._solution.assistantSid)};StyleSheetListInstance.toJSON=function toJSON(){return this._solution};StyleSheetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return StyleSheetListInstance};h=function StyleSheetPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function StyleSheetInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function StyleSheetContext(t,e){this._version=t;this._solution={assistantSid:e};this._uri=`/Assistants/${e}/StyleSheet`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({StyleSheet:c.object(o.get(t,"styleSheet"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={StyleSheetList:u,StyleSheetPage:h,StyleSheetInstance:f,StyleSheetContext:p}},57106:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(58890).FieldList;var c=i(60938);var a=i(75161).SampleList;var u=i(93076).TaskActionsList;var h=i(5664).TaskStatisticsList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function TaskList(t,e){function TaskListInstance(t){return TaskListInstance.get(t)}TaskListInstance._version=t;TaskListInstance._solution={assistantSid:e};TaskListInstance._uri=`/Assistants/${e}/Tasks`;TaskListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=d.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),Actions:p.object(o.get(t,"actions")),ActionsUrl:o.get(t,"actionsUrl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.get=function get(t){return new _(this._version,this._solution.assistantSid,t)};TaskListInstance.toJSON=function toJSON(){return this._solution};TaskListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskListInstance};v=function TaskPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,c.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t,this._solution.assistantSid)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function TaskInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.links=e.links;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.actionsUrl=e.actions_url;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.fields=function fields(){return this._proxy.fields};m.prototype.samples=function samples(){return this._proxy.samples};m.prototype.taskActions=function taskActions(){return this._proxy.taskActions};m.prototype.statistics=function statistics(){return this._proxy.statistics};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function TaskContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Tasks/${i}`;this._fields=undefined;this._samples=undefined;this._taskActions=undefined;this._statistics=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Actions:p.object(o.get(t,"actions")),ActionsUrl:o.get(t,"actionsUrl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(_.prototype,"fields",{get:function(){if(!this._fields){this._fields=new r(this._version,this._solution.assistantSid,this._solution.sid)}return this._fields}});Object.defineProperty(_.prototype,"samples",{get:function(){if(!this._samples){this._samples=new a(this._version,this._solution.assistantSid,this._solution.sid)}return this._samples}});Object.defineProperty(_.prototype,"taskActions",{get:function(){if(!this._taskActions){this._taskActions=new u(this._version,this._solution.assistantSid,this._solution.sid)}return this._taskActions}});Object.defineProperty(_.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new h(this._version,this._solution.assistantSid,this._solution.sid)}return this._statistics}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskList:l,TaskPage:v,TaskInstance:m,TaskContext:_}},58890:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FieldList(t,e,i){function FieldListInstance(t){return FieldListInstance.get(t)}FieldListInstance._version=t;FieldListInstance._solution={assistantSid:e,taskSid:i};FieldListInstance._uri=`/Assistants/${e}/Tasks/${i}/Fields`;FieldListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.fieldType)){throw new Error('Required parameter "opts.fieldType" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=a.of({FieldType:o.get(t,"fieldType"),UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.taskSid,t)};FieldListInstance.toJSON=function toJSON(){return this._solution};FieldListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldListInstance};h=function FieldPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FieldInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.fieldType=e.field_type;this.taskSid=e.task_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,taskSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,taskSid:i,sid:n};this._uri=`/Assistants/${e}/Tasks/${i}/Fields/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldList:u,FieldPage:h,FieldInstance:f,FieldContext:p}},75161:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SampleList(t,e,i){function SampleListInstance(t){return SampleListInstance.get(t)}SampleListInstance._version=t;SampleListInstance._solution={assistantSid:e,taskSid:i};SampleListInstance._uri=`/Assistants/${e}/Tasks/${i}/Samples`;SampleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SampleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SampleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.taggedText)){throw new Error('Required parameter "opts.taggedText" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),TaggedText:o.get(t,"taggedText"),SourceChannel:o.get(t,"sourceChannel")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.taskSid,t)};SampleListInstance.toJSON=function toJSON(){return this._solution};SampleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SampleListInstance};h=function SamplePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SampleInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.taskSid=e.task_sid;this.language=e.language;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.taggedText=e.tagged_text;this.url=e.url;this.sourceChannel=e.source_channel;this._context=undefined;this._solution={assistantSid:i,taskSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SampleContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,taskSid:i,sid:n};this._uri=`/Assistants/${e}/Tasks/${i}/Samples/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),TaggedText:o.get(t,"taggedText"),SourceChannel:o.get(t,"sourceChannel")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SampleList:u,SamplePage:h,SampleInstance:f,SampleContext:p}},93076:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function TaskActionsList(t,e,i){function TaskActionsListInstance(t){return TaskActionsListInstance.get(t)}TaskActionsListInstance._version=t;TaskActionsListInstance._solution={assistantSid:e,taskSid:i};TaskActionsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid,this._solution.taskSid)};TaskActionsListInstance.toJSON=function toJSON(){return this._solution};TaskActionsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskActionsListInstance};h=function TaskActionsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskActionsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.taskSid=e.task_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i,taskSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskActionsContext(t,e,i){this._version=t;this._solution={assistantSid:e,taskSid:i};this._uri=`/Assistants/${e}/Tasks/${i}/Actions`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Actions:c.object(o.get(t,"actions"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskActionsList:u,TaskActionsPage:h,TaskActionsInstance:f,TaskActionsContext:p}},5664:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TaskStatisticsList(t,e,i){function TaskStatisticsListInstance(t){return TaskStatisticsListInstance.get(t)}TaskStatisticsListInstance._version=t;TaskStatisticsListInstance._solution={assistantSid:e,taskSid:i};TaskStatisticsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid,this._solution.taskSid)};TaskStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskStatisticsListInstance};h=function TaskStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.taskSid=e.task_sid;this.samplesCount=c.integer(e.samples_count);this.fieldsCount=c.integer(e.fields_count);this.url=e.url;this._context=undefined;this._solution={assistantSid:i,taskSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskStatisticsContext(t,e,i){this._version=t;this._solution={assistantSid:e,taskSid:i};this._uri=`/Assistants/${e}/Tasks/${i}/Statistics`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskStatisticsList:u,TaskStatisticsPage:h,TaskStatisticsInstance:f,TaskStatisticsContext:p}},27171:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function WebhookList(t,e){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={assistantSid:e};WebhookListInstance._uri=`/Assistants/${e}/Webhooks`;WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}if(o.isUndefined(t.events)){throw new Error('Required parameter "opts.events" missing.')}if(o.isUndefined(t.webhookUrl)){throw new Error('Required parameter "opts.webhookUrl" missing.')}var i=n.defer();var s=a.of({UniqueName:o.get(t,"uniqueName"),Events:o.get(t,"events"),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};h=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WebhookInstance(t,e,i,n){this._version=t;this.url=e.url;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.events=e.events;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Webhooks/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({UniqueName:o.get(t,"uniqueName"),Events:o.get(t,"events"),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:u,WebhookPage:h,WebhookInstance:f,WebhookContext:p}},68679:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function RestoreAssistantList(t){function RestoreAssistantListInstance(t){return RestoreAssistantListInstance.get(t)}RestoreAssistantListInstance._version=t;RestoreAssistantListInstance._solution={};RestoreAssistantListInstance._uri=`/Assistants/Restore`;RestoreAssistantListInstance.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.assistant)){throw new Error('Required parameter "opts.assistant" missing.')}var i=n.defer();var s=a.of({Assistant:o.get(t,"assistant")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RestoreAssistantListInstance.toJSON=function toJSON(){return this._solution};RestoreAssistantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RestoreAssistantListInstance};h=function RestoreAssistantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function RestoreAssistantInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.uniqueName=e.unique_name;this.friendlyName=e.friendly_name;this.needsModelBuild=e.needs_model_build;this.latestModelBuildSid=e.latest_model_build_sid;this.logQueries=e.log_queries;this.developmentStage=e.development_stage;this.callbackUrl=e.callback_url;this.callbackEvents=e.callback_events;this._context=undefined;this._solution={}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RestoreAssistantList:u,RestoreAssistantPage:h,RestoreAssistantInstance:f}},51999:(t,e,i)=>{"use strict";var n=i(90250);var o=i(21256).ExportConfigurationList;var s=i(45832).ExportList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._exports=undefined;this._exportConfiguration=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"exports",{get:function(){this._exports=this._exports||new s(this);return this._exports}});Object.defineProperty(V1.prototype,"exportConfiguration",{get:function(){this._exportConfiguration=this._exportConfiguration||new o(this);return this._exportConfiguration}});t.exports=V1},45832:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(30521).DayList;var c=i(64555).ExportCustomJobList;var a=i(62753).JobList;var u=i(60938);var h=i(72142);var f;var p;var d;var l;f=function ExportList(t){function ExportListInstance(t){return ExportListInstance.get(t)}ExportListInstance._version=t;ExportListInstance._solution={};ExportListInstance._jobs=undefined;ExportListInstance.get=function get(t){return new l(this._version,t)};Object.defineProperty(ExportListInstance,"jobs",{get:function jobs(){if(!this._jobs){this._jobs=new a(this._version)}return this._jobs}});ExportListInstance.toJSON=function toJSON(){return this._solution};ExportListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportListInstance};p=function ExportPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,u.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ExportInstance(t,e,i){this._version=t;this.resourceType=e.resource_type;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={resourceType:i||this.resourceType}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.resourceType)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.days=function days(){return this._proxy.days};d.prototype.exportCustomJobs=function exportCustomJobs(){return this._proxy.exportCustomJobs};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ExportContext(t,e){this._version=t;this._solution={resourceType:e};this._uri=`/Exports/${e}`;this._days=undefined;this._exportCustomJobs=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.resourceType))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"days",{get:function(){if(!this._days){this._days=new r(this._version,this._solution.resourceType)}return this._days}});Object.defineProperty(l.prototype,"exportCustomJobs",{get:function(){if(!this._exportCustomJobs){this._exportCustomJobs=new c(this._version,this._solution.resourceType)}return this._exportCustomJobs}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportList:f,ExportPage:p,ExportInstance:d,ExportContext:l}},30521:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DayList(t,e){function DayListInstance(t){return DayListInstance.get(t)}DayListInstance._version=t;DayListInstance._solution={resourceType:e};DayListInstance._uri=`/Exports/${e}/Days`;DayListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DayListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DayListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DayListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DayListInstance.get=function get(t){return new p(this._version,this._solution.resourceType,t)};DayListInstance.toJSON=function toJSON(){return this._solution};DayListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DayListInstance};h=function DayPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.resourceType)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DayInstance(t,e,i,n){this._version=t;this.redirectTo=e.redirect_to;this.day=e.day;this.size=c.integer(e.size);this.createDate=e.create_date;this.friendlyName=e.friendly_name;this.resourceType=e.resource_type;this._context=undefined;this._solution={resourceType:i,day:n||this.day}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.resourceType,this._solution.day)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DayContext(t,e,i){this._version=t;this._solution={resourceType:e,day:i};this._uri=`/Exports/${e}/Days/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.resourceType,this._solution.day))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DayList:u,DayPage:h,DayInstance:f,DayContext:p}},64555:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function ExportCustomJobList(t,e){function ExportCustomJobListInstance(t){return ExportCustomJobListInstance.get(t)}ExportCustomJobListInstance._version=t;ExportCustomJobListInstance._solution={resourceType:e};ExportCustomJobListInstance._uri=`/Exports/${e}/Jobs`;ExportCustomJobListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExportCustomJobListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExportCustomJobListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.startDay)){throw new Error('Required parameter "opts.startDay" missing.')}if(o.isUndefined(t.endDay)){throw new Error('Required parameter "opts.endDay" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=c.of({StartDay:o.get(t,"startDay"),EndDay:o.get(t,"endDay"),FriendlyName:o.get(t,"friendlyName"),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),Email:o.get(t,"email")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.toJSON=function toJSON(){return this._solution};ExportCustomJobListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportCustomJobListInstance};u=function ExportCustomJobPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.resourceType)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExportCustomJobInstance(t,e,i){this._version=t;this.friendlyName=e.friendly_name;this.resourceType=e.resource_type;this.startDay=e.start_day;this.endDay=e.end_day;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.email=e.email;this.jobSid=e.job_sid;this.details=e.details;this._context=undefined;this._solution={resourceType:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportCustomJobList:a,ExportCustomJobPage:u,ExportCustomJobInstance:h}},62753:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function JobList(t){function JobListInstance(t){return JobListInstance.get(t)}JobListInstance._version=t;JobListInstance._solution={};JobListInstance.get=function get(t){return new f(this._version,t)};JobListInstance.toJSON=function toJSON(){return this._solution};JobListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return JobListInstance};u=function JobPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function JobInstance(t,e,i){this._version=t;this.resourceType=e.resource_type;this.friendlyName=e.friendly_name;this.details=e.details;this.startDay=e.start_day;this.endDay=e.end_day;this.jobSid=e.job_sid;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.email=e.email;this.url=e.url;this._context=undefined;this._solution={jobSid:i||this.jobSid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.jobSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.remove=function remove(t){return this._proxy.remove(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function JobContext(t,e){this._version=t;this._solution={jobSid:e};this._uri=`/Exports/Jobs/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.jobSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={JobList:a,JobPage:u,JobInstance:h,JobContext:f}},21256:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function ExportConfigurationList(t){function ExportConfigurationListInstance(t){return ExportConfigurationListInstance.get(t)}ExportConfigurationListInstance._version=t;ExportConfigurationListInstance._solution={};ExportConfigurationListInstance.get=function get(t){return new p(this._version,t)};ExportConfigurationListInstance.toJSON=function toJSON(){return this._solution};ExportConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportConfigurationListInstance};h=function ExportConfigurationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExportConfigurationInstance(t,e,i){this._version=t;this.enabled=e.enabled;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.resourceType=e.resource_type;this.url=e.url;this._context=undefined;this._solution={resourceType:i||this.resourceType}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.resourceType)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ExportConfigurationContext(t,e){this._version=t;this._solution={resourceType:e};this._uri=`/Exports/${e}/Configuration`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.resourceType))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Enabled:c.bool(o.get(t,"enabled")),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.resourceType))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportConfigurationList:u,ExportConfigurationPage:h,ExportConfigurationInstance:f,ExportConfigurationContext:p}},21772:(t,e,i)=>{"use strict";var n=i(90250);var o=i(6421).CredentialList;var s=i(41460).ServiceList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._credentials=undefined;this._services=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"credentials",{get:function(){this._credentials=this._credentials||new o(this);return this._credentials}});Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V1},65979:(t,e,i)=>{"use strict";var n=i(90250);var o=i(15538).CredentialList;var s=i(50326).ServiceList;var r=i(64351);function V2(t){r.prototype.constructor.call(this,t,"v2");this._credentials=undefined;this._services=undefined}n.extend(V2.prototype,r.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"credentials",{get:function(){this._credentials=this._credentials||new o(this);return this._credentials}});Object.defineProperty(V2.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V2},6421:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},41460:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(15715).ChannelList;var c=i(60938);var a=i(92186).RoleList;var u=i(54100).UserList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new m(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};l=function ServicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.defaultServiceRoleSid=e.default_service_role_sid;this.defaultChannelRoleSid=e.default_channel_role_sid;this.defaultChannelCreatorRoleSid=e.default_channel_creator_role_sid;this.readStatusEnabled=e.read_status_enabled;this.reachabilityEnabled=e.reachability_enabled;this.typingIndicatorTimeout=h.integer(e.typing_indicator_timeout);this.consumptionReportInterval=h.integer(e.consumption_report_interval);this.limits=e.limits;this.webhooks=e.webhooks;this.preWebhookUrl=e.pre_webhook_url;this.postWebhookUrl=e.post_webhook_url;this.webhookMethod=e.webhook_method;this.webhookFilters=e.webhook_filters;this.notifications=e.notifications;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.channels=function channels(){return this._proxy.channels};v.prototype.roles=function roles(){return this._proxy.roles};v.prototype.users=function users(){return this._proxy.users};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._channels=undefined;this._roles=undefined;this._users=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),DefaultServiceRoleSid:o.get(t,"defaultServiceRoleSid"),DefaultChannelRoleSid:o.get(t,"defaultChannelRoleSid"),DefaultChannelCreatorRoleSid:o.get(t,"defaultChannelCreatorRoleSid"),ReadStatusEnabled:f.bool(o.get(t,"readStatusEnabled")),ReachabilityEnabled:f.bool(o.get(t,"reachabilityEnabled")),TypingIndicatorTimeout:o.get(t,"typingIndicatorTimeout"),ConsumptionReportInterval:o.get(t,"consumptionReportInterval"),"Notifications.NewMessage.Enabled":f.bool(o.get(t,"notifications.newMessage.enabled")),"Notifications.NewMessage.Template":o.get(t,"notifications.newMessage.template"),"Notifications.AddedToChannel.Enabled":f.bool(o.get(t,"notifications.addedToChannel.enabled")),"Notifications.AddedToChannel.Template":o.get(t,"notifications.addedToChannel.template"),"Notifications.RemovedFromChannel.Enabled":f.bool(o.get(t,"notifications.removedFromChannel.enabled")),"Notifications.RemovedFromChannel.Template":o.get(t,"notifications.removedFromChannel.template"),"Notifications.InvitedToChannel.Enabled":f.bool(o.get(t,"notifications.invitedToChannel.enabled")),"Notifications.InvitedToChannel.Template":o.get(t,"notifications.invitedToChannel.template"),PreWebhookUrl:o.get(t,"preWebhookUrl"),PostWebhookUrl:o.get(t,"postWebhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),WebhookFilters:f.map(o.get(t,"webhookFilters"),function(t){return t}),"Webhooks.OnMessageSend.Url":o.get(t,"webhooks.onMessageSend.url"),"Webhooks.OnMessageSend.Method":o.get(t,"webhooks.onMessageSend.method"),"Webhooks.OnMessageUpdate.Url":o.get(t,"webhooks.onMessageUpdate.url"),"Webhooks.OnMessageUpdate.Method":o.get(t,"webhooks.onMessageUpdate.method"),"Webhooks.OnMessageRemove.Url":o.get(t,"webhooks.onMessageRemove.url"),"Webhooks.OnMessageRemove.Method":o.get(t,"webhooks.onMessageRemove.method"),"Webhooks.OnChannelAdd.Url":o.get(t,"webhooks.onChannelAdd.url"),"Webhooks.OnChannelAdd.Method":o.get(t,"webhooks.onChannelAdd.method"),"Webhooks.OnChannelDestroy.Url":o.get(t,"webhooks.onChannelDestroy.url"),"Webhooks.OnChannelDestroy.Method":o.get(t,"webhooks.onChannelDestroy.method"),"Webhooks.OnChannelUpdate.Url":o.get(t,"webhooks.onChannelUpdate.url"),"Webhooks.OnChannelUpdate.Method":o.get(t,"webhooks.onChannelUpdate.method"),"Webhooks.OnMemberAdd.Url":o.get(t,"webhooks.onMemberAdd.url"),"Webhooks.OnMemberAdd.Method":o.get(t,"webhooks.onMemberAdd.method"),"Webhooks.OnMemberRemove.Url":o.get(t,"webhooks.onMemberRemove.url"),"Webhooks.OnMemberRemove.Method":o.get(t,"webhooks.onMemberRemove.method"),"Webhooks.OnMessageSent.Url":o.get(t,"webhooks.onMessageSent.url"),"Webhooks.OnMessageSent.Method":o.get(t,"webhooks.onMessageSent.method"),"Webhooks.OnMessageUpdated.Url":o.get(t,"webhooks.onMessageUpdated.url"),"Webhooks.OnMessageUpdated.Method":o.get(t,"webhooks.onMessageUpdated.method"),"Webhooks.OnMessageRemoved.Url":o.get(t,"webhooks.onMessageRemoved.url"),"Webhooks.OnMessageRemoved.Method":o.get(t,"webhooks.onMessageRemoved.method"),"Webhooks.OnChannelAdded.Url":o.get(t,"webhooks.onChannelAdded.url"),"Webhooks.OnChannelAdded.Method":o.get(t,"webhooks.onChannelAdded.method"),"Webhooks.OnChannelDestroyed.Url":o.get(t,"webhooks.onChannelDestroyed.url"),"Webhooks.OnChannelDestroyed.Method":o.get(t,"webhooks.onChannelDestroyed.method"),"Webhooks.OnChannelUpdated.Url":o.get(t,"webhooks.onChannelUpdated.url"),"Webhooks.OnChannelUpdated.Method":o.get(t,"webhooks.onChannelUpdated.method"),"Webhooks.OnMemberAdded.Url":o.get(t,"webhooks.onMemberAdded.url"),"Webhooks.OnMemberAdded.Method":o.get(t,"webhooks.onMemberAdded.method"),"Webhooks.OnMemberRemoved.Url":o.get(t,"webhooks.onMemberRemoved.url"),"Webhooks.OnMemberRemoved.Method":o.get(t,"webhooks.onMemberRemoved.method"),"Limits.ChannelMembers":o.get(t,"limits.channelMembers"),"Limits.UserChannels":o.get(t,"limits.userChannels")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"channels",{get:function(){if(!this._channels){this._channels=new r(this._version,this._solution.sid)}return this._channels}});Object.defineProperty(m.prototype,"roles",{get:function(){if(!this._roles){this._roles=new a(this._version,this._solution.sid)}return this._roles}});Object.defineProperty(m.prototype,"users",{get:function(){if(!this._users){this._users=new u(this._version,this._solution.sid)}return this._users}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:d,ServicePage:l,ServiceInstance:v,ServiceContext:m}},15715:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(17512).InviteList;var c=i(95993).MemberList;var a=i(80444).MessageList;var u=i(60938);var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ChannelList(t,e){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={serviceSid:e};ChannelListInstance._uri=`/Services/${e}/Channels`;ChannelListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),Type:o.get(t,"type")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({Type:f.map(o.get(t,"type"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.get=function get(t){return new m(this._version,this._solution.serviceSid,t)};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};l=function ChannelPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,u.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.serviceSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ChannelInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.type=e.type;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this.membersCount=h.integer(e.members_count);this.messagesCount=h.integer(e.messages_count);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.members=function members(){return this._proxy.members};v.prototype.messages=function messages(){return this._proxy.messages};v.prototype.invites=function invites(){return this._proxy.invites};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ChannelContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Channels/${i}`;this._members=undefined;this._messages=undefined;this._invites=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"members",{get:function(){if(!this._members){this._members=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._members}});Object.defineProperty(m.prototype,"messages",{get:function(){if(!this._messages){this._messages=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._messages}});Object.defineProperty(m.prototype,"invites",{get:function(){if(!this._invites){this._invites=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._invites}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:d,ChannelPage:l,ChannelInstance:v,ChannelContext:m}},17512:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function InviteList(t,e,i){function InviteListInstance(t){return InviteListInstance.get(t)}InviteListInstance._version=t;InviteListInstance._solution={serviceSid:e,channelSid:i};InviteListInstance._uri=`/Services/${e}/Channels/${i}/Invites`;InviteListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InviteListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InviteListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};InviteListInstance.toJSON=function toJSON(){return this._solution};InviteListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InviteListInstance};f=function InvitePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InviteInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.createdBy=e.created_by;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function InviteContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Invites/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InviteList:h,InvitePage:f,InviteInstance:p,InviteContext:d}},95993:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MemberList(t,e,i){function MemberListInstance(t){return MemberListInstance.get(t)}MemberListInstance._version=t;MemberListInstance._solution={serviceSid:e,channelSid:i};MemberListInstance._uri=`/Services/${e}/Channels/${i}/Members`;MemberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MemberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MemberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MemberListInstance.toJSON=function toJSON(){return this._solution};MemberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MemberListInstance};f=function MemberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MemberInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.lastConsumptionTimestamp=c.iso8601DateTime(e.last_consumption_timestamp);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MemberContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Members/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MemberList:h,MemberPage:f,MemberInstance:p,MemberContext:d}},80444:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function MessageList(t,e,i){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={serviceSid:e,channelSid:i};MessageListInstance._uri=`/Services/${e}/Channels/${i}/Messages`;MessageListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.body)){throw new Error('Required parameter "opts.body" missing.')}var i=n.defer();var s=a.of({Body:o.get(t,"body"),From:o.get(t,"from"),Attributes:o.get(t,"attributes")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Order:o.get(t,"order"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};h=function MessagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.channelSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function MessageInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.attributes=e.attributes;this.serviceSid=e.service_sid;this.to=e.to;this.channelSid=e.channel_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.wasEdited=e.was_edited;this.from=e.from;this.body=e.body;this.index=c.integer(e.index);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessageContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Messages/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Body:o.get(t,"body"),Attributes:o.get(t,"attributes")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:u,MessagePage:h,MessageInstance:f,MessageContext:p}},92186:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t,e){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={serviceSid:e};RoleListInstance._uri=`/Services/${e}/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Roles/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},54100:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(55659).UserChannelList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function UserList(t,e){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={serviceSid:e};UserListInstance._uri=`/Services/${e}/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};f=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.attributes=e.attributes;this.friendlyName=e.friendly_name;this.roleSid=e.role_sid;this.identity=e.identity;this.isOnline=e.is_online;this.isNotifiable=e.is_notifiable;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.joinedChannelsCount=a.integer(e.joined_channels_count);this.links=e.links;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.userChannels=function userChannels(){return this._proxy.userChannels};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Users/${i}`;this._userChannels=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"userChannels",{get:function(){if(!this._userChannels){this._userChannels=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._userChannels}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:h,UserPage:f,UserInstance:p,UserContext:d}},55659:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function UserChannelList(t,e,i){function UserChannelListInstance(t){return UserChannelListInstance.get(t)}UserChannelListInstance._version=t;UserChannelListInstance._solution={serviceSid:e,userSid:i};UserChannelListInstance._uri=`/Services/${e}/Users/${i}/Channels`;UserChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.toJSON=function toJSON(){return this._solution};UserChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserChannelListInstance};h=function UserChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.userSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UserChannelInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.memberSid=e.member_sid;this.status=e.status;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.unreadMessagesCount=c.integer(e.unread_messages_count);this.links=e.links;this._context=undefined;this._solution={serviceSid:i,userSid:n}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserChannelList:u,UserChannelPage:h,UserChannelInstance:f}},15538:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},50326:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(20318).BindingList;var c=i(54286).ChannelList;var a=i(60938);var u=i(38583).RoleList;var h=i(28308).UserList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new _(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};v=function ServicePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,a.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.defaultServiceRoleSid=e.default_service_role_sid;this.defaultChannelRoleSid=e.default_channel_role_sid;this.defaultChannelCreatorRoleSid=e.default_channel_creator_role_sid;this.readStatusEnabled=e.read_status_enabled;this.reachabilityEnabled=e.reachability_enabled;this.typingIndicatorTimeout=f.integer(e.typing_indicator_timeout);this.consumptionReportInterval=f.integer(e.consumption_report_interval);this.limits=e.limits;this.preWebhookUrl=e.pre_webhook_url;this.postWebhookUrl=e.post_webhook_url;this.webhookMethod=e.webhook_method;this.webhookFilters=e.webhook_filters;this.preWebhookRetryCount=f.integer(e.pre_webhook_retry_count);this.postWebhookRetryCount=f.integer(e.post_webhook_retry_count);this.notifications=e.notifications;this.media=e.media;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.channels=function channels(){return this._proxy.channels};m.prototype.roles=function roles(){return this._proxy.roles};m.prototype.users=function users(){return this._proxy.users};m.prototype.bindings=function bindings(){return this._proxy.bindings};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._channels=undefined;this._roles=undefined;this._users=undefined;this._bindings=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),DefaultServiceRoleSid:o.get(t,"defaultServiceRoleSid"),DefaultChannelRoleSid:o.get(t,"defaultChannelRoleSid"),DefaultChannelCreatorRoleSid:o.get(t,"defaultChannelCreatorRoleSid"),ReadStatusEnabled:p.bool(o.get(t,"readStatusEnabled")),ReachabilityEnabled:p.bool(o.get(t,"reachabilityEnabled")),TypingIndicatorTimeout:o.get(t,"typingIndicatorTimeout"),ConsumptionReportInterval:o.get(t,"consumptionReportInterval"),"Notifications.NewMessage.Enabled":p.bool(o.get(t,"notifications.newMessage.enabled")),"Notifications.NewMessage.Template":o.get(t,"notifications.newMessage.template"),"Notifications.NewMessage.Sound":o.get(t,"notifications.newMessage.sound"),"Notifications.NewMessage.BadgeCountEnabled":p.bool(o.get(t,"notifications.newMessage.badgeCountEnabled")),"Notifications.AddedToChannel.Enabled":p.bool(o.get(t,"notifications.addedToChannel.enabled")),"Notifications.AddedToChannel.Template":o.get(t,"notifications.addedToChannel.template"),"Notifications.AddedToChannel.Sound":o.get(t,"notifications.addedToChannel.sound"),"Notifications.RemovedFromChannel.Enabled":p.bool(o.get(t,"notifications.removedFromChannel.enabled")),"Notifications.RemovedFromChannel.Template":o.get(t,"notifications.removedFromChannel.template"),"Notifications.RemovedFromChannel.Sound":o.get(t,"notifications.removedFromChannel.sound"),"Notifications.InvitedToChannel.Enabled":p.bool(o.get(t,"notifications.invitedToChannel.enabled")),"Notifications.InvitedToChannel.Template":o.get(t,"notifications.invitedToChannel.template"),"Notifications.InvitedToChannel.Sound":o.get(t,"notifications.invitedToChannel.sound"),PreWebhookUrl:o.get(t,"preWebhookUrl"),PostWebhookUrl:o.get(t,"postWebhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),WebhookFilters:p.map(o.get(t,"webhookFilters"),function(t){return t}),"Limits.ChannelMembers":o.get(t,"limits.channelMembers"),"Limits.UserChannels":o.get(t,"limits.userChannels"),"Media.CompatibilityMessage":o.get(t,"media.compatibilityMessage"),PreWebhookRetryCount:o.get(t,"preWebhookRetryCount"),PostWebhookRetryCount:o.get(t,"postWebhookRetryCount"),"Notifications.LogEnabled":p.bool(o.get(t,"notifications.logEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"channels",{get:function(){if(!this._channels){this._channels=new c(this._version,this._solution.sid)}return this._channels}});Object.defineProperty(_.prototype,"roles",{get:function(){if(!this._roles){this._roles=new u(this._version,this._solution.sid)}return this._roles}});Object.defineProperty(_.prototype,"users",{get:function(){if(!this._users){this._users=new h(this._version,this._solution.sid)}return this._users}});Object.defineProperty(_.prototype,"bindings",{get:function(){if(!this._bindings){this._bindings=new r(this._version,this._solution.sid)}return this._bindings}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:l,ServicePage:v,ServiceInstance:m,ServiceContext:_}},20318:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function BindingList(t,e){function BindingListInstance(t){return BindingListInstance.get(t)}BindingListInstance._version=t;BindingListInstance._solution={serviceSid:e};BindingListInstance._uri=`/Services/${e}/Bindings`;BindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({BindingType:a.map(o.get(t,"bindingType"),function(t){return t}),Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};BindingListInstance.toJSON=function toJSON(){return this._solution};BindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BindingListInstance};f=function BindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BindingInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.endpoint=e.endpoint;this.identity=e.identity;this.credentialSid=e.credential_sid;this.bindingType=e.binding_type;this.messageTypes=e.message_types;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BindingContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Bindings/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BindingList:h,BindingPage:f,BindingInstance:p,BindingContext:d}},54286:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(11107).InviteList;var c=i(71925).MemberList;var a=i(62885).MessageList;var u=i(60938);var h=i(33569).WebhookList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ChannelList(t,e){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={serviceSid:e};ChannelListInstance._uri=`/Services/${e}/Channels`;ChannelListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),Type:o.get(t,"type"),DateCreated:p.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:p.iso8601DateTime(o.get(t,"dateUpdated")),CreatedBy:o.get(t,"createdBy")});var r=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({Type:p.map(o.get(t,"type"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.get=function get(t){return new _(this._version,this._solution.serviceSid,t)};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};v=function ChannelPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,u.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t,this._solution.serviceSid)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ChannelInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.type=e.type;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this.membersCount=f.integer(e.members_count);this.messagesCount=f.integer(e.messages_count);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.members=function members(){return this._proxy.members};m.prototype.messages=function messages(){return this._proxy.messages};m.prototype.invites=function invites(){return this._proxy.invites};m.prototype.webhooks=function webhooks(){return this._proxy.webhooks};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ChannelContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Channels/${i}`;this._members=undefined;this._messages=undefined;this._invites=undefined;this._webhooks=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),DateCreated:p.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:p.iso8601DateTime(o.get(t,"dateUpdated")),CreatedBy:o.get(t,"createdBy")});var r=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"members",{get:function(){if(!this._members){this._members=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._members}});Object.defineProperty(_.prototype,"messages",{get:function(){if(!this._messages){this._messages=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._messages}});Object.defineProperty(_.prototype,"invites",{get:function(){if(!this._invites){this._invites=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._invites}});Object.defineProperty(_.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new h(this._version,this._solution.serviceSid,this._solution.sid)}return this._webhooks}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:l,ChannelPage:v,ChannelInstance:m,ChannelContext:_}},11107:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function InviteList(t,e,i){function InviteListInstance(t){return InviteListInstance.get(t)}InviteListInstance._version=t;InviteListInstance._solution={serviceSid:e,channelSid:i};InviteListInstance._uri=`/Services/${e}/Channels/${i}/Invites`;InviteListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InviteListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InviteListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};InviteListInstance.toJSON=function toJSON(){return this._solution};InviteListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InviteListInstance};f=function InvitePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InviteInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.createdBy=e.created_by;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function InviteContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Invites/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InviteList:h,InvitePage:f,InviteInstance:p,InviteContext:d}},71925:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MemberList(t,e,i){function MemberListInstance(t){return MemberListInstance.get(t)}MemberListInstance._version=t;MemberListInstance._solution={serviceSid:e,channelSid:i};MemberListInstance._uri=`/Services/${e}/Channels/${i}/Members`;MemberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp")),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MemberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MemberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MemberListInstance.toJSON=function toJSON(){return this._solution};MemberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MemberListInstance};f=function MemberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MemberInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.lastConsumptionTimestamp=c.iso8601DateTime(e.last_consumption_timestamp);this.url=e.url;this.attributes=e.attributes;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MemberContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Members/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp")),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MemberList:h,MemberPage:f,MemberInstance:p,MemberContext:d}},62885:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MessageList(t,e,i){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={serviceSid:e,channelSid:i};MessageListInstance._uri=`/Services/${e}/Channels/${i}/Messages`;MessageListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({From:o.get(t,"from"),Attributes:o.get(t,"attributes"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),LastUpdatedBy:o.get(t,"lastUpdatedBy"),Body:o.get(t,"body"),MediaSid:o.get(t,"mediaSid")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};f=function MessagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessageInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.attributes=e.attributes;this.serviceSid=e.service_sid;this.to=e.to;this.channelSid=e.channel_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.lastUpdatedBy=e.last_updated_by;this.wasEdited=e.was_edited;this.from=e.from;this.body=e.body;this.index=c.integer(e.index);this.type=e.type;this.media=e.media;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MessageContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Messages/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Body:o.get(t,"body"),Attributes:o.get(t,"attributes"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),LastUpdatedBy:o.get(t,"lastUpdatedBy"),From:o.get(t,"from")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:h,MessagePage:f,MessageInstance:p,MessageContext:d}},33569:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WebhookList(t,e,i){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={serviceSid:e,channelSid:i};WebhookListInstance._uri=`/Services/${e}/Channels/${i}/Webhooks`;WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.RetryCount":o.get(t,"configuration.retryCount")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};f=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.type=e.type;this.url=e.url;this.configuration=e.configuration;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WebhookContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Webhooks/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.RetryCount":o.get(t,"configuration.retryCount")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:h,WebhookPage:f,WebhookInstance:p,WebhookContext:d}},38583:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t,e){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={serviceSid:e};RoleListInstance._uri=`/Services/${e}/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Roles/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},28308:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(63282).UserBindingList;var a=i(17296).UserChannelList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function UserList(t,e){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={serviceSid:e};UserListInstance._uri=`/Services/${e}/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=h.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};p=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.attributes=e.attributes;this.friendlyName=e.friendly_name;this.roleSid=e.role_sid;this.identity=e.identity;this.isOnline=e.is_online;this.isNotifiable=e.is_notifiable;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.joinedChannelsCount=u.integer(e.joined_channels_count);this.links=e.links;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.userChannels=function userChannels(){return this._proxy.userChannels};d.prototype.userBindings=function userBindings(){return this._proxy.userBindings};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function UserContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Users/${i}`;this._userChannels=undefined;this._userBindings=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"userChannels",{get:function(){if(!this._userChannels){this._userChannels=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._userChannels}});Object.defineProperty(l.prototype,"userBindings",{get:function(){if(!this._userBindings){this._userBindings=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._userBindings}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:f,UserPage:p,UserInstance:d,UserContext:l}},63282:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function UserBindingList(t,e,i){function UserBindingListInstance(t){return UserBindingListInstance.get(t)}UserBindingListInstance._version=t;UserBindingListInstance._solution={serviceSid:e,userSid:i};UserBindingListInstance._uri=`/Services/${e}/Users/${i}/Bindings`;UserBindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserBindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserBindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({BindingType:a.map(o.get(t,"bindingType"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserBindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserBindingListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.userSid,t)};UserBindingListInstance.toJSON=function toJSON(){return this._solution};UserBindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserBindingListInstance};f=function UserBindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.userSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserBindingInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.endpoint=e.endpoint;this.identity=e.identity;this.userSid=e.user_sid;this.credentialSid=e.credential_sid;this.bindingType=e.binding_type;this.messageTypes=e.message_types;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,userSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.userSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserBindingContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,userSid:i,sid:n};this._uri=`/Services/${e}/Users/${i}/Bindings/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserBindingList:h,UserBindingPage:f,UserBindingInstance:p,UserBindingContext:d}},17296:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function UserChannelList(t,e,i){function UserChannelListInstance(t){return UserChannelListInstance.get(t)}UserChannelListInstance._version=t;UserChannelListInstance._solution={serviceSid:e,userSid:i};UserChannelListInstance._uri=`/Services/${e}/Users/${i}/Channels`;UserChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.userSid,t)};UserChannelListInstance.toJSON=function toJSON(){return this._solution};UserChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserChannelListInstance};f=function UserChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.userSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserChannelInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.userSid=e.user_sid;this.memberSid=e.member_sid;this.status=e.status;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.unreadMessagesCount=c.integer(e.unread_messages_count);this.links=e.links;this.url=e.url;this.notificationLevel=e.notification_level;this._context=undefined;this._solution={serviceSid:i,userSid:n,channelSid:o||this.channelSid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserChannelContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,userSid:i,channelSid:n};this._uri=`/Services/${e}/Users/${i}/Channels/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({NotificationLevel:o.get(t,"notificationLevel"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserChannelList:h,UserChannelPage:f,UserChannelInstance:p,UserChannelContext:d}},12918:(t,e,i)=>{"use strict";var n=i(90250);var o=i(49172).ConfigurationList;var s=i(59005).ConversationList;var r=i(37808).CredentialList;var c=i(93878).RoleList;var a=i(76801).ServiceList;var u=i(49906).UserList;var h=i(64351);function V1(t){h.prototype.constructor.call(this,t,"v1");this._configuration=undefined;this._conversations=undefined;this._credentials=undefined;this._roles=undefined;this._services=undefined;this._users=undefined}n.extend(V1.prototype,h.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"configuration",{get:function(){this._configuration=this._configuration||new o(this);return this._configuration}});Object.defineProperty(V1.prototype,"conversations",{get:function(){this._conversations=this._conversations||new s(this);return this._conversations}});Object.defineProperty(V1.prototype,"credentials",{get:function(){this._credentials=this._credentials||new r(this);return this._credentials}});Object.defineProperty(V1.prototype,"roles",{get:function(){this._roles=this._roles||new c(this);return this._roles}});Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new a(this);return this._services}});Object.defineProperty(V1.prototype,"users",{get:function(){this._users=this._users||new u(this);return this._users}});t.exports=V1},49172:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(87760).WebhookList;var a=i(72142);var u;var h;var f;var p;u=function ConfigurationList(t){function ConfigurationListInstance(t){return ConfigurationListInstance.get(t)}ConfigurationListInstance._version=t;ConfigurationListInstance._solution={};ConfigurationListInstance._webhooks=undefined;ConfigurationListInstance.get=function get(){return new p(this._version)};Object.defineProperty(ConfigurationListInstance,"webhooks",{get:function webhooks(){if(!this._webhooks){this._webhooks=new c(this._version)}return this._webhooks}});ConfigurationListInstance.toJSON=function toJSON(){return this._solution};ConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConfigurationListInstance};h=function ConfigurationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ConfigurationInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.defaultChatServiceSid=e.default_chat_service_sid;this.defaultMessagingServiceSid=e.default_messaging_service_sid;this.defaultInactiveTimer=e.default_inactive_timer;this.defaultClosedTimer=e.default_closed_timer;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConfigurationContext(t){this._version=t;this._solution={};this._uri=`/Configuration`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({DefaultChatServiceSid:o.get(t,"defaultChatServiceSid"),DefaultMessagingServiceSid:o.get(t,"defaultMessagingServiceSid"),DefaultInactiveTimer:o.get(t,"defaultInactiveTimer"),DefaultClosedTimer:o.get(t,"defaultClosedTimer")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConfigurationList:u,ConfigurationPage:h,ConfigurationInstance:f,ConfigurationContext:p}},87760:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function WebhookList(t){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={};WebhookListInstance.get=function get(){return new p(this._version)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};h=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WebhookInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.method=e.method;this.filters=e.filters;this.preWebhookUrl=e.pre_webhook_url;this.postWebhookUrl=e.post_webhook_url;this.target=e.target;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookContext(t){this._version=t;this._solution={};this._uri=`/Configuration/Webhooks`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Method:o.get(t,"method"),Filters:c.map(o.get(t,"filters"),function(t){return t}),PreWebhookUrl:o.get(t,"preWebhookUrl"),PostWebhookUrl:o.get(t,"postWebhookUrl"),Target:o.get(t,"target")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:u,WebhookPage:h,WebhookInstance:f,WebhookContext:p}},59005:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(21059).MessageList;var c=i(60938);var a=i(96614).ParticipantList;var u=i(82681).WebhookList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ConversationList(t){function ConversationListInstance(t){return ConversationListInstance.get(t)}ConversationListInstance._version=t;ConversationListInstance._solution={};ConversationListInstance._uri=`/Conversations`;ConversationListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),DateCreated:f.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:f.iso8601DateTime(o.get(t,"dateUpdated")),MessagingServiceSid:o.get(t,"messagingServiceSid"),Attributes:o.get(t,"attributes"),State:o.get(t,"state"),"Timers.Inactive":o.get(t,"timers.inactive"),"Timers.Closed":o.get(t,"timers.closed")});var r=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConversationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConversationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.get=function get(t){return new m(this._version,t)};ConversationListInstance.toJSON=function toJSON(){return this._solution};ConversationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConversationListInstance};l=function ConversationPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ConversationInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.messagingServiceSid=e.messaging_service_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.state=e.state;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.timers=e.timers;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.participants=function participants(){return this._proxy.participants};v.prototype.messages=function messages(){return this._proxy.messages};v.prototype.webhooks=function webhooks(){return this._proxy.webhooks};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ConversationContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Conversations/${e}`;this._participants=undefined;this._messages=undefined;this._webhooks=undefined};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),DateCreated:f.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:f.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),MessagingServiceSid:o.get(t,"messagingServiceSid"),State:o.get(t,"state"),"Timers.Inactive":o.get(t,"timers.inactive"),"Timers.Closed":o.get(t,"timers.closed"),UniqueName:o.get(t,"uniqueName")});var r=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"participants",{get:function(){if(!this._participants){this._participants=new a(this._version,this._solution.sid)}return this._participants}});Object.defineProperty(m.prototype,"messages",{get:function(){if(!this._messages){this._messages=new r(this._version,this._solution.sid)}return this._messages}});Object.defineProperty(m.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new u(this._version,this._solution.sid)}return this._webhooks}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConversationList:d,ConversationPage:l,ConversationInstance:v,ConversationContext:m}},21059:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(56284).DeliveryReceiptList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function MessageList(t,e){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={conversationSid:e};MessageListInstance._uri=`/Conversations/${e}/Messages`;MessageListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Author:o.get(t,"author"),Body:o.get(t,"body"),DateCreated:u.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:u.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),MediaSid:o.get(t,"mediaSid")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new l(this._version,this._solution.conversationSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};p=function MessagePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.conversationSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MessageInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.conversationSid=e.conversation_sid;this.sid=e.sid;this.index=a.integer(e.index);this.author=e.author;this.body=e.body;this.media=e.media;this.attributes=e.attributes;this.participantSid=e.participant_sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.delivery=e.delivery;this.links=e.links;this._context=undefined;this._solution={conversationSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.conversationSid,this._solution.sid)}return this._context}});d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.deliveryReceipts=function deliveryReceipts(){return this._proxy.deliveryReceipts};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function MessageContext(t,e,i){this._version=t;this._solution={conversationSid:e,sid:i};this._uri=`/Conversations/${e}/Messages/${i}`;this._deliveryReceipts=undefined};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Author:o.get(t,"author"),Body:o.get(t,"body"),DateCreated:u.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:u.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"deliveryReceipts",{get:function(){if(!this._deliveryReceipts){this._deliveryReceipts=new r(this._version,this._solution.conversationSid,this._solution.sid)}return this._deliveryReceipts}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:f,MessagePage:p,MessageInstance:d,MessageContext:l}},56284:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DeliveryReceiptList(t,e,i){function DeliveryReceiptListInstance(t){return DeliveryReceiptListInstance.get(t)}DeliveryReceiptListInstance._version=t;DeliveryReceiptListInstance._solution={conversationSid:e,messageSid:i};DeliveryReceiptListInstance._uri=`/Conversations/${e}/Messages/${i}/Receipts`;DeliveryReceiptListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DeliveryReceiptListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DeliveryReceiptListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeliveryReceiptListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeliveryReceiptListInstance.get=function get(t){return new p(this._version,this._solution.conversationSid,this._solution.messageSid,t)};DeliveryReceiptListInstance.toJSON=function toJSON(){return this._solution};DeliveryReceiptListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeliveryReceiptListInstance};h=function DeliveryReceiptPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.conversationSid,this._solution.messageSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DeliveryReceiptInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.conversationSid=e.conversation_sid;this.sid=e.sid;this.messageSid=e.message_sid;this.channelMessageSid=e.channel_message_sid;this.participantSid=e.participant_sid;this.status=e.status;this.errorCode=c.integer(e.error_code);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={conversationSid:i,messageSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.conversationSid,this._solution.messageSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeliveryReceiptContext(t,e,i,n){this._version=t;this._solution={conversationSid:e,messageSid:i,sid:n};this._uri=`/Conversations/${e}/Messages/${i}/Receipts/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.conversationSid,this._solution.messageSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeliveryReceiptList:u,DeliveryReceiptPage:h,DeliveryReceiptInstance:f,DeliveryReceiptContext:p}},96614:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ParticipantList(t,e){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={conversationSid:e};ParticipantListInstance._uri=`/Conversations/${e}/Participants`;ParticipantListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),"MessagingBinding.Address":o.get(t,"messagingBinding.address"),"MessagingBinding.ProxyAddress":o.get(t,"messagingBinding.proxyAddress"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),"MessagingBinding.ProjectedAddress":o.get(t,"messagingBinding.projectedAddress"),RoleSid:o.get(t,"roleSid")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new d(this._version,this._solution.conversationSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};f=function ParticipantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.conversationSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ParticipantInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.conversationSid=e.conversation_sid;this.sid=e.sid;this.identity=e.identity;this.attributes=e.attributes;this.messagingBinding=e.messaging_binding;this.roleSid=e.role_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this.lastReadMessageIndex=c.integer(e.last_read_message_index);this.lastReadTimestamp=e.last_read_timestamp;this._context=undefined;this._solution={conversationSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.conversationSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ParticipantContext(t,e,i){this._version=t;this._solution={conversationSid:e,sid:i};this._uri=`/Conversations/${e}/Participants/${i}`};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid"),"MessagingBinding.ProxyAddress":o.get(t,"messagingBinding.proxyAddress"),"MessagingBinding.ProjectedAddress":o.get(t,"messagingBinding.projectedAddress"),Identity:o.get(t,"identity"),LastReadMessageIndex:o.get(t,"lastReadMessageIndex"),LastReadTimestamp:o.get(t,"lastReadTimestamp")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:h,ParticipantPage:f,ParticipantInstance:p,ParticipantContext:d}},82681:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WebhookList(t,e){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={conversationSid:e};WebhookListInstance._uri=`/Conversations/${e}/Webhooks`;WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.target)){throw new Error('Required parameter "opts.target" missing.')}var i=n.defer();var s=u.of({Target:o.get(t,"target"),"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.ReplayAfter":o.get(t,"configuration.replayAfter")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new d(this._version,this._solution.conversationSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};f=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.conversationSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.conversationSid=e.conversation_sid;this.target=e.target;this.url=e.url;this.configuration=e.configuration;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={conversationSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.conversationSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WebhookContext(t,e,i){this._version=t;this._solution={conversationSid:e,sid:i};this._uri=`/Conversations/${e}/Webhooks/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.conversationSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:h,WebhookPage:f,WebhookInstance:p,WebhookContext:d}},37808:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},93878:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={};RoleListInstance._uri=`/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Roles/${e}`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},76801:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(89718).BindingList;var c=i(13306).ConfigurationList;var a=i(1042).ConversationList;var u=i(60938);var h=i(92467).RoleList;var f=i(87141).UserList;var p=i(80513);var d=i(72142);var l;var v;var m;var _;l=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new _(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};v=function ServicePage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,u.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=p.iso8601DateTime(e.date_created);this.dateUpdated=p.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.sid)}return this._context}});m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.conversations=function conversations(){return this._proxy.conversations};m.prototype.bindings=function bindings(){return this._proxy.bindings};m.prototype.users=function users(){return this._proxy.users};m.prototype.roles=function roles(){return this._proxy.roles};m.prototype.configuration=function configuration(){return this._proxy.configuration};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._conversations=undefined;this._bindings=undefined;this._users=undefined;this._roles=undefined;this._configuration=undefined};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(_.prototype,"conversations",{get:function(){if(!this._conversations){this._conversations=new a(this._version,this._solution.sid)}return this._conversations}});Object.defineProperty(_.prototype,"bindings",{get:function(){if(!this._bindings){this._bindings=new r(this._version,this._solution.sid)}return this._bindings}});Object.defineProperty(_.prototype,"users",{get:function(){if(!this._users){this._users=new f(this._version,this._solution.sid)}return this._users}});Object.defineProperty(_.prototype,"roles",{get:function(){if(!this._roles){this._roles=new h(this._version,this._solution.sid)}return this._roles}});Object.defineProperty(_.prototype,"configuration",{get:function(){if(!this._configuration){this._configuration=new c(this._version,this._solution.sid)}return this._configuration}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:l,ServicePage:v,ServiceInstance:m,ServiceContext:_}},89718:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function BindingList(t,e){function BindingListInstance(t){return BindingListInstance.get(t)}BindingListInstance._version=t;BindingListInstance._solution={chatServiceSid:e};BindingListInstance._uri=`/Services/${e}/Bindings`;BindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({BindingType:a.map(o.get(t,"bindingType"),function(t){return t}),Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.get=function get(t){return new d(this._version,this._solution.chatServiceSid,t)};BindingListInstance.toJSON=function toJSON(){return this._solution};BindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BindingListInstance};f=function BindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.chatServiceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BindingInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.credentialSid=e.credential_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.endpoint=e.endpoint;this.identity=e.identity;this.bindingType=e.binding_type;this.messageTypes=e.message_types;this.url=e.url;this._context=undefined;this._solution={chatServiceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._context}});p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BindingContext(t,e,i){this._version=t;this._solution={chatServiceSid:e,sid:i};this._uri=`/Services/${e}/Bindings/${i}`};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BindingList:h,BindingPage:f,BindingInstance:p,BindingContext:d}},13306:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(94441).NotificationList;var c=i(60938);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ConfigurationList(t,e){function ConfigurationListInstance(t){return ConfigurationListInstance.get(t)}ConfigurationListInstance._version=t;ConfigurationListInstance._solution={chatServiceSid:e};ConfigurationListInstance._notifications=undefined;ConfigurationListInstance.get=function get(){return new d(this._version,this._solution.chatServiceSid)};Object.defineProperty(ConfigurationListInstance,"notifications",{get:function notifications(){if(!this._notifications){this._notifications=new r(this._version,this._solution.chatServiceSid)}return this._notifications}});ConfigurationListInstance.toJSON=function toJSON(){return this._solution};ConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConfigurationListInstance};f=function ConfigurationPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.chatServiceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConfigurationInstance(t,e,i){this._version=t;this.chatServiceSid=e.chat_service_sid;this.defaultConversationCreatorRoleSid=e.default_conversation_creator_role_sid;this.defaultConversationRoleSid=e.default_conversation_role_sid;this.defaultChatServiceRoleSid=e.default_chat_service_role_sid;this.url=e.url;this.links=e.links;this.reachabilityEnabled=e.reachability_enabled;this._context=undefined;this._solution={chatServiceSid:i}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.chatServiceSid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ConfigurationContext(t,e){this._version=t;this._solution={chatServiceSid:e};this._uri=`/Services/${e}/Configuration`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.chatServiceSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({DefaultConversationCreatorRoleSid:o.get(t,"defaultConversationCreatorRoleSid"),DefaultConversationRoleSid:o.get(t,"defaultConversationRoleSid"),DefaultChatServiceRoleSid:o.get(t,"defaultChatServiceRoleSid"),ReachabilityEnabled:a.bool(o.get(t,"reachabilityEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConfigurationList:h,ConfigurationPage:f,ConfigurationInstance:p,ConfigurationContext:d}},94441:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function NotificationList(t,e){function NotificationListInstance(t){return NotificationListInstance.get(t)}NotificationListInstance._version=t;NotificationListInstance._solution={chatServiceSid:e};NotificationListInstance.get=function get(){return new p(this._version,this._solution.chatServiceSid)};NotificationListInstance.toJSON=function toJSON(){return this._solution};NotificationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NotificationListInstance};h=function NotificationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.chatServiceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NotificationInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.newMessage=e.new_message;this.addedToConversation=e.added_to_conversation;this.removedFromConversation=e.removed_from_conversation;this.logEnabled=e.log_enabled;this.url=e.url;this._context=undefined;this._solution={chatServiceSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.chatServiceSid)}return this._context}});f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function NotificationContext(t,e){this._version=t;this._solution={chatServiceSid:e};this._uri=`/Services/${e}/Configuration/Notifications`};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({LogEnabled:c.bool(o.get(t,"logEnabled")),"NewMessage.Enabled":c.bool(o.get(t,"newMessage.enabled")),"NewMessage.Template":o.get(t,"newMessage.template"),"NewMessage.Sound":o.get(t,"newMessage.sound"),"NewMessage.BadgeCountEnabled":c.bool(o.get(t,"newMessage.badgeCountEnabled")),"AddedToConversation.Enabled":c.bool(o.get(t,"addedToConversation.enabled")),"AddedToConversation.Template":o.get(t,"addedToConversation.template"),"AddedToConversation.Sound":o.get(t,"addedToConversation.sound"),"RemovedFromConversation.Enabled":c.bool(o.get(t,"removedFromConversation.enabled")),"RemovedFromConversation.Template":o.get(t,"removedFromConversation.template"),"RemovedFromConversation.Sound":o.get(t,"removedFromConversation.sound")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.chatServiceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.chatServiceSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NotificationList:u,NotificationPage:h,NotificationInstance:f,NotificationContext:p}},1042:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(904).MessageList;var c=i(60938);var a=i(27459).ParticipantList;var u=i(73376).WebhookList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ConversationList(t,e){function ConversationListInstance(t){return ConversationListInstance.get(t)}ConversationListInstance._version=t;ConversationListInstance._solution={chatServiceSid:e};ConversationListInstance._uri=`/Services/${e}/Conversations`;ConversationListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),MessagingServiceSid:o.get(t,"messagingServiceSid"),DateCreated:f.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:f.iso8601DateTime(o.get(t,"dateUpdated")),State:o.get(t,"state"),"Timers.Inactive":o.get(t,"timers.inactive"),"Timers.Closed":o.get(t,"timers.closed")});var r=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new v(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConversationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConversationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConversationListInstance.get=function get(t){return new m(this._version,this._solution.chatServiceSid,t)};ConversationListInstance.toJSON=function toJSON(){return this._solution};ConversationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConversationListInstance};l=function ConversationPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.chatServiceSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ConversationInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.messagingServiceSid=e.messaging_service_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.state=e.state;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.timers=e.timers;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={chatServiceSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._context}});v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.participants=function participants(){return this._proxy.participants};v.prototype.messages=function messages(){return this._proxy.messages};v.prototype.webhooks=function webhooks(){return this._proxy.webhooks};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ConversationContext(t,e,i){this._version=t;this._solution={chatServiceSid:e,sid:i};this._uri=`/Services/${e}/Conversations/${i}`;this._participants=undefined;this._messages=undefined;this._webhooks=undefined};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),DateCreated:f.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:f.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),MessagingServiceSid:o.get(t,"messagingServiceSid"),State:o.get(t,"state"),"Timers.Inactive":o.get(t,"timers.inactive"),"Timers.Closed":o.get(t,"timers.closed"),UniqueName:o.get(t,"uniqueName")});var r=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new v(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"participants",{get:function(){if(!this._participants){this._participants=new a(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._participants}});Object.defineProperty(m.prototype,"messages",{get:function(){if(!this._messages){this._messages=new r(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._messages}});Object.defineProperty(m.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new u(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._webhooks}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConversationList:d,ConversationPage:l,ConversationInstance:v,ConversationContext:m}},904:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(54210).DeliveryReceiptList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function MessageList(t,e,i){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={chatServiceSid:e,conversationSid:i};MessageListInstance._uri=`/Services/${e}/Conversations/${i}/Messages`;MessageListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Author:o.get(t,"author"),Body:o.get(t,"body"),DateCreated:u.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:u.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),MediaSid:o.get(t,"mediaSid")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new l(this._version,this._solution.chatServiceSid,this._solution.conversationSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};p=function MessagePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MessageInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.conversationSid=e.conversation_sid;this.sid=e.sid;this.index=a.integer(e.index);this.author=e.author;this.body=e.body;this.media=e.media;this.attributes=e.attributes;this.participantSid=e.participant_sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.delivery=e.delivery;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={chatServiceSid:i,conversationSid:n,sid:o||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid)}return this._context}});d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.deliveryReceipts=function deliveryReceipts(){return this._proxy.deliveryReceipts};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function MessageContext(t,e,i,n){this._version=t;this._solution={chatServiceSid:e,conversationSid:i,sid:n};this._uri=`/Services/${e}/Conversations/${i}/Messages/${n}`;this._deliveryReceipts=undefined};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Author:o.get(t,"author"),Body:o.get(t,"body"),DateCreated:u.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:u.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"deliveryReceipts",{get:function(){if(!this._deliveryReceipts){this._deliveryReceipts=new r(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid)}return this._deliveryReceipts}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:f,MessagePage:p,MessageInstance:d,MessageContext:l}},54210:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DeliveryReceiptList(t,e,i,r){function DeliveryReceiptListInstance(t){return DeliveryReceiptListInstance.get(t)}DeliveryReceiptListInstance._version=t;DeliveryReceiptListInstance._solution={chatServiceSid:e,conversationSid:i,messageSid:r};DeliveryReceiptListInstance._uri=`/Services/${e}/Conversations/${i}/Messages/${r}/Receipts`;DeliveryReceiptListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DeliveryReceiptListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DeliveryReceiptListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeliveryReceiptListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeliveryReceiptListInstance.get=function get(t){return new p(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.messageSid,t)};DeliveryReceiptListInstance.toJSON=function toJSON(){return this._solution};DeliveryReceiptListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeliveryReceiptListInstance};h=function DeliveryReceiptPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.messageSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DeliveryReceiptInstance(t,e,i,n,o,s){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.conversationSid=e.conversation_sid;this.messageSid=e.message_sid;this.sid=e.sid;this.channelMessageSid=e.channel_message_sid;this.participantSid=e.participant_sid;this.status=e.status;this.errorCode=c.integer(e.error_code);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={chatServiceSid:i,conversationSid:n,messageSid:o,sid:s||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.messageSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeliveryReceiptContext(t,e,i,n,o){this._version=t;this._solution={chatServiceSid:e,conversationSid:i,messageSid:n,sid:o};this._uri=`/Services/${e}/Conversations/${i}/Messages/${n}/Receipts/${o}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.messageSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeliveryReceiptList:u,DeliveryReceiptPage:h,DeliveryReceiptInstance:f,DeliveryReceiptContext:p}},27459:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ParticipantList(t,e,i){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={chatServiceSid:e,conversationSid:i};ParticipantListInstance._uri=`/Services/${e}/Conversations/${i}/Participants`;ParticipantListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),"MessagingBinding.Address":o.get(t,"messagingBinding.address"),"MessagingBinding.ProxyAddress":o.get(t,"messagingBinding.proxyAddress"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes"),"MessagingBinding.ProjectedAddress":o.get(t,"messagingBinding.projectedAddress"),RoleSid:o.get(t,"roleSid")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new d(this._version,this._solution.chatServiceSid,this._solution.conversationSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};f=function ParticipantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ParticipantInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.conversationSid=e.conversation_sid;this.sid=e.sid;this.identity=e.identity;this.attributes=e.attributes;this.messagingBinding=e.messaging_binding;this.roleSid=e.role_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this.lastReadMessageIndex=c.integer(e.last_read_message_index);this.lastReadTimestamp=e.last_read_timestamp;this._context=undefined;this._solution={chatServiceSid:i,conversationSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ParticipantContext(t,e,i,n){this._version=t;this._solution={chatServiceSid:e,conversationSid:i,sid:n};this._uri=`/Services/${e}/Conversations/${i}/Participants/${n}`};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Identity:o.get(t,"identity"),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid"),"MessagingBinding.ProxyAddress":o.get(t,"messagingBinding.proxyAddress"),"MessagingBinding.ProjectedAddress":o.get(t,"messagingBinding.projectedAddress"),LastReadMessageIndex:o.get(t,"lastReadMessageIndex"),LastReadTimestamp:o.get(t,"lastReadTimestamp")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:h,ParticipantPage:f,ParticipantInstance:p,ParticipantContext:d}},73376:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WebhookList(t,e,i){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={chatServiceSid:e,conversationSid:i};WebhookListInstance._uri=`/Services/${e}/Conversations/${i}/Webhooks`;WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.target)){throw new Error('Required parameter "opts.target" missing.')}var i=n.defer();var s=u.of({Target:o.get(t,"target"),"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.ReplayAfter":o.get(t,"configuration.replayAfter")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new d(this._version,this._solution.chatServiceSid,this._solution.conversationSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};f=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.conversationSid=e.conversation_sid;this.target=e.target;this.url=e.url;this.configuration=e.configuration;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={chatServiceSid:i,conversationSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WebhookContext(t,e,i,n){this._version=t;this._solution={chatServiceSid:e,conversationSid:i,sid:n};this._uri=`/Services/${e}/Conversations/${i}/Webhooks/${n}`};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.conversationSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:h,WebhookPage:f,WebhookInstance:p,WebhookContext:d}},92467:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t,e){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={chatServiceSid:e};RoleListInstance._uri=`/Services/${e}/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,this._solution.chatServiceSid,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.chatServiceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={chatServiceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e,i){this._version=t;this._solution={chatServiceSid:e,sid:i};this._uri=`/Services/${e}/Roles/${i}`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},87141:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function UserList(t,e){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={chatServiceSid:e};UserListInstance._uri=`/Services/${e}/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=a.of({Identity:o.get(t,"identity"),FriendlyName:o.get(t,"friendlyName"),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid")});var r=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new f(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new p(this._version,this._solution.chatServiceSid,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};h=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.chatServiceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UserInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.roleSid=e.role_sid;this.identity=e.identity;this.friendlyName=e.friendly_name;this.attributes=e.attributes;this.isOnline=e.is_online;this.isNotifiable=e.is_notifiable;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={chatServiceSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.chatServiceSid,this._solution.sid)}return this._context}});f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserContext(t,e,i){this._version=t;this._solution={chatServiceSid:e,sid:i};this._uri=`/Services/${e}/Users/${i}`};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid")});var r=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new f(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.chatServiceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:u,UserPage:h,UserInstance:f,UserContext:p}},49906:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function UserList(t){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={};UserListInstance._uri=`/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=a.of({Identity:o.get(t,"identity"),FriendlyName:o.get(t,"friendlyName"),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid")});var r=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new p(this._version,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};h=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UserInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.chatServiceSid=e.chat_service_sid;this.roleSid=e.role_sid;this.identity=e.identity;this.friendlyName=e.friendly_name;this.attributes=e.attributes;this.isOnline=e.is_online;this.isNotifiable=e.is_notifiable;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Users/${e}`};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),Attributes:o.get(t,"attributes"),RoleSid:o.get(t,"roleSid")});var r=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:u,UserPage:h,UserInstance:f,UserContext:p}},47767:(t,e,i)=>{"use strict";var n=i(90250);var o=i(4359).EventTypeList;var s=i(18983).SchemaList;var r=i(2434).SinkList;var c=i(97939).SubscriptionList;var a=i(64351);function V1(t){a.prototype.constructor.call(this,t,"v1");this._eventTypes=undefined;this._schemas=undefined;this._sinks=undefined;this._subscriptions=undefined}n.extend(V1.prototype,a.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"eventTypes",{get:function(){this._eventTypes=this._eventTypes||new o(this);return this._eventTypes}});Object.defineProperty(V1.prototype,"schemas",{get:function(){this._schemas=this._schemas||new s(this);return this._schemas}});Object.defineProperty(V1.prototype,"sinks",{get:function(){this._sinks=this._sinks||new r(this);return this._sinks}});Object.defineProperty(V1.prototype,"subscriptions",{get:function(){this._subscriptions=this._subscriptions||new c(this);return this._subscriptions}});t.exports=V1},4359:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function EventTypeList(t){function EventTypeListInstance(t){return EventTypeListInstance.get(t)}EventTypeListInstance._version=t;EventTypeListInstance._solution={};EventTypeListInstance._uri=`/Types`;EventTypeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EventTypeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EventTypeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventTypeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventTypeListInstance.get=function get(t){return new p(this._version,t)};EventTypeListInstance.toJSON=function toJSON(){return this._solution};EventTypeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EventTypeListInstance};h=function EventTypePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function EventTypeInstance(t,e,i){this._version=t;this.type=e.type;this.schemaId=e.schema_id;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.description=e.description;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={type:i||this.type}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.type)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function EventTypeContext(t,e){this._version=t;this._solution={type:e};this._uri=`/Types/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.type))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EventTypeList:u,EventTypePage:h,EventTypeInstance:f,EventTypeContext:p}},18983:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(54131).VersionList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function SchemaList(t){function SchemaListInstance(t){return SchemaListInstance.get(t)}SchemaListInstance._version=t;SchemaListInstance._solution={};SchemaListInstance.get=function get(t){return new d(this._version,t)};SchemaListInstance.toJSON=function toJSON(){return this._solution};SchemaListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SchemaListInstance};f=function SchemaPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SchemaInstance(t,e,i){this._version=t;this.id=e.id;this.url=e.url;this.links=e.links;this.lastCreated=a.iso8601DateTime(e.last_created);this.lastVersion=a.integer(e.last_version);this._context=undefined;this._solution={id:i||this.id}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.id)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.versions=function versions(){return this._proxy.versions};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SchemaContext(t,e){this._version=t;this._solution={id:e};this._uri=`/Schemas/${e}`;this._versions=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.id))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"versions",{get:function(){if(!this._versions){this._versions=new c(this._version,this._solution.id)}return this._versions}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SchemaList:h,SchemaPage:f,SchemaInstance:p,SchemaContext:d}},54131:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function VersionList(t,e){function VersionListInstance(t){return VersionListInstance.get(t)}VersionListInstance._version=t;VersionListInstance._solution={id:e};VersionListInstance._uri=`/Schemas/${e}/Versions`;VersionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};VersionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};VersionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VersionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VersionListInstance.get=function get(t){return new p(this._version,this._solution.id,t)};VersionListInstance.toJSON=function toJSON(){return this._solution};VersionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return VersionListInstance};h=function VersionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.id)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function VersionInstance(t,e,i,n){this._version=t;this.id=e.id;this.schemaVersion=c.integer(e.schema_version);this.dateCreated=c.iso8601DateTime(e.date_created);this.url=e.url;this.raw=e.raw;this._context=undefined;this._solution={id:i,schemaVersion:n||this.schemaVersion}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.id,this._solution.schemaVersion)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function VersionContext(t,e,i){this._version=t;this._solution={id:e,schemaVersion:i};this._uri=`/Schemas/${e}/Versions/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.id,this._solution.schemaVersion))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={VersionList:u,VersionPage:h,VersionInstance:f,VersionContext:p}},2434:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(89082).SinkTestList;var a=i(25105).SinkValidateList;var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function SinkList(t){function SinkListInstance(t){return SinkListInstance.get(t)}SinkListInstance._version=t;SinkListInstance._solution={};SinkListInstance._uri=`/Sinks`;SinkListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.description)){throw new Error('Required parameter "opts.description" missing.')}if(o.isUndefined(t.sinkConfiguration)){throw new Error('Required parameter "opts.sinkConfiguration" missing.')}if(o.isUndefined(t.sinkType)){throw new Error('Required parameter "opts.sinkType" missing.')}var i=n.defer();var s=f.of({Description:o.get(t,"description"),SinkConfiguration:h.object(o.get(t,"sinkConfiguration")),SinkType:o.get(t,"sinkType")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SinkListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SinkListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SinkListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SinkListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SinkListInstance.get=function get(t){return new v(this._version,t)};SinkListInstance.toJSON=function toJSON(){return this._solution};SinkListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SinkListInstance};d=function SinkPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,r.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SinkInstance(t,e,i){this._version=t;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.description=e.description;this.sid=e.sid;this.sinkConfiguration=e.sink_configuration;this.sinkType=e.sink_type;this.status=e.status;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.sinkTest=function sinkTest(){return this._proxy.sinkTest};l.prototype.sinkValidate=function sinkValidate(){return this._proxy.sinkValidate};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function SinkContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Sinks/${e}`;this._sinkTest=undefined;this._sinkValidate=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(v.prototype,"sinkTest",{get:function(){if(!this._sinkTest){this._sinkTest=new c(this._version,this._solution.sid)}return this._sinkTest}});Object.defineProperty(v.prototype,"sinkValidate",{get:function(){if(!this._sinkValidate){this._sinkValidate=new a(this._version,this._solution.sid)}return this._sinkValidate}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SinkList:p,SinkPage:d,SinkInstance:l,SinkContext:v}},89082:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function SinkTestList(t,e){function SinkTestListInstance(t){return SinkTestListInstance.get(t)}SinkTestListInstance._version=t;SinkTestListInstance._solution={sid:e};SinkTestListInstance._uri=`/Sinks/${e}/Test`;SinkTestListInstance.create=function create(t){var e=n.defer();var i=this._version.create({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new h(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};SinkTestListInstance.toJSON=function toJSON(){return this._solution};SinkTestListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SinkTestListInstance};u=function SinkTestPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.sid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function SinkTestInstance(t,e,i){this._version=t;this.result=e.result;this._context=undefined;this._solution={sid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SinkTestList:a,SinkTestPage:u,SinkTestInstance:h}},25105:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function SinkValidateList(t,e){function SinkValidateListInstance(t){return SinkValidateListInstance.get(t)}SinkValidateListInstance._version=t;SinkValidateListInstance._solution={sid:e};SinkValidateListInstance._uri=`/Sinks/${e}/Validate`;SinkValidateListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.testId)){throw new Error('Required parameter "opts.testId" missing.')}var i=n.defer();var s=c.of({TestId:o.get(t,"testId")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SinkValidateListInstance.toJSON=function toJSON(){return this._solution};SinkValidateListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SinkValidateListInstance};u=function SinkValidatePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.sid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function SinkValidateInstance(t,e,i){this._version=t;this.result=e.result;this._context=undefined;this._solution={sid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SinkValidateList:a,SinkValidatePage:u,SinkValidateInstance:h}},97939:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(2108).SubscribedEventList;var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function SubscriptionList(t){function SubscriptionListInstance(t){return SubscriptionListInstance.get(t)}SubscriptionListInstance._version=t;SubscriptionListInstance._solution={};SubscriptionListInstance._uri=`/Subscriptions`;SubscriptionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SubscriptionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SubscriptionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({SinkSid:o.get(t,"sinkSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscriptionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscriptionListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.description)){throw new Error('Required parameter "opts.description" missing.')}if(o.isUndefined(t.sinkSid)){throw new Error('Required parameter "opts.sinkSid" missing.')}if(o.isUndefined(t.types)){throw new Error('Required parameter "opts.types" missing.')}var i=n.defer();var s=h.of({Description:o.get(t,"description"),SinkSid:o.get(t,"sinkSid"),Types:u.map(o.get(t,"types"),function(t){return u.object(t)})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscriptionListInstance.get=function get(t){return new l(this._version,t)};SubscriptionListInstance.toJSON=function toJSON(){return this._solution};SubscriptionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SubscriptionListInstance};p=function SubscriptionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SubscriptionInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.description=e.description;this.sinkSid=e.sink_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.subscribedEvents=function subscribedEvents(){return this._proxy.subscribedEvents};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SubscriptionContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Subscriptions/${e}`;this._subscribedEvents=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Description:o.get(t,"description"),SinkSid:o.get(t,"sinkSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"subscribedEvents",{get:function(){if(!this._subscribedEvents){this._subscribedEvents=new c(this._version,this._solution.sid)}return this._subscribedEvents}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SubscriptionList:f,SubscriptionPage:p,SubscriptionInstance:d,SubscriptionContext:l}},2108:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function SubscribedEventList(t,e){function SubscribedEventListInstance(t){return SubscribedEventListInstance.get(t)}SubscribedEventListInstance._version=t;SubscribedEventListInstance._solution={subscriptionSid:e};SubscribedEventListInstance._uri=`/Subscriptions/${e}/SubscribedEvents`;SubscribedEventListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SubscribedEventListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SubscribedEventListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscribedEventListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscribedEventListInstance.toJSON=function toJSON(){return this._solution};SubscribedEventListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SubscribedEventListInstance};h=function SubscribedEventPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.subscriptionSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SubscribedEventInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.type=e.type;this.version=c.integer(e.version);this.subscriptionSid=e.subscription_sid;this.url=e.url;this._context=undefined;this._solution={subscriptionSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SubscribedEventList:u,SubscribedEventPage:h,SubscribedEventInstance:f}},23827:(t,e,i)=>{"use strict";var n=i(90250);var o=i(96879).FaxList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._faxes=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"faxes",{get:function(){this._faxes=this._faxes||new o(this);return this._faxes}});t.exports=V1},96879:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(68399).FaxMediaList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function FaxList(t){function FaxListInstance(t){return FaxListInstance.get(t)}FaxListInstance._version=t;FaxListInstance._solution={};FaxListInstance._uri=`/Faxes`;FaxListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FaxListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FaxListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({From:o.get(t,"from"),To:o.get(t,"to"),DateCreatedOnOrBefore:u.iso8601DateTime(o.get(t,"dateCreatedOnOrBefore")),DateCreatedAfter:u.iso8601DateTime(o.get(t,"dateCreatedAfter")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FaxListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FaxListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.mediaUrl)){throw new Error('Required parameter "opts.mediaUrl" missing.')}var i=n.defer();var s=h.of({To:o.get(t,"to"),MediaUrl:o.get(t,"mediaUrl"),Quality:o.get(t,"quality"),StatusCallback:o.get(t,"statusCallback"),From:o.get(t,"from"),SipAuthUsername:o.get(t,"sipAuthUsername"),SipAuthPassword:o.get(t,"sipAuthPassword"),StoreMedia:u.bool(o.get(t,"storeMedia")),Ttl:o.get(t,"ttl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FaxListInstance.get=function get(t){return new l(this._version,t)};FaxListInstance.toJSON=function toJSON(){return this._solution};FaxListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FaxListInstance};p=function FaxPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FaxInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.from=e.from;this.to=e.to;this.quality=e.quality;this.mediaSid=e.media_sid;this.mediaUrl=e.media_url;this.numPages=a.integer(e.num_pages);this.duration=a.integer(e.duration);this.status=e.status;this.direction=e.direction;this.apiVersion=e.api_version;this.price=a.decimal(e.price);this.priceUnit=e.price_unit;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.links=e.links;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.media=function media(){return this._proxy.media};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function FaxContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Faxes/${e}`;this._media=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"media",{get:function(){if(!this._media){this._media=new r(this._version,this._solution.sid)}return this._media}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FaxList:f,FaxPage:p,FaxInstance:d,FaxContext:l}},68399:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FaxMediaList(t,e){function FaxMediaListInstance(t){return FaxMediaListInstance.get(t)}FaxMediaListInstance._version=t;FaxMediaListInstance._solution={faxSid:e};FaxMediaListInstance._uri=`/Faxes/${e}/Media`;FaxMediaListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FaxMediaListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FaxMediaListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FaxMediaListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FaxMediaListInstance.get=function get(t){return new p(this._version,this._solution.faxSid,t)};FaxMediaListInstance.toJSON=function toJSON(){return this._solution};FaxMediaListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FaxMediaListInstance};h=function FaxMediaPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.faxSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FaxMediaInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.faxSid=e.fax_sid;this.contentType=e.content_type;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={faxSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.faxSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FaxMediaContext(t,e,i){this._version=t;this._solution={faxSid:e,sid:i};this._uri=`/Faxes/${e}/Media/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.faxSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FaxMediaList:u,FaxMediaPage:h,FaxMediaInstance:f,FaxMediaContext:p}},47633:(t,e,i)=>{"use strict";var n=i(90250);var o=i(84596).ChannelList;var s=i(59150).ConfigurationList;var r=i(85854).FlexFlowList;var c=i(64351);var a=i(19769).WebChannelList;function V1(t){c.prototype.constructor.call(this,t,"v1");this._channel=undefined;this._configuration=undefined;this._flexFlow=undefined;this._webChannel=undefined}n.extend(V1.prototype,c.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"channel",{get:function(){this._channel=this._channel||new o(this);return this._channel}});Object.defineProperty(V1.prototype,"configuration",{get:function(){this._configuration=this._configuration||new s(this);return this._configuration}});Object.defineProperty(V1.prototype,"flexFlow",{get:function(){this._flexFlow=this._flexFlow||new r(this);return this._flexFlow}});Object.defineProperty(V1.prototype,"webChannel",{get:function(){this._webChannel=this._webChannel||new a(this);return this._webChannel}});t.exports=V1},84596:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ChannelList(t){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={};ChannelListInstance._uri=`/Channels`;ChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.flexFlowSid)){throw new Error('Required parameter "opts.flexFlowSid" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}if(o.isUndefined(t.chatUserFriendlyName)){throw new Error('Required parameter "opts.chatUserFriendlyName" missing.')}if(o.isUndefined(t.chatFriendlyName)){throw new Error('Required parameter "opts.chatFriendlyName" missing.')}var i=n.defer();var s=u.of({FlexFlowSid:o.get(t,"flexFlowSid"),Identity:o.get(t,"identity"),ChatUserFriendlyName:o.get(t,"chatUserFriendlyName"),ChatFriendlyName:o.get(t,"chatFriendlyName"),Target:o.get(t,"target"),ChatUniqueName:o.get(t,"chatUniqueName"),PreEngagementData:o.get(t,"preEngagementData"),TaskSid:o.get(t,"taskSid"),TaskAttributes:o.get(t,"taskAttributes"),LongLived:a.bool(o.get(t,"longLived"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.get=function get(t){return new d(this._version,t)};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};f=function ChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ChannelInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.flexFlowSid=e.flex_flow_sid;this.sid=e.sid;this.userSid=e.user_sid;this.taskSid=e.task_sid;this.url=e.url;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ChannelContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Channels/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:h,ChannelPage:f,ChannelInstance:p,ChannelContext:d}},59150:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ConfigurationList(t){function ConfigurationListInstance(t){return ConfigurationListInstance.get(t)}ConfigurationListInstance._version=t;ConfigurationListInstance._solution={};ConfigurationListInstance.get=function get(){return new p(this._version)};ConfigurationListInstance.toJSON=function toJSON(){return this._solution};ConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConfigurationListInstance};h=function ConfigurationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ConfigurationInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.attributes=e.attributes;this.status=e.status;this.taskrouterWorkspaceSid=e.taskrouter_workspace_sid;this.taskrouterTargetWorkflowSid=e.taskrouter_target_workflow_sid;this.taskrouterTargetTaskqueueSid=e.taskrouter_target_taskqueue_sid;this.taskrouterTaskqueues=e.taskrouter_taskqueues;this.taskrouterSkills=e.taskrouter_skills;this.taskrouterWorkerChannels=e.taskrouter_worker_channels;this.taskrouterWorkerAttributes=e.taskrouter_worker_attributes;this.taskrouterOfflineActivitySid=e.taskrouter_offline_activity_sid;this.runtimeDomain=e.runtime_domain;this.messagingServiceInstanceSid=e.messaging_service_instance_sid;this.chatServiceInstanceSid=e.chat_service_instance_sid;this.flexServiceInstanceSid=e.flex_service_instance_sid;this.uiLanguage=e.ui_language;this.uiAttributes=e.ui_attributes;this.uiDependencies=e.ui_dependencies;this.uiVersion=e.ui_version;this.serviceVersion=e.service_version;this.callRecordingEnabled=e.call_recording_enabled;this.callRecordingWebhookUrl=e.call_recording_webhook_url;this.crmEnabled=e.crm_enabled;this.crmType=e.crm_type;this.crmCallbackUrl=e.crm_callback_url;this.crmFallbackUrl=e.crm_fallback_url;this.crmAttributes=e.crm_attributes;this.publicAttributes=e.public_attributes;this.pluginServiceEnabled=e.plugin_service_enabled;this.pluginServiceAttributes=e.plugin_service_attributes;this.integrations=e.integrations;this.outboundCallFlows=e.outbound_call_flows;this.serverlessServiceSids=e.serverless_service_sids;this.queueStatsConfiguration=e.queue_stats_configuration;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.create=function create(t){return this._proxy.create(t)};f.prototype.update=function update(t){return this._proxy.update(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConfigurationContext(t){this._version=t;this._solution={};this._uri=`/Configuration`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({UiVersion:o.get(t,"uiVersion")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.create=function create(t){var e=n.defer();var i=this._version.create({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t){var e=n.defer();var i=this._version.update({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConfigurationList:u,ConfigurationPage:h,ConfigurationInstance:f,ConfigurationContext:p}},85854:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function FlexFlowList(t){function FlexFlowListInstance(t){return FlexFlowListInstance.get(t)}FlexFlowListInstance._version=t;FlexFlowListInstance._solution={};FlexFlowListInstance._uri=`/FlexFlows`;FlexFlowListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FlexFlowListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FlexFlowListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlexFlowListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlexFlowListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.chatServiceSid)){throw new Error('Required parameter "opts.chatServiceSid" missing.')}if(o.isUndefined(t.channelType)){throw new Error('Required parameter "opts.channelType" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),ChatServiceSid:o.get(t,"chatServiceSid"),ChannelType:o.get(t,"channelType"),ContactIdentity:o.get(t,"contactIdentity"),Enabled:a.bool(o.get(t,"enabled")),IntegrationType:o.get(t,"integrationType"),"Integration.FlowSid":o.get(t,"integration.flowSid"),"Integration.Url":o.get(t,"integration.url"),"Integration.WorkspaceSid":o.get(t,"integration.workspaceSid"),"Integration.WorkflowSid":o.get(t,"integration.workflowSid"),"Integration.Channel":o.get(t,"integration.channel"),"Integration.Timeout":o.get(t,"integration.timeout"),"Integration.Priority":o.get(t,"integration.priority"),"Integration.CreationOnMessage":a.bool(o.get(t,"integration.creationOnMessage")),LongLived:a.bool(o.get(t,"longLived")),JanitorEnabled:a.bool(o.get(t,"janitorEnabled")),"Integration.RetryCount":o.get(t,"integration.retryCount")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlexFlowListInstance.get=function get(t){return new d(this._version,t)};FlexFlowListInstance.toJSON=function toJSON(){return this._solution};FlexFlowListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlexFlowListInstance};f=function FlexFlowPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FlexFlowInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.sid=e.sid;this.friendlyName=e.friendly_name;this.chatServiceSid=e.chat_service_sid;this.channelType=e.channel_type;this.contactIdentity=e.contact_identity;this.enabled=e.enabled;this.integrationType=e.integration_type;this.integration=e.integration;this.longLived=e.long_lived;this.janitorEnabled=e.janitor_enabled;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FlexFlowContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/FlexFlows/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),ChatServiceSid:o.get(t,"chatServiceSid"),ChannelType:o.get(t,"channelType"),ContactIdentity:o.get(t,"contactIdentity"),Enabled:a.bool(o.get(t,"enabled")),IntegrationType:o.get(t,"integrationType"),"Integration.FlowSid":o.get(t,"integration.flowSid"),"Integration.Url":o.get(t,"integration.url"),"Integration.WorkspaceSid":o.get(t,"integration.workspaceSid"),"Integration.WorkflowSid":o.get(t,"integration.workflowSid"),"Integration.Channel":o.get(t,"integration.channel"),"Integration.Timeout":o.get(t,"integration.timeout"),"Integration.Priority":o.get(t,"integration.priority"),"Integration.CreationOnMessage":a.bool(o.get(t,"integration.creationOnMessage")),LongLived:a.bool(o.get(t,"longLived")),JanitorEnabled:a.bool(o.get(t,"janitorEnabled")),"Integration.RetryCount":o.get(t,"integration.retryCount")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlexFlowList:h,FlexFlowPage:f,FlexFlowInstance:p,FlexFlowContext:d}},19769:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function WebChannelList(t){function WebChannelListInstance(t){return WebChannelListInstance.get(t)}WebChannelListInstance._version=t;WebChannelListInstance._solution={};WebChannelListInstance._uri=`/WebChannels`;WebChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebChannelListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.flexFlowSid)){throw new Error('Required parameter "opts.flexFlowSid" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}if(o.isUndefined(t.customerFriendlyName)){throw new Error('Required parameter "opts.customerFriendlyName" missing.')}if(o.isUndefined(t.chatFriendlyName)){throw new Error('Required parameter "opts.chatFriendlyName" missing.')}var i=n.defer();var s=a.of({FlexFlowSid:o.get(t,"flexFlowSid"),Identity:o.get(t,"identity"),CustomerFriendlyName:o.get(t,"customerFriendlyName"),ChatFriendlyName:o.get(t,"chatFriendlyName"),ChatUniqueName:o.get(t,"chatUniqueName"),PreEngagementData:o.get(t,"preEngagementData")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebChannelListInstance.get=function get(t){return new p(this._version,t)};WebChannelListInstance.toJSON=function toJSON(){return this._solution};WebChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebChannelListInstance};h=function WebChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WebChannelInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.flexFlowSid=e.flex_flow_sid;this.sid=e.sid;this.url=e.url;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebChannelContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/WebChannels/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({ChatStatus:o.get(t,"chatStatus"),PostEngagementData:o.get(t,"postEngagementData")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebChannelList:u,WebChannelPage:h,WebChannelInstance:f,WebChannelContext:p}},46133:(t,e,i)=>{"use strict";var n=i(90250);var o=i(18097).CallList;var s=i(34571).RoomList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._calls=undefined;this._rooms=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"calls",{get:function(){this._calls=this._calls||new o(this);return this._calls}});Object.defineProperty(V1.prototype,"rooms",{get:function(){this._rooms=this._rooms||new s(this);return this._rooms}});t.exports=V1},18097:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(23344).CallSummaryList;var c=i(43552).EventList;var a=i(83756).MetricList;var u=i(60938);var h=i(72142);var f;var p;var d;var l;f=function CallList(t){function CallListInstance(t){return CallListInstance.get(t)}CallListInstance._version=t;CallListInstance._solution={};CallListInstance.get=function get(t){return new l(this._version,t)};CallListInstance.toJSON=function toJSON(){return this._solution};CallListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CallListInstance};p=function CallPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,u.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CallInstance(t,e,i){this._version=t;this.sid=e.sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.events=function events(){return this._proxy.events};d.prototype.metrics=function metrics(){return this._proxy.metrics};d.prototype.summary=function summary(){return this._proxy.summary};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function CallContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Voice/${e}`;this._events=undefined;this._metrics=undefined;this._summary=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"events",{get:function(){if(!this._events){this._events=new c(this._version,this._solution.sid)}return this._events}});Object.defineProperty(l.prototype,"metrics",{get:function(){if(!this._metrics){this._metrics=new a(this._version,this._solution.sid)}return this._metrics}});Object.defineProperty(l.prototype,"summary",{get:function(){if(!this._summary){this._summary=new r(this._version,this._solution.sid)}return this._summary}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CallList:f,CallPage:p,CallInstance:d,CallContext:l}},43552:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function EventList(t,e){function EventListInstance(t){return EventListInstance.get(t)}EventListInstance._version=t;EventListInstance._solution={callSid:e};EventListInstance._uri=`/Voice/${e}/Events`;EventListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EventListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EventListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({Edge:o.get(t,"edge"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.toJSON=function toJSON(){return this._solution};EventListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EventListInstance};u=function EventPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.callSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function EventInstance(t,e,i){this._version=t;this.timestamp=e.timestamp;this.callSid=e.call_sid;this.accountSid=e.account_sid;this.edge=e.edge;this.group=e.group;this.level=e.level;this.name=e.name;this.carrierEdge=e.carrier_edge;this.sipEdge=e.sip_edge;this.sdkEdge=e.sdk_edge;this.clientEdge=e.client_edge;this._context=undefined;this._solution={callSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EventList:a,EventPage:u,EventInstance:h}},83756:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function MetricList(t,e){function MetricListInstance(t){return MetricListInstance.get(t)}MetricListInstance._version=t;MetricListInstance._solution={callSid:e};MetricListInstance._uri=`/Voice/${e}/Metrics`;MetricListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MetricListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MetricListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({Edge:o.get(t,"edge"),Direction:o.get(t,"direction"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MetricListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MetricListInstance.toJSON=function toJSON(){return this._solution};MetricListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MetricListInstance};u=function MetricPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.callSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function MetricInstance(t,e,i){this._version=t;this.timestamp=e.timestamp;this.callSid=e.call_sid;this.accountSid=e.account_sid;this.edge=e.edge;this.direction=e.direction;this.carrierEdge=e.carrier_edge;this.sipEdge=e.sip_edge;this.sdkEdge=e.sdk_edge;this.clientEdge=e.client_edge;this._context=undefined;this._solution={callSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MetricList:a,MetricPage:u,MetricInstance:h}},23344:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CallSummaryList(t,e){function CallSummaryListInstance(t){return CallSummaryListInstance.get(t)}CallSummaryListInstance._version=t;CallSummaryListInstance._solution={callSid:e};CallSummaryListInstance.get=function get(){return new p(this._version,this._solution.callSid)};CallSummaryListInstance.toJSON=function toJSON(){return this._solution};CallSummaryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CallSummaryListInstance};h=function CallSummaryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.callSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CallSummaryInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.callSid=e.call_sid;this.callType=e.call_type;this.callState=e.call_state;this.processingState=e.processing_state;this.startTime=c.iso8601DateTime(e.start_time);this.endTime=c.iso8601DateTime(e.end_time);this.duration=c.integer(e.duration);this.connectDuration=c.integer(e.connect_duration);this.from=e.from;this.to=e.to;this.carrierEdge=e.carrier_edge;this.clientEdge=e.client_edge;this.sdkEdge=e.sdk_edge;this.sipEdge=e.sip_edge;this.tags=e.tags;this.url=e.url;this.attributes=e.attributes;this.properties=e.properties;this.trust=e.trust;this._context=undefined;this._solution={callSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.callSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CallSummaryContext(t,e){this._version=t;this._solution={callSid:e};this._uri=`/Voice/${e}/Summary`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({ProcessingState:o.get(t,"processingState")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.callSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CallSummaryList:u,CallSummaryPage:h,CallSummaryInstance:f,CallSummaryContext:p}},34571:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(32410).ParticipantList;var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function RoomList(t){function RoomListInstance(t){return RoomListInstance.get(t)}RoomListInstance._version=t;RoomListInstance._solution={};RoomListInstance._uri=`/Video/Rooms`;RoomListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoomListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoomListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({RoomType:u.map(o.get(t,"roomType"),function(t){return t}),Codec:u.map(o.get(t,"codec"),function(t){return t}),RoomName:o.get(t,"roomName"),CreatedAfter:u.iso8601DateTime(o.get(t,"createdAfter")),CreatedBefore:u.iso8601DateTime(o.get(t,"createdBefore")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomListInstance.get=function get(t){return new l(this._version,t)};RoomListInstance.toJSON=function toJSON(){return this._solution};RoomListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoomListInstance};p=function RoomPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoomInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.roomSid=e.room_sid;this.roomName=e.room_name;this.createTime=a.iso8601DateTime(e.create_time);this.endTime=a.iso8601DateTime(e.end_time);this.roomType=e.room_type;this.roomStatus=e.room_status;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.createdMethod=e.created_method;this.endReason=e.end_reason;this.maxParticipants=a.integer(e.max_participants);this.uniqueParticipants=a.integer(e.unique_participants);this.uniqueParticipantIdentities=a.integer(e.unique_participant_identities);this.concurrentParticipants=a.integer(e.concurrent_participants);this.maxConcurrentParticipants=a.integer(e.max_concurrent_participants);this.codecs=e.codecs;this.mediaRegion=e.media_region;this.durationSec=a.integer(e.duration_sec);this.totalParticipantDurationSec=a.integer(e.total_participant_duration_sec);this.totalRecordingDurationSec=a.integer(e.total_recording_duration_sec);this.processingState=e.processing_state;this.recordingEnabled=e.recording_enabled;this.edgeLocation=e.edge_location;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={roomSid:i||this.roomSid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.roomSid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.participants=function participants(){return this._proxy.participants};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function RoomContext(t,e){this._version=t;this._solution={roomSid:e};this._uri=`/Video/Rooms/${e}`;this._participants=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.roomSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"participants",{get:function(){if(!this._participants){this._participants=new c(this._version,this._solution.roomSid)}return this._participants}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoomList:f,RoomPage:p,RoomInstance:d,RoomContext:l}},32410:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ParticipantList(t,e){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={roomSid:e};ParticipantListInstance._uri=`/Video/Rooms/${e}/Participants`;ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new p(this._version,this._solution.roomSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};h=function ParticipantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.roomSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ParticipantInstance(t,e,i,n){this._version=t;this.participantSid=e.participant_sid;this.participantIdentity=e.participant_identity;this.joinTime=c.iso8601DateTime(e.join_time);this.leaveTime=c.iso8601DateTime(e.leave_time);this.durationSec=c.integer(e.duration_sec);this.accountSid=e.account_sid;this.roomSid=e.room_sid;this.status=e.status;this.codecs=e.codecs;this.endReason=e.end_reason;this.errorCode=c.integer(e.error_code);this.errorCodeUrl=e.error_code_url;this.mediaRegion=e.media_region;this.properties=e.properties;this.edgeLocation=e.edge_location;this.publisherInfo=e.publisher_info;this.url=e.url;this._context=undefined;this._solution={roomSid:i,participantSid:n||this.participantSid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.roomSid,this._solution.participantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ParticipantContext(t,e,i){this._version=t;this._solution={roomSid:e,participantSid:i};this._uri=`/Video/Rooms/${e}/Participants/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.roomSid,this._solution.participantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:u,ParticipantPage:h,ParticipantInstance:f,ParticipantContext:p}},76365:(t,e,i)=>{"use strict";var n=i(90250);var o=i(28705).CredentialList;var s=i(54677).ServiceList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._credentials=undefined;this._services=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"credentials",{get:function(){this._credentials=this._credentials||new o(this);return this._credentials}});Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V1},17014:(t,e,i)=>{"use strict";var n=i(90250);var o=i(74557).CredentialList;var s=i(95950).ServiceList;var r=i(64351);function V2(t){r.prototype.constructor.call(this,t,"v2");this._credentials=undefined;this._services=undefined}n.extend(V2.prototype,r.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"credentials",{get:function(){this._credentials=this._credentials||new o(this);return this._credentials}});Object.defineProperty(V2.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V2},28705:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},54677:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(91981).ChannelList;var c=i(60938);var a=i(31693).RoleList;var u=i(88559).UserList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new m(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};l=function ServicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.defaultServiceRoleSid=e.default_service_role_sid;this.defaultChannelRoleSid=e.default_channel_role_sid;this.defaultChannelCreatorRoleSid=e.default_channel_creator_role_sid;this.readStatusEnabled=e.read_status_enabled;this.reachabilityEnabled=e.reachability_enabled;this.typingIndicatorTimeout=h.integer(e.typing_indicator_timeout);this.consumptionReportInterval=h.integer(e.consumption_report_interval);this.limits=e.limits;this.webhooks=e.webhooks;this.preWebhookUrl=e.pre_webhook_url;this.postWebhookUrl=e.post_webhook_url;this.webhookMethod=e.webhook_method;this.webhookFilters=e.webhook_filters;this.notifications=e.notifications;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.channels=function channels(){return this._proxy.channels};v.prototype.roles=function roles(){return this._proxy.roles};v.prototype.users=function users(){return this._proxy.users};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._channels=undefined;this._roles=undefined;this._users=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),DefaultServiceRoleSid:o.get(t,"defaultServiceRoleSid"),DefaultChannelRoleSid:o.get(t,"defaultChannelRoleSid"),DefaultChannelCreatorRoleSid:o.get(t,"defaultChannelCreatorRoleSid"),ReadStatusEnabled:f.bool(o.get(t,"readStatusEnabled")),ReachabilityEnabled:f.bool(o.get(t,"reachabilityEnabled")),TypingIndicatorTimeout:o.get(t,"typingIndicatorTimeout"),ConsumptionReportInterval:o.get(t,"consumptionReportInterval"),"Notifications.NewMessage.Enabled":f.bool(o.get(t,"notifications.newMessage.enabled")),"Notifications.NewMessage.Template":o.get(t,"notifications.newMessage.template"),"Notifications.AddedToChannel.Enabled":f.bool(o.get(t,"notifications.addedToChannel.enabled")),"Notifications.AddedToChannel.Template":o.get(t,"notifications.addedToChannel.template"),"Notifications.RemovedFromChannel.Enabled":f.bool(o.get(t,"notifications.removedFromChannel.enabled")),"Notifications.RemovedFromChannel.Template":o.get(t,"notifications.removedFromChannel.template"),"Notifications.InvitedToChannel.Enabled":f.bool(o.get(t,"notifications.invitedToChannel.enabled")),"Notifications.InvitedToChannel.Template":o.get(t,"notifications.invitedToChannel.template"),PreWebhookUrl:o.get(t,"preWebhookUrl"),PostWebhookUrl:o.get(t,"postWebhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),WebhookFilters:f.map(o.get(t,"webhookFilters"),function(t){return t}),"Webhooks.OnMessageSend.Url":o.get(t,"webhooks.onMessageSend.url"),"Webhooks.OnMessageSend.Method":o.get(t,"webhooks.onMessageSend.method"),"Webhooks.OnMessageUpdate.Url":o.get(t,"webhooks.onMessageUpdate.url"),"Webhooks.OnMessageUpdate.Method":o.get(t,"webhooks.onMessageUpdate.method"),"Webhooks.OnMessageRemove.Url":o.get(t,"webhooks.onMessageRemove.url"),"Webhooks.OnMessageRemove.Method":o.get(t,"webhooks.onMessageRemove.method"),"Webhooks.OnChannelAdd.Url":o.get(t,"webhooks.onChannelAdd.url"),"Webhooks.OnChannelAdd.Method":o.get(t,"webhooks.onChannelAdd.method"),"Webhooks.OnChannelDestroy.Url":o.get(t,"webhooks.onChannelDestroy.url"),"Webhooks.OnChannelDestroy.Method":o.get(t,"webhooks.onChannelDestroy.method"),"Webhooks.OnChannelUpdate.Url":o.get(t,"webhooks.onChannelUpdate.url"),"Webhooks.OnChannelUpdate.Method":o.get(t,"webhooks.onChannelUpdate.method"),"Webhooks.OnMemberAdd.Url":o.get(t,"webhooks.onMemberAdd.url"),"Webhooks.OnMemberAdd.Method":o.get(t,"webhooks.onMemberAdd.method"),"Webhooks.OnMemberRemove.Url":o.get(t,"webhooks.onMemberRemove.url"),"Webhooks.OnMemberRemove.Method":o.get(t,"webhooks.onMemberRemove.method"),"Webhooks.OnMessageSent.Url":o.get(t,"webhooks.onMessageSent.url"),"Webhooks.OnMessageSent.Method":o.get(t,"webhooks.onMessageSent.method"),"Webhooks.OnMessageUpdated.Url":o.get(t,"webhooks.onMessageUpdated.url"),"Webhooks.OnMessageUpdated.Method":o.get(t,"webhooks.onMessageUpdated.method"),"Webhooks.OnMessageRemoved.Url":o.get(t,"webhooks.onMessageRemoved.url"),"Webhooks.OnMessageRemoved.Method":o.get(t,"webhooks.onMessageRemoved.method"),"Webhooks.OnChannelAdded.Url":o.get(t,"webhooks.onChannelAdded.url"),"Webhooks.OnChannelAdded.Method":o.get(t,"webhooks.onChannelAdded.method"),"Webhooks.OnChannelDestroyed.Url":o.get(t,"webhooks.onChannelDestroyed.url"),"Webhooks.OnChannelDestroyed.Method":o.get(t,"webhooks.onChannelDestroyed.method"),"Webhooks.OnChannelUpdated.Url":o.get(t,"webhooks.onChannelUpdated.url"),"Webhooks.OnChannelUpdated.Method":o.get(t,"webhooks.onChannelUpdated.method"),"Webhooks.OnMemberAdded.Url":o.get(t,"webhooks.onMemberAdded.url"),"Webhooks.OnMemberAdded.Method":o.get(t,"webhooks.onMemberAdded.method"),"Webhooks.OnMemberRemoved.Url":o.get(t,"webhooks.onMemberRemoved.url"),"Webhooks.OnMemberRemoved.Method":o.get(t,"webhooks.onMemberRemoved.method"),"Limits.ChannelMembers":o.get(t,"limits.channelMembers"),"Limits.UserChannels":o.get(t,"limits.userChannels")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"channels",{get:function(){if(!this._channels){this._channels=new r(this._version,this._solution.sid)}return this._channels}});Object.defineProperty(m.prototype,"roles",{get:function(){if(!this._roles){this._roles=new a(this._version,this._solution.sid)}return this._roles}});Object.defineProperty(m.prototype,"users",{get:function(){if(!this._users){this._users=new u(this._version,this._solution.sid)}return this._users}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:d,ServicePage:l,ServiceInstance:v,ServiceContext:m}},91981:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(88085).InviteList;var c=i(91007).MemberList;var a=i(57885).MessageList;var u=i(60938);var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ChannelList(t,e){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={serviceSid:e};ChannelListInstance._uri=`/Services/${e}/Channels`;ChannelListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),Type:o.get(t,"type")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({Type:f.map(o.get(t,"type"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.get=function get(t){return new m(this._version,this._solution.serviceSid,t)};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};l=function ChannelPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,u.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.serviceSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ChannelInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.type=e.type;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this.membersCount=h.integer(e.members_count);this.messagesCount=h.integer(e.messages_count);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.members=function members(){return this._proxy.members};v.prototype.messages=function messages(){return this._proxy.messages};v.prototype.invites=function invites(){return this._proxy.invites};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ChannelContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Channels/${i}`;this._members=undefined;this._messages=undefined;this._invites=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"members",{get:function(){if(!this._members){this._members=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._members}});Object.defineProperty(m.prototype,"messages",{get:function(){if(!this._messages){this._messages=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._messages}});Object.defineProperty(m.prototype,"invites",{get:function(){if(!this._invites){this._invites=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._invites}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:d,ChannelPage:l,ChannelInstance:v,ChannelContext:m}},88085:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function InviteList(t,e,i){function InviteListInstance(t){return InviteListInstance.get(t)}InviteListInstance._version=t;InviteListInstance._solution={serviceSid:e,channelSid:i};InviteListInstance._uri=`/Services/${e}/Channels/${i}/Invites`;InviteListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InviteListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InviteListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};InviteListInstance.toJSON=function toJSON(){return this._solution};InviteListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InviteListInstance};f=function InvitePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InviteInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.createdBy=e.created_by;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function InviteContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Invites/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InviteList:h,InvitePage:f,InviteInstance:p,InviteContext:d}},91007:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MemberList(t,e,i){function MemberListInstance(t){return MemberListInstance.get(t)}MemberListInstance._version=t;MemberListInstance._solution={serviceSid:e,channelSid:i};MemberListInstance._uri=`/Services/${e}/Channels/${i}/Members`;MemberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MemberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MemberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MemberListInstance.toJSON=function toJSON(){return this._solution};MemberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MemberListInstance};f=function MemberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MemberInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.lastConsumptionTimestamp=c.iso8601DateTime(e.last_consumption_timestamp);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MemberContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Members/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MemberList:h,MemberPage:f,MemberInstance:p,MemberContext:d}},57885:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function MessageList(t,e,i){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={serviceSid:e,channelSid:i};MessageListInstance._uri=`/Services/${e}/Channels/${i}/Messages`;MessageListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.body)){throw new Error('Required parameter "opts.body" missing.')}var i=n.defer();var s=a.of({Body:o.get(t,"body"),From:o.get(t,"from"),Attributes:o.get(t,"attributes")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Order:o.get(t,"order"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};h=function MessagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.channelSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function MessageInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.attributes=e.attributes;this.serviceSid=e.service_sid;this.to=e.to;this.channelSid=e.channel_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.wasEdited=e.was_edited;this.from=e.from;this.body=e.body;this.index=c.integer(e.index);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessageContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Messages/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Body:o.get(t,"body"),Attributes:o.get(t,"attributes")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:u,MessagePage:h,MessageInstance:f,MessageContext:p}},31693:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t,e){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={serviceSid:e};RoleListInstance._uri=`/Services/${e}/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Roles/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},88559:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(24284).UserChannelList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function UserList(t,e){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={serviceSid:e};UserListInstance._uri=`/Services/${e}/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};f=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.attributes=e.attributes;this.friendlyName=e.friendly_name;this.roleSid=e.role_sid;this.identity=e.identity;this.isOnline=e.is_online;this.isNotifiable=e.is_notifiable;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.joinedChannelsCount=a.integer(e.joined_channels_count);this.links=e.links;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.userChannels=function userChannels(){return this._proxy.userChannels};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Users/${i}`;this._userChannels=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"userChannels",{get:function(){if(!this._userChannels){this._userChannels=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._userChannels}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:h,UserPage:f,UserInstance:p,UserContext:d}},24284:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function UserChannelList(t,e,i){function UserChannelListInstance(t){return UserChannelListInstance.get(t)}UserChannelListInstance._version=t;UserChannelListInstance._solution={serviceSid:e,userSid:i};UserChannelListInstance._uri=`/Services/${e}/Users/${i}/Channels`;UserChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.toJSON=function toJSON(){return this._solution};UserChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserChannelListInstance};h=function UserChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.userSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UserChannelInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.memberSid=e.member_sid;this.status=e.status;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.unreadMessagesCount=c.integer(e.unread_messages_count);this.links=e.links;this._context=undefined;this._solution={serviceSid:i,userSid:n}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserChannelList:u,UserChannelPage:h,UserChannelInstance:f}},74557:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},95950:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(80750).BindingList;var c=i(80866).ChannelList;var a=i(60938);var u=i(30422).RoleList;var h=i(89977).UserList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new _(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};v=function ServicePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,a.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.defaultServiceRoleSid=e.default_service_role_sid;this.defaultChannelRoleSid=e.default_channel_role_sid;this.defaultChannelCreatorRoleSid=e.default_channel_creator_role_sid;this.readStatusEnabled=e.read_status_enabled;this.reachabilityEnabled=e.reachability_enabled;this.typingIndicatorTimeout=f.integer(e.typing_indicator_timeout);this.consumptionReportInterval=f.integer(e.consumption_report_interval);this.limits=e.limits;this.preWebhookUrl=e.pre_webhook_url;this.postWebhookUrl=e.post_webhook_url;this.webhookMethod=e.webhook_method;this.webhookFilters=e.webhook_filters;this.preWebhookRetryCount=f.integer(e.pre_webhook_retry_count);this.postWebhookRetryCount=f.integer(e.post_webhook_retry_count);this.notifications=e.notifications;this.media=e.media;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.channels=function channels(){return this._proxy.channels};m.prototype.roles=function roles(){return this._proxy.roles};m.prototype.users=function users(){return this._proxy.users};m.prototype.bindings=function bindings(){return this._proxy.bindings};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._channels=undefined;this._roles=undefined;this._users=undefined;this._bindings=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),DefaultServiceRoleSid:o.get(t,"defaultServiceRoleSid"),DefaultChannelRoleSid:o.get(t,"defaultChannelRoleSid"),DefaultChannelCreatorRoleSid:o.get(t,"defaultChannelCreatorRoleSid"),ReadStatusEnabled:p.bool(o.get(t,"readStatusEnabled")),ReachabilityEnabled:p.bool(o.get(t,"reachabilityEnabled")),TypingIndicatorTimeout:o.get(t,"typingIndicatorTimeout"),ConsumptionReportInterval:o.get(t,"consumptionReportInterval"),"Notifications.NewMessage.Enabled":p.bool(o.get(t,"notifications.newMessage.enabled")),"Notifications.NewMessage.Template":o.get(t,"notifications.newMessage.template"),"Notifications.NewMessage.Sound":o.get(t,"notifications.newMessage.sound"),"Notifications.NewMessage.BadgeCountEnabled":p.bool(o.get(t,"notifications.newMessage.badgeCountEnabled")),"Notifications.AddedToChannel.Enabled":p.bool(o.get(t,"notifications.addedToChannel.enabled")),"Notifications.AddedToChannel.Template":o.get(t,"notifications.addedToChannel.template"),"Notifications.AddedToChannel.Sound":o.get(t,"notifications.addedToChannel.sound"),"Notifications.RemovedFromChannel.Enabled":p.bool(o.get(t,"notifications.removedFromChannel.enabled")),"Notifications.RemovedFromChannel.Template":o.get(t,"notifications.removedFromChannel.template"),"Notifications.RemovedFromChannel.Sound":o.get(t,"notifications.removedFromChannel.sound"),"Notifications.InvitedToChannel.Enabled":p.bool(o.get(t,"notifications.invitedToChannel.enabled")),"Notifications.InvitedToChannel.Template":o.get(t,"notifications.invitedToChannel.template"),"Notifications.InvitedToChannel.Sound":o.get(t,"notifications.invitedToChannel.sound"),PreWebhookUrl:o.get(t,"preWebhookUrl"),PostWebhookUrl:o.get(t,"postWebhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),WebhookFilters:p.map(o.get(t,"webhookFilters"),function(t){return t}),"Limits.ChannelMembers":o.get(t,"limits.channelMembers"),"Limits.UserChannels":o.get(t,"limits.userChannels"),"Media.CompatibilityMessage":o.get(t,"media.compatibilityMessage"),PreWebhookRetryCount:o.get(t,"preWebhookRetryCount"),PostWebhookRetryCount:o.get(t,"postWebhookRetryCount"),"Notifications.LogEnabled":p.bool(o.get(t,"notifications.logEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"channels",{get:function(){if(!this._channels){this._channels=new c(this._version,this._solution.sid)}return this._channels}});Object.defineProperty(_.prototype,"roles",{get:function(){if(!this._roles){this._roles=new u(this._version,this._solution.sid)}return this._roles}});Object.defineProperty(_.prototype,"users",{get:function(){if(!this._users){this._users=new h(this._version,this._solution.sid)}return this._users}});Object.defineProperty(_.prototype,"bindings",{get:function(){if(!this._bindings){this._bindings=new r(this._version,this._solution.sid)}return this._bindings}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:l,ServicePage:v,ServiceInstance:m,ServiceContext:_}},80750:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function BindingList(t,e){function BindingListInstance(t){return BindingListInstance.get(t)}BindingListInstance._version=t;BindingListInstance._solution={serviceSid:e};BindingListInstance._uri=`/Services/${e}/Bindings`;BindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({BindingType:a.map(o.get(t,"bindingType"),function(t){return t}),Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};BindingListInstance.toJSON=function toJSON(){return this._solution};BindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BindingListInstance};f=function BindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BindingInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.endpoint=e.endpoint;this.identity=e.identity;this.credentialSid=e.credential_sid;this.bindingType=e.binding_type;this.messageTypes=e.message_types;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BindingContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Bindings/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BindingList:h,BindingPage:f,BindingInstance:p,BindingContext:d}},80866:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(16469).InviteList;var c=i(94912).MemberList;var a=i(34682).MessageList;var u=i(60938);var h=i(77698).WebhookList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ChannelList(t,e){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={serviceSid:e};ChannelListInstance._uri=`/Services/${e}/Channels`;ChannelListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),Type:o.get(t,"type"),DateCreated:p.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:p.iso8601DateTime(o.get(t,"dateUpdated")),CreatedBy:o.get(t,"createdBy")});var r=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({Type:p.map(o.get(t,"type"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.get=function get(t){return new _(this._version,this._solution.serviceSid,t)};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};v=function ChannelPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,u.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t,this._solution.serviceSid)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ChannelInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.attributes=e.attributes;this.type=e.type;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this.membersCount=f.integer(e.members_count);this.messagesCount=f.integer(e.messages_count);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.members=function members(){return this._proxy.members};m.prototype.messages=function messages(){return this._proxy.messages};m.prototype.invites=function invites(){return this._proxy.invites};m.prototype.webhooks=function webhooks(){return this._proxy.webhooks};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ChannelContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Channels/${i}`;this._members=undefined;this._messages=undefined;this._invites=undefined;this._webhooks=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Attributes:o.get(t,"attributes"),DateCreated:p.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:p.iso8601DateTime(o.get(t,"dateUpdated")),CreatedBy:o.get(t,"createdBy")});var r=d.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new m(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"members",{get:function(){if(!this._members){this._members=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._members}});Object.defineProperty(_.prototype,"messages",{get:function(){if(!this._messages){this._messages=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._messages}});Object.defineProperty(_.prototype,"invites",{get:function(){if(!this._invites){this._invites=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._invites}});Object.defineProperty(_.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new h(this._version,this._solution.serviceSid,this._solution.sid)}return this._webhooks}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:l,ChannelPage:v,ChannelInstance:m,ChannelContext:_}},16469:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function InviteList(t,e,i){function InviteListInstance(t){return InviteListInstance.get(t)}InviteListInstance._version=t;InviteListInstance._solution={serviceSid:e,channelSid:i};InviteListInstance._uri=`/Services/${e}/Channels/${i}/Invites`;InviteListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InviteListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InviteListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InviteListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};InviteListInstance.toJSON=function toJSON(){return this._solution};InviteListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InviteListInstance};f=function InvitePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InviteInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.createdBy=e.created_by;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function InviteContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Invites/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InviteList:h,InvitePage:f,InviteInstance:p,InviteContext:d}},94912:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MemberList(t,e,i){function MemberListInstance(t){return MemberListInstance.get(t)}MemberListInstance._version=t;MemberListInstance._solution={serviceSid:e,channelSid:i};MemberListInstance._uri=`/Services/${e}/Channels/${i}/Members`;MemberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp")),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MemberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MemberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MemberListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MemberListInstance.toJSON=function toJSON(){return this._solution};MemberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MemberListInstance};f=function MemberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MemberInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.channelSid=e.channel_sid;this.serviceSid=e.service_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.roleSid=e.role_sid;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.lastConsumptionTimestamp=c.iso8601DateTime(e.last_consumption_timestamp);this.url=e.url;this.attributes=e.attributes;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MemberContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Members/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({RoleSid:o.get(t,"roleSid"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp")),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),Attributes:o.get(t,"attributes")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MemberList:h,MemberPage:f,MemberInstance:p,MemberContext:d}},34682:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MessageList(t,e,i){function MessageListInstance(t){return MessageListInstance.get(t)}MessageListInstance._version=t;MessageListInstance._solution={serviceSid:e,channelSid:i};MessageListInstance._uri=`/Services/${e}/Channels/${i}/Messages`;MessageListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({From:o.get(t,"from"),Attributes:o.get(t,"attributes"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),LastUpdatedBy:o.get(t,"lastUpdatedBy"),Body:o.get(t,"body"),MediaSid:o.get(t,"mediaSid")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};MessageListInstance.toJSON=function toJSON(){return this._solution};MessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageListInstance};f=function MessagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessageInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.attributes=e.attributes;this.serviceSid=e.service_sid;this.to=e.to;this.channelSid=e.channel_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.lastUpdatedBy=e.last_updated_by;this.wasEdited=e.was_edited;this.from=e.from;this.body=e.body;this.index=c.integer(e.index);this.type=e.type;this.media=e.media;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MessageContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Messages/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Body:o.get(t,"body"),Attributes:o.get(t,"attributes"),DateCreated:a.iso8601DateTime(o.get(t,"dateCreated")),DateUpdated:a.iso8601DateTime(o.get(t,"dateUpdated")),LastUpdatedBy:o.get(t,"lastUpdatedBy"),From:o.get(t,"from")});var r=u.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageList:h,MessagePage:f,MessageInstance:p,MessageContext:d}},77698:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WebhookList(t,e,i){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={serviceSid:e,channelSid:i};WebhookListInstance._uri=`/Services/${e}/Channels/${i}/Webhooks`;WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.RetryCount":o.get(t,"configuration.retryCount")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.channelSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};f=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.channelSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.type=e.type;this.url=e.url;this.configuration=e.configuration;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={serviceSid:i,channelSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.channelSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WebhookContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,channelSid:i,sid:n};this._uri=`/Services/${e}/Channels/${i}/Webhooks/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"Configuration.Url":o.get(t,"configuration.url"),"Configuration.Method":o.get(t,"configuration.method"),"Configuration.Filters":a.map(o.get(t,"configuration.filters"),function(t){return t}),"Configuration.Triggers":a.map(o.get(t,"configuration.triggers"),function(t){return t}),"Configuration.FlowSid":o.get(t,"configuration.flowSid"),"Configuration.RetryCount":o.get(t,"configuration.retryCount")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.channelSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:h,WebhookPage:f,WebhookInstance:p,WebhookContext:d}},30422:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoleList(t,e){function RoleListInstance(t){return RoleListInstance.get(t)}RoleListInstance._version=t;RoleListInstance._solution={serviceSid:e};RoleListInstance._uri=`/Services/${e}/Roles`;RoleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoleListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};RoleListInstance.toJSON=function toJSON(){return this._solution};RoleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoleListInstance};f=function RolePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoleInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.permissions=e.permissions;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoleContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Roles/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.permission)){throw new Error('Required parameter "opts.permission" missing.')}var i=n.defer();var s=u.of({Permission:a.map(o.get(t,"permission"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoleList:h,RolePage:f,RoleInstance:p,RoleContext:d}},89977:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(38782).UserBindingList;var a=i(15790).UserChannelList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function UserList(t,e){function UserListInstance(t){return UserListInstance.get(t)}UserListInstance._version=t;UserListInstance._solution={serviceSid:e};UserListInstance._uri=`/Services/${e}/Users`;UserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=h.of({Identity:o.get(t,"identity"),RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.create({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};UserListInstance.toJSON=function toJSON(){return this._solution};UserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserListInstance};p=function UserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.attributes=e.attributes;this.friendlyName=e.friendly_name;this.roleSid=e.role_sid;this.identity=e.identity;this.isOnline=e.is_online;this.isNotifiable=e.is_notifiable;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.joinedChannelsCount=u.integer(e.joined_channels_count);this.links=e.links;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.userChannels=function userChannels(){return this._proxy.userChannels};d.prototype.userBindings=function userBindings(){return this._proxy.userBindings};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function UserContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Users/${i}`;this._userChannels=undefined;this._userBindings=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({RoleSid:o.get(t,"roleSid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName")});var r=h.of({"X-Twilio-Webhook-Enabled":o.get(t,"xTwilioWebhookEnabled")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"userChannels",{get:function(){if(!this._userChannels){this._userChannels=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._userChannels}});Object.defineProperty(l.prototype,"userBindings",{get:function(){if(!this._userBindings){this._userBindings=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._userBindings}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserList:f,UserPage:p,UserInstance:d,UserContext:l}},38782:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function UserBindingList(t,e,i){function UserBindingListInstance(t){return UserBindingListInstance.get(t)}UserBindingListInstance._version=t;UserBindingListInstance._solution={serviceSid:e,userSid:i};UserBindingListInstance._uri=`/Services/${e}/Users/${i}/Bindings`;UserBindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserBindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserBindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({BindingType:a.map(o.get(t,"bindingType"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserBindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserBindingListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.userSid,t)};UserBindingListInstance.toJSON=function toJSON(){return this._solution};UserBindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserBindingListInstance};f=function UserBindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.userSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserBindingInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.endpoint=e.endpoint;this.identity=e.identity;this.userSid=e.user_sid;this.credentialSid=e.credential_sid;this.bindingType=e.binding_type;this.messageTypes=e.message_types;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,userSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.userSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserBindingContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,userSid:i,sid:n};this._uri=`/Services/${e}/Users/${i}/Bindings/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserBindingList:h,UserBindingPage:f,UserBindingInstance:p,UserBindingContext:d}},15790:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function UserChannelList(t,e,i){function UserChannelListInstance(t){return UserChannelListInstance.get(t)}UserChannelListInstance._version=t;UserChannelListInstance._solution={serviceSid:e,userSid:i};UserChannelListInstance._uri=`/Services/${e}/Users/${i}/Channels`;UserChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UserChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UserChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UserChannelListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.userSid,t)};UserChannelListInstance.toJSON=function toJSON(){return this._solution};UserChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UserChannelListInstance};f=function UserChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.userSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UserChannelInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.channelSid=e.channel_sid;this.userSid=e.user_sid;this.memberSid=e.member_sid;this.status=e.status;this.lastConsumedMessageIndex=c.integer(e.last_consumed_message_index);this.unreadMessagesCount=c.integer(e.unread_messages_count);this.links=e.links;this.url=e.url;this.notificationLevel=e.notification_level;this._context=undefined;this._solution={serviceSid:i,userSid:n,channelSid:o||this.channelSid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function UserChannelContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,userSid:i,channelSid:n};this._uri=`/Services/${e}/Users/${i}/Channels/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({NotificationLevel:o.get(t,"notificationLevel"),LastConsumedMessageIndex:o.get(t,"lastConsumedMessageIndex"),LastConsumptionTimestamp:a.iso8601DateTime(o.get(t,"lastConsumptionTimestamp"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.userSid,this._solution.channelSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UserChannelList:h,UserChannelPage:f,UserChannelInstance:p,UserChannelContext:d}},23896:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64991).PhoneNumberList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._phoneNumbers=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"phoneNumbers",{get:function(){this._phoneNumbers=this._phoneNumbers||new o(this);return this._phoneNumbers}});t.exports=V1},64991:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function PhoneNumberList(t){function PhoneNumberListInstance(t){return PhoneNumberListInstance.get(t)}PhoneNumberListInstance._version=t;PhoneNumberListInstance._solution={};PhoneNumberListInstance.get=function get(t){return new p(this._version,t)};PhoneNumberListInstance.toJSON=function toJSON(){return this._solution};PhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PhoneNumberListInstance};h=function PhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PhoneNumberInstance(t,e,i){this._version=t;this.callerName=e.caller_name;this.countryCode=e.country_code;this.phoneNumber=e.phone_number;this.nationalFormat=e.national_format;this.carrier=e.carrier;this.addOns=e.add_ons;this.url=e.url;this._context=undefined;this._solution={phoneNumber:i||this.phoneNumber}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.phoneNumber)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PhoneNumberContext(t,e){this._version=t;this._solution={phoneNumber:e};this._uri=`/PhoneNumbers/${e}`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({CountryCode:o.get(t,"countryCode"),Type:c.map(o.get(t,"type"),function(t){return t}),AddOns:c.map(o.get(t,"addOns"),function(t){return t})});o.extend(s,c.prefixedCollapsibleMap(t.addOnsData,"AddOns"));var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.phoneNumber))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PhoneNumberList:u,PhoneNumberPage:h,PhoneNumberInstance:f,PhoneNumberContext:p}},98776:(t,e,i)=>{"use strict";var n=i(90250);var o=i(6161).DeactivationsList;var s=i(10046).ServiceList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._deactivations=undefined;this._services=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"deactivations",{get:function(){this._deactivations=this._deactivations||new o(this);return this._deactivations}});Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V1},6161:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function DeactivationsList(t){function DeactivationsListInstance(t){return DeactivationsListInstance.get(t)}DeactivationsListInstance._version=t;DeactivationsListInstance._solution={};DeactivationsListInstance.get=function get(){return new p(this._version)};DeactivationsListInstance.toJSON=function toJSON(){return this._solution};DeactivationsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeactivationsListInstance};h=function DeactivationsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DeactivationsInstance(t,e){this._version=t;this.redirectTo=e.redirect_to;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeactivationsContext(t){this._version=t;this._solution={};this._uri=`/Deactivations`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Date:c.iso8601Date(o.get(t,"date"))});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeactivationsList:u,DeactivationsPage:h,DeactivationsInstance:f,DeactivationsContext:p}},10046:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(78697).AlphaSenderList;var c=i(60938);var a=i(44017).PhoneNumberList;var u=i(64359).ShortCodeList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),InboundRequestUrl:o.get(t,"inboundRequestUrl"),InboundMethod:o.get(t,"inboundMethod"),FallbackUrl:o.get(t,"fallbackUrl"),FallbackMethod:o.get(t,"fallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StickySender:f.bool(o.get(t,"stickySender")),MmsConverter:f.bool(o.get(t,"mmsConverter")),SmartEncoding:f.bool(o.get(t,"smartEncoding")),ScanMessageContent:o.get(t,"scanMessageContent"),FallbackToLongCode:f.bool(o.get(t,"fallbackToLongCode")),AreaCodeGeomatch:f.bool(o.get(t,"areaCodeGeomatch")),ValidityPeriod:o.get(t,"validityPeriod"),SynchronousValidation:f.bool(o.get(t,"synchronousValidation"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new m(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};l=function ServicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.inboundRequestUrl=e.inbound_request_url;this.inboundMethod=e.inbound_method;this.fallbackUrl=e.fallback_url;this.fallbackMethod=e.fallback_method;this.statusCallback=e.status_callback;this.stickySender=e.sticky_sender;this.mmsConverter=e.mms_converter;this.smartEncoding=e.smart_encoding;this.scanMessageContent=e.scan_message_content;this.fallbackToLongCode=e.fallback_to_long_code;this.areaCodeGeomatch=e.area_code_geomatch;this.synchronousValidation=e.synchronous_validation;this.validityPeriod=h.integer(e.validity_period);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.phoneNumbers=function phoneNumbers(){return this._proxy.phoneNumbers};v.prototype.shortCodes=function shortCodes(){return this._proxy.shortCodes};v.prototype.alphaSenders=function alphaSenders(){return this._proxy.alphaSenders};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._phoneNumbers=undefined;this._shortCodes=undefined;this._alphaSenders=undefined};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),InboundRequestUrl:o.get(t,"inboundRequestUrl"),InboundMethod:o.get(t,"inboundMethod"),FallbackUrl:o.get(t,"fallbackUrl"),FallbackMethod:o.get(t,"fallbackMethod"),StatusCallback:o.get(t,"statusCallback"),StickySender:f.bool(o.get(t,"stickySender")),MmsConverter:f.bool(o.get(t,"mmsConverter")),SmartEncoding:f.bool(o.get(t,"smartEncoding")),ScanMessageContent:o.get(t,"scanMessageContent"),FallbackToLongCode:f.bool(o.get(t,"fallbackToLongCode")),AreaCodeGeomatch:f.bool(o.get(t,"areaCodeGeomatch")),ValidityPeriod:o.get(t,"validityPeriod"),SynchronousValidation:f.bool(o.get(t,"synchronousValidation"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"phoneNumbers",{get:function(){if(!this._phoneNumbers){this._phoneNumbers=new a(this._version,this._solution.sid)}return this._phoneNumbers}});Object.defineProperty(m.prototype,"shortCodes",{get:function(){if(!this._shortCodes){this._shortCodes=new u(this._version,this._solution.sid)}return this._shortCodes}});Object.defineProperty(m.prototype,"alphaSenders",{get:function(){if(!this._alphaSenders){this._alphaSenders=new r(this._version,this._solution.sid)}return this._alphaSenders}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:d,ServicePage:l,ServiceInstance:v,ServiceContext:m}},78697:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AlphaSenderList(t,e){function AlphaSenderListInstance(t){return AlphaSenderListInstance.get(t)}AlphaSenderListInstance._version=t;AlphaSenderListInstance._solution={serviceSid:e};AlphaSenderListInstance._uri=`/Services/${e}/AlphaSenders`;AlphaSenderListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.alphaSender)){throw new Error('Required parameter "opts.alphaSender" missing.')}var i=n.defer();var s=a.of({AlphaSender:o.get(t,"alphaSender")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AlphaSenderListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AlphaSenderListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AlphaSenderListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AlphaSenderListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AlphaSenderListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,t)};AlphaSenderListInstance.toJSON=function toJSON(){return this._solution};AlphaSenderListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AlphaSenderListInstance};h=function AlphaSenderPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AlphaSenderInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.alphaSender=e.alpha_sender;this.capabilities=e.capabilities;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AlphaSenderContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/AlphaSenders/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AlphaSenderList:u,AlphaSenderPage:h,AlphaSenderInstance:f,AlphaSenderContext:p}},44017:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function PhoneNumberList(t,e){function PhoneNumberListInstance(t){return PhoneNumberListInstance.get(t)}PhoneNumberListInstance._version=t;PhoneNumberListInstance._solution={serviceSid:e};PhoneNumberListInstance._uri=`/Services/${e}/PhoneNumbers`;PhoneNumberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumberSid)){throw new Error('Required parameter "opts.phoneNumberSid" missing.')}var i=n.defer();var s=a.of({PhoneNumberSid:o.get(t,"phoneNumberSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PhoneNumberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PhoneNumberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,t)};PhoneNumberListInstance.toJSON=function toJSON(){return this._solution};PhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PhoneNumberListInstance};h=function PhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PhoneNumberInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.phoneNumber=e.phone_number;this.countryCode=e.country_code;this.capabilities=e.capabilities;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PhoneNumberContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/PhoneNumbers/${i}`};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PhoneNumberList:u,PhoneNumberPage:h,PhoneNumberInstance:f,PhoneNumberContext:p}},64359:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ShortCodeList(t,e){function ShortCodeListInstance(t){return ShortCodeListInstance.get(t)}ShortCodeListInstance._version=t;ShortCodeListInstance._solution={serviceSid:e};ShortCodeListInstance._uri=`/Services/${e}/ShortCodes`;ShortCodeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.shortCodeSid)){throw new Error('Required parameter "opts.shortCodeSid" missing.')}var i=n.defer();var s=a.of({ShortCodeSid:o.get(t,"shortCodeSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ShortCodeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ShortCodeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,t)};ShortCodeListInstance.toJSON=function toJSON(){return this._solution};ShortCodeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ShortCodeListInstance};h=function ShortCodePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ShortCodeInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.shortCode=e.short_code;this.countryCode=e.country_code;this.capabilities=e.capabilities;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ShortCodeContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/ShortCodes/${i}`};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ShortCodeList:u,ShortCodePage:h,ShortCodeInstance:f,ShortCodeContext:p}},99630:(t,e,i)=>{"use strict";var n=i(90250);var o=i(97142).AlertList;var s=i(91066).EventList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._alerts=undefined;this._events=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"alerts",{get:function(){this._alerts=this._alerts||new o(this);return this._alerts}});Object.defineProperty(V1.prototype,"events",{get:function(){this._events=this._events||new s(this);return this._events}});t.exports=V1},97142:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function AlertList(t){function AlertListInstance(t){return AlertListInstance.get(t)}AlertListInstance._version=t;AlertListInstance._solution={};AlertListInstance._uri=`/Alerts`;AlertListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AlertListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AlertListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({LogLevel:o.get(t,"logLevel"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),EndDate:a.iso8601DateTime(o.get(t,"endDate")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AlertListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AlertListInstance.get=function get(t){return new d(this._version,t)};AlertListInstance.toJSON=function toJSON(){return this._solution};AlertListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AlertListInstance};f=function AlertPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AlertInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.alertText=e.alert_text;this.apiVersion=e.api_version;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateGenerated=c.iso8601DateTime(e.date_generated);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.errorCode=e.error_code;this.logLevel=e.log_level;this.moreInfo=e.more_info;this.requestMethod=e.request_method;this.requestUrl=e.request_url;this.requestVariables=e.request_variables;this.resourceSid=e.resource_sid;this.responseBody=e.response_body;this.responseHeaders=e.response_headers;this.sid=e.sid;this.url=e.url;this.requestHeaders=e.request_headers;this.serviceSid=e.service_sid;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AlertContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Alerts/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AlertList:h,AlertPage:f,AlertInstance:p,AlertContext:d}},91066:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function EventList(t){function EventListInstance(t){return EventListInstance.get(t)}EventListInstance._version=t;EventListInstance._solution={};EventListInstance._uri=`/Events`;EventListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EventListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EventListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ActorSid:o.get(t,"actorSid"),EventType:o.get(t,"eventType"),ResourceSid:o.get(t,"resourceSid"),SourceIpAddress:o.get(t,"sourceIpAddress"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),EndDate:a.iso8601DateTime(o.get(t,"endDate")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.get=function get(t){return new d(this._version,t)};EventListInstance.toJSON=function toJSON(){return this._solution};EventListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EventListInstance};f=function EventPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function EventInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.actorSid=e.actor_sid;this.actorType=e.actor_type;this.description=e.description;this.eventData=e.event_data;this.eventDate=c.iso8601DateTime(e.event_date);this.eventType=e.event_type;this.resourceSid=e.resource_sid;this.resourceType=e.resource_type;this.sid=e.sid;this.source=e.source;this.sourceIpAddress=e.source_ip_address;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function EventContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Events/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EventList:h,EventPage:f,EventInstance:p,EventContext:d}},88117:(t,e,i)=>{"use strict";var n=i(90250);var o=i(93722).CredentialList;var s=i(87108).ServiceList;var r=i(64351);function V1(t){r.prototype.constructor.call(this,t,"v1");this._credentials=undefined;this._services=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"credentials",{get:function(){this._credentials=this._credentials||new o(this);return this._credentials}});Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V1},93722:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CredentialList(t){function CredentialListInstance(t){return CredentialListInstance.get(t)}CredentialListInstance._version=t;CredentialListInstance._solution={};CredentialListInstance._uri=`/Credentials`;CredentialListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({Type:o.get(t,"type"),FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListInstance.get=function get(t){return new d(this._version,t)};CredentialListInstance.toJSON=function toJSON(){return this._solution};CredentialListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListInstance};f=function CredentialPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.sandbox=e.sandbox;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CredentialContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Credentials/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Certificate:o.get(t,"certificate"),PrivateKey:o.get(t,"privateKey"),Sandbox:a.bool(o.get(t,"sandbox")),ApiKey:o.get(t,"apiKey"),Secret:o.get(t,"secret")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialList:h,CredentialPage:f,CredentialInstance:p,CredentialContext:d}},87108:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(12429).BindingList;var c=i(53022).NotificationList;var a=i(60938);var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),ApnCredentialSid:o.get(t,"apnCredentialSid"),GcmCredentialSid:o.get(t,"gcmCredentialSid"),MessagingServiceSid:o.get(t,"messagingServiceSid"),FacebookMessengerPageId:o.get(t,"facebookMessengerPageId"),DefaultApnNotificationProtocolVersion:o.get(t,"defaultApnNotificationProtocolVersion"),DefaultGcmNotificationProtocolVersion:o.get(t,"defaultGcmNotificationProtocolVersion"),FcmCredentialSid:o.get(t,"fcmCredentialSid"),DefaultFcmNotificationProtocolVersion:o.get(t,"defaultFcmNotificationProtocolVersion"),LogEnabled:h.bool(o.get(t,"logEnabled")),AlexaSkillId:o.get(t,"alexaSkillId"),DefaultAlexaNotificationProtocolVersion:o.get(t,"defaultAlexaNotificationProtocolVersion"),DeliveryCallbackUrl:o.get(t,"deliveryCallbackUrl"),DeliveryCallbackEnabled:h.bool(o.get(t,"deliveryCallbackEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new v(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};d=function ServicePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,a.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.apnCredentialSid=e.apn_credential_sid;this.gcmCredentialSid=e.gcm_credential_sid;this.fcmCredentialSid=e.fcm_credential_sid;this.messagingServiceSid=e.messaging_service_sid;this.facebookMessengerPageId=e.facebook_messenger_page_id;this.defaultApnNotificationProtocolVersion=e.default_apn_notification_protocol_version;this.defaultGcmNotificationProtocolVersion=e.default_gcm_notification_protocol_version;this.defaultFcmNotificationProtocolVersion=e.default_fcm_notification_protocol_version;this.logEnabled=e.log_enabled;this.url=e.url;this.links=e.links;this.alexaSkillId=e.alexa_skill_id;this.defaultAlexaNotificationProtocolVersion=e.default_alexa_notification_protocol_version;this.deliveryCallbackUrl=e.delivery_callback_url;this.deliveryCallbackEnabled=e.delivery_callback_enabled;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.sid)}return this._context}});l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.bindings=function bindings(){return this._proxy.bindings};l.prototype.notifications=function notifications(){return this._proxy.notifications};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._bindings=undefined;this._notifications=undefined};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),ApnCredentialSid:o.get(t,"apnCredentialSid"),GcmCredentialSid:o.get(t,"gcmCredentialSid"),MessagingServiceSid:o.get(t,"messagingServiceSid"),FacebookMessengerPageId:o.get(t,"facebookMessengerPageId"),DefaultApnNotificationProtocolVersion:o.get(t,"defaultApnNotificationProtocolVersion"),DefaultGcmNotificationProtocolVersion:o.get(t,"defaultGcmNotificationProtocolVersion"),FcmCredentialSid:o.get(t,"fcmCredentialSid"),DefaultFcmNotificationProtocolVersion:o.get(t,"defaultFcmNotificationProtocolVersion"),LogEnabled:h.bool(o.get(t,"logEnabled")),AlexaSkillId:o.get(t,"alexaSkillId"),DefaultAlexaNotificationProtocolVersion:o.get(t,"defaultAlexaNotificationProtocolVersion"),DeliveryCallbackUrl:o.get(t,"deliveryCallbackUrl"),DeliveryCallbackEnabled:h.bool(o.get(t,"deliveryCallbackEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"bindings",{get:function(){if(!this._bindings){this._bindings=new r(this._version,this._solution.sid)}return this._bindings}});Object.defineProperty(v.prototype,"notifications",{get:function(){if(!this._notifications){this._notifications=new c(this._version,this._solution.sid)}return this._notifications}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:p,ServicePage:d,ServiceInstance:l,ServiceContext:v}},12429:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function BindingList(t,e){function BindingListInstance(t){return BindingListInstance.get(t)}BindingListInstance._version=t;BindingListInstance._solution={serviceSid:e};BindingListInstance._uri=`/Services/${e}/Bindings`;BindingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}if(o.isUndefined(t.bindingType)){throw new Error('Required parameter "opts.bindingType" missing.')}if(o.isUndefined(t.address)){throw new Error('Required parameter "opts.address" missing.')}var i=n.defer();var s=u.of({Identity:o.get(t,"identity"),BindingType:o.get(t,"bindingType"),Address:o.get(t,"address"),Tag:a.map(o.get(t,"tag"),function(t){return t}),NotificationProtocolVersion:o.get(t,"notificationProtocolVersion"),CredentialSid:o.get(t,"credentialSid"),Endpoint:o.get(t,"endpoint")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BindingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BindingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({StartDate:a.iso8601Date(o.get(t,"startDate")),EndDate:a.iso8601Date(o.get(t,"endDate")),Identity:a.map(o.get(t,"identity"),function(t){return t}),Tag:a.map(o.get(t,"tag"),function(t){return t}),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BindingListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};BindingListInstance.toJSON=function toJSON(){return this._solution};BindingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BindingListInstance};f=function BindingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BindingInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.credentialSid=e.credential_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.notificationProtocolVersion=e.notification_protocol_version;this.endpoint=e.endpoint;this.identity=e.identity;this.bindingType=e.binding_type;this.address=e.address;this.tags=e.tags;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BindingContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Bindings/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BindingList:h,BindingPage:f,BindingInstance:p,BindingContext:d}},53022:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function NotificationList(t,e){function NotificationListInstance(t){return NotificationListInstance.get(t)}NotificationListInstance._version=t;NotificationListInstance._solution={serviceSid:e};NotificationListInstance._uri=`/Services/${e}/Notifications`;NotificationListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Identity:a.map(o.get(t,"identity"),function(t){return t}),Tag:a.map(o.get(t,"tag"),function(t){return t}),Body:o.get(t,"body"),Priority:o.get(t,"priority"),Ttl:o.get(t,"ttl"),Title:o.get(t,"title"),Sound:o.get(t,"sound"),Action:o.get(t,"action"),Data:a.object(o.get(t,"data")),Apn:a.object(o.get(t,"apn")),Gcm:a.object(o.get(t,"gcm")),Sms:a.object(o.get(t,"sms")),FacebookMessenger:a.object(o.get(t,"facebookMessenger")),Fcm:a.object(o.get(t,"fcm")),Segment:a.map(o.get(t,"segment"),function(t){return t}),Alexa:a.object(o.get(t,"alexa")),ToBinding:a.map(o.get(t,"toBinding"),function(t){return t}),DeliveryCallbackUrl:o.get(t,"deliveryCallbackUrl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NotificationListInstance.toJSON=function toJSON(){return this._solution};NotificationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NotificationListInstance};f=function NotificationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function NotificationInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.identities=e.identities;this.tags=e.tags;this.segments=e.segments;this.priority=e.priority;this.ttl=c.integer(e.ttl);this.title=e.title;this.body=e.body;this.sound=e.sound;this.action=e.action;this.data=e.data;this.apn=e.apn;this.gcm=e.gcm;this.fcm=e.fcm;this.sms=e.sms;this.facebookMessenger=e.facebook_messenger;this.alexa=e.alexa;this._context=undefined;this._solution={serviceSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NotificationList:h,NotificationPage:f,NotificationInstance:p}},16213:(t,e,i)=>{"use strict";var n=i(90250);var o=i(29437).RegulatoryComplianceList;var s=i(64351);function V2(t){s.prototype.constructor.call(this,t,"v2");this._regulatoryCompliance=undefined}n.extend(V2.prototype,s.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"regulatoryCompliance",{get:function(){this._regulatoryCompliance=this._regulatoryCompliance||new o(this);return this._regulatoryCompliance}});t.exports=V2},29437:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(27712).BundleList;var r=i(68798).EndUserList;var c=i(86094).EndUserTypeList;var a=i(18721).RegulationList;var u=i(32231).SupportingDocumentList;var h=i(13301).SupportingDocumentTypeList;var f;f=function RegulatoryComplianceList(t){function RegulatoryComplianceListInstance(t){return RegulatoryComplianceListInstance.get(t)}RegulatoryComplianceListInstance._version=t;RegulatoryComplianceListInstance._solution={};RegulatoryComplianceListInstance._bundles=undefined;RegulatoryComplianceListInstance._endUsers=undefined;RegulatoryComplianceListInstance._endUserTypes=undefined;RegulatoryComplianceListInstance._regulations=undefined;RegulatoryComplianceListInstance._supportingDocuments=undefined;RegulatoryComplianceListInstance._supportingDocumentTypes=undefined;Object.defineProperty(RegulatoryComplianceListInstance,"bundles",{get:function bundles(){if(!this._bundles){this._bundles=new s(this._version)}return this._bundles}});Object.defineProperty(RegulatoryComplianceListInstance,"endUsers",{get:function endUsers(){if(!this._endUsers){this._endUsers=new r(this._version)}return this._endUsers}});Object.defineProperty(RegulatoryComplianceListInstance,"endUserTypes",{get:function endUserTypes(){if(!this._endUserTypes){this._endUserTypes=new c(this._version)}return this._endUserTypes}});Object.defineProperty(RegulatoryComplianceListInstance,"regulations",{get:function regulations(){if(!this._regulations){this._regulations=new a(this._version)}return this._regulations}});Object.defineProperty(RegulatoryComplianceListInstance,"supportingDocuments",{get:function supportingDocuments(){if(!this._supportingDocuments){this._supportingDocuments=new u(this._version)}return this._supportingDocuments}});Object.defineProperty(RegulatoryComplianceListInstance,"supportingDocumentTypes",{get:function supportingDocumentTypes(){if(!this._supportingDocumentTypes){this._supportingDocumentTypes=new h(this._version)}return this._supportingDocumentTypes}});RegulatoryComplianceListInstance.toJSON=function toJSON(){return this._solution};RegulatoryComplianceListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return RegulatoryComplianceListInstance};t.exports={RegulatoryComplianceList:f}},27712:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(28306).EvaluationList;var c=i(59854).ItemAssignmentList;var a=i(60938);var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function BundleList(t){function BundleListInstance(t){return BundleListInstance.get(t)}BundleListInstance._version=t;BundleListInstance._solution={};BundleListInstance._uri=`/RegulatoryCompliance/Bundles`;BundleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.email)){throw new Error('Required parameter "opts.email" missing.')}var i=n.defer();var s=h.of({FriendlyName:o.get(t,"friendlyName"),Email:o.get(t,"email"),StatusCallback:o.get(t,"statusCallback"),RegulationSid:o.get(t,"regulationSid"),IsoCountry:o.get(t,"isoCountry"),EndUserType:o.get(t,"endUserType"),NumberType:o.get(t,"numberType")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BundleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BundleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BundleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Status:o.get(t,"status"),FriendlyName:o.get(t,"friendlyName"),RegulationSid:o.get(t,"regulationSid"),IsoCountry:o.get(t,"isoCountry"),NumberType:o.get(t,"numberType"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BundleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BundleListInstance.get=function get(t){return new l(this._version,t)};BundleListInstance.toJSON=function toJSON(){return this._solution};BundleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BundleListInstance};p=function BundlePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,a.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BundleInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.regulationSid=e.regulation_sid;this.friendlyName=e.friendly_name;this.status=e.status;this.validUntil=u.iso8601DateTime(e.valid_until);this.email=e.email;this.statusCallback=e.status_callback;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.evaluations=function evaluations(){return this._proxy.evaluations};d.prototype.itemAssignments=function itemAssignments(){return this._proxy.itemAssignments};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function BundleContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/Bundles/${e}`;this._evaluations=undefined;this._itemAssignments=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Status:o.get(t,"status"),StatusCallback:o.get(t,"statusCallback"),FriendlyName:o.get(t,"friendlyName"),Email:o.get(t,"email")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"evaluations",{get:function(){if(!this._evaluations){this._evaluations=new r(this._version,this._solution.sid)}return this._evaluations}});Object.defineProperty(l.prototype,"itemAssignments",{get:function(){if(!this._itemAssignments){this._itemAssignments=new c(this._version,this._solution.sid)}return this._itemAssignments}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BundleList:f,BundlePage:p,BundleInstance:d,BundleContext:l}},28306:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function EvaluationList(t,e){function EvaluationListInstance(t){return EvaluationListInstance.get(t)}EvaluationListInstance._version=t;EvaluationListInstance._solution={bundleSid:e};EvaluationListInstance._uri=`/RegulatoryCompliance/Bundles/${e}/Evaluations`;EvaluationListInstance.create=function create(t){var e=n.defer();var i=this._version.create({uri:this._uri,method:"POST"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.bundleSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};EvaluationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EvaluationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EvaluationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EvaluationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EvaluationListInstance.get=function get(t){return new p(this._version,this._solution.bundleSid,t)};EvaluationListInstance.toJSON=function toJSON(){return this._solution};EvaluationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EvaluationListInstance};h=function EvaluationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.bundleSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function EvaluationInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.regulationSid=e.regulation_sid;this.bundleSid=e.bundle_sid;this.status=e.status;this.results=e.results;this.dateCreated=c.iso8601DateTime(e.date_created);this.url=e.url;this._context=undefined;this._solution={bundleSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.bundleSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function EvaluationContext(t,e,i){this._version=t;this._solution={bundleSid:e,sid:i};this._uri=`/RegulatoryCompliance/Bundles/${e}/Evaluations/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.bundleSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EvaluationList:u,EvaluationPage:h,EvaluationInstance:f,EvaluationContext:p}},59854:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ItemAssignmentList(t,e){function ItemAssignmentListInstance(t){return ItemAssignmentListInstance.get(t)}ItemAssignmentListInstance._version=t;ItemAssignmentListInstance._solution={bundleSid:e};ItemAssignmentListInstance._uri=`/RegulatoryCompliance/Bundles/${e}/ItemAssignments`;ItemAssignmentListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.objectSid)){throw new Error('Required parameter "opts.objectSid" missing.')}var i=n.defer();var s=a.of({ObjectSid:o.get(t,"objectSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.bundleSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ItemAssignmentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ItemAssignmentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ItemAssignmentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ItemAssignmentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ItemAssignmentListInstance.get=function get(t){return new p(this._version,this._solution.bundleSid,t)};ItemAssignmentListInstance.toJSON=function toJSON(){return this._solution};ItemAssignmentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ItemAssignmentListInstance};h=function ItemAssignmentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.bundleSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ItemAssignmentInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.bundleSid=e.bundle_sid;this.accountSid=e.account_sid;this.objectSid=e.object_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.url=e.url;this._context=undefined;this._solution={bundleSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.bundleSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ItemAssignmentContext(t,e,i){this._version=t;this._solution={bundleSid:e,sid:i};this._uri=`/RegulatoryCompliance/Bundles/${e}/ItemAssignments/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.bundleSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ItemAssignmentList:u,ItemAssignmentPage:h,ItemAssignmentInstance:f,ItemAssignmentContext:p}},68798:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function EndUserList(t){function EndUserListInstance(t){return EndUserListInstance.get(t)}EndUserListInstance._version=t;EndUserListInstance._solution={};EndUserListInstance._uri=`/RegulatoryCompliance/EndUsers`;EndUserListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Attributes:a.object(o.get(t,"attributes"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EndUserListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EndUserListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EndUserListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EndUserListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EndUserListInstance.get=function get(t){return new d(this._version,t)};EndUserListInstance.toJSON=function toJSON(){return this._solution};EndUserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EndUserListInstance};f=function EndUserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function EndUserInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.type=e.type;this.attributes=e.attributes;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function EndUserContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/EndUsers/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Attributes:a.object(o.get(t,"attributes"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EndUserList:h,EndUserPage:f,EndUserInstance:p,EndUserContext:d}},86094:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function EndUserTypeList(t){function EndUserTypeListInstance(t){return EndUserTypeListInstance.get(t)}EndUserTypeListInstance._version=t;EndUserTypeListInstance._solution={};EndUserTypeListInstance._uri=`/RegulatoryCompliance/EndUserTypes`;EndUserTypeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EndUserTypeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EndUserTypeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EndUserTypeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EndUserTypeListInstance.get=function get(t){return new f(this._version,t)};EndUserTypeListInstance.toJSON=function toJSON(){return this._solution};EndUserTypeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EndUserTypeListInstance};u=function EndUserTypePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function EndUserTypeInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.machineName=e.machine_name;this.fields=e.fields;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function EndUserTypeContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/EndUserTypes/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EndUserTypeList:a,EndUserTypePage:u,EndUserTypeInstance:h,EndUserTypeContext:f}},18721:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function RegulationList(t){function RegulationListInstance(t){return RegulationListInstance.get(t)}RegulationListInstance._version=t;RegulationListInstance._solution={};RegulationListInstance._uri=`/RegulatoryCompliance/Regulations`;RegulationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RegulationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RegulationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({EndUserType:o.get(t,"endUserType"),IsoCountry:o.get(t,"isoCountry"),NumberType:o.get(t,"numberType"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RegulationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RegulationListInstance.get=function get(t){return new f(this._version,t)};RegulationListInstance.toJSON=function toJSON(){return this._solution};RegulationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RegulationListInstance};u=function RegulationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function RegulationInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.isoCountry=e.iso_country;this.numberType=e.number_type;this.endUserType=e.end_user_type;this.requirements=e.requirements;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function RegulationContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/Regulations/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RegulationList:a,RegulationPage:u,RegulationInstance:h,RegulationContext:f}},32231:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function SupportingDocumentList(t){function SupportingDocumentListInstance(t){return SupportingDocumentListInstance.get(t)}SupportingDocumentListInstance._version=t;SupportingDocumentListInstance._solution={};SupportingDocumentListInstance._uri=`/RegulatoryCompliance/SupportingDocuments`;SupportingDocumentListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.type)){throw new Error('Required parameter "opts.type" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Type:o.get(t,"type"),Attributes:a.object(o.get(t,"attributes"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SupportingDocumentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SupportingDocumentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SupportingDocumentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SupportingDocumentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SupportingDocumentListInstance.get=function get(t){return new d(this._version,t)};SupportingDocumentListInstance.toJSON=function toJSON(){return this._solution};SupportingDocumentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SupportingDocumentListInstance};f=function SupportingDocumentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SupportingDocumentInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.mimeType=e.mime_type;this.status=e.status;this.type=e.type;this.attributes=e.attributes;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SupportingDocumentContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/SupportingDocuments/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Attributes:a.object(o.get(t,"attributes"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SupportingDocumentList:h,SupportingDocumentPage:f,SupportingDocumentInstance:p,SupportingDocumentContext:d}},13301:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function SupportingDocumentTypeList(t){function SupportingDocumentTypeListInstance(t){return SupportingDocumentTypeListInstance.get(t)}SupportingDocumentTypeListInstance._version=t;SupportingDocumentTypeListInstance._solution={};SupportingDocumentTypeListInstance._uri=`/RegulatoryCompliance/SupportingDocumentTypes`;SupportingDocumentTypeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SupportingDocumentTypeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SupportingDocumentTypeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SupportingDocumentTypeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SupportingDocumentTypeListInstance.get=function get(t){return new f(this._version,t)};SupportingDocumentTypeListInstance.toJSON=function toJSON(){return this._solution};SupportingDocumentTypeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SupportingDocumentTypeListInstance};u=function SupportingDocumentTypePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function SupportingDocumentTypeInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.machineName=e.machine_name;this.fields=e.fields;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SupportingDocumentTypeContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RegulatoryCompliance/SupportingDocumentTypes/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SupportingDocumentTypeList:a,SupportingDocumentTypePage:u,SupportingDocumentTypeInstance:h,SupportingDocumentTypeContext:f}},1382:(t,e,i)=>{"use strict";var n=i(90250);var o=i(85387).ExportConfigurationList;var s=i(80683).ExportList;var r=i(64351);function BulkExports(t){r.prototype.constructor.call(this,t,"BulkExports");this._exports=undefined;this._exportConfiguration=undefined}n.extend(BulkExports.prototype,r.prototype);BulkExports.prototype.constructor=BulkExports;Object.defineProperty(BulkExports.prototype,"exports",{get:function(){this._exports=this._exports||new s(this);return this._exports}});Object.defineProperty(BulkExports.prototype,"exportConfiguration",{get:function(){this._exportConfiguration=this._exportConfiguration||new o(this);return this._exportConfiguration}});t.exports=BulkExports},82477:(t,e,i)=>{"use strict";var n=i(90250);var o=i(55897).FleetList;var s=i(64351);function DeployedDevices(t){s.prototype.constructor.call(this,t,"DeployedDevices");this._fleets=undefined}n.extend(DeployedDevices.prototype,s.prototype);DeployedDevices.prototype.constructor=DeployedDevices;Object.defineProperty(DeployedDevices.prototype,"fleets",{get:function(){this._fleets=this._fleets||new o(this);return this._fleets}});t.exports=DeployedDevices},39874:(t,e,i)=>{"use strict";var n=i(90250);var o=i(2676).AuthorizationDocumentList;var s=i(95372).HostedNumberOrderList;var r=i(64351);function HostedNumbers(t){r.prototype.constructor.call(this,t,"HostedNumbers");this._authorizationDocuments=undefined;this._hostedNumberOrders=undefined}n.extend(HostedNumbers.prototype,r.prototype);HostedNumbers.prototype.constructor=HostedNumbers;Object.defineProperty(HostedNumbers.prototype,"authorizationDocuments",{get:function(){this._authorizationDocuments=this._authorizationDocuments||new o(this);return this._authorizationDocuments}});Object.defineProperty(HostedNumbers.prototype,"hostedNumberOrders",{get:function(){this._hostedNumberOrders=this._hostedNumberOrders||new s(this);return this._hostedNumberOrders}});t.exports=HostedNumbers},87505:(t,e,i)=>{"use strict";var n=i(90250);var o=i(55988).AvailableAddOnList;var s=i(74874).InstalledAddOnList;var r=i(64351);function Marketplace(t){r.prototype.constructor.call(this,t,"marketplace");this._availableAddOns=undefined;this._installedAddOns=undefined}n.extend(Marketplace.prototype,r.prototype);Marketplace.prototype.constructor=Marketplace;Object.defineProperty(Marketplace.prototype,"availableAddOns",{get:function(){this._availableAddOns=this._availableAddOns||new o(this);return this._availableAddOns}});Object.defineProperty(Marketplace.prototype,"installedAddOns",{get:function(){this._installedAddOns=this._installedAddOns||new s(this);return this._installedAddOns}});t.exports=Marketplace},71881:(t,e,i)=>{"use strict";var n=i(90250);var o=i(53087).ServiceList;var s=i(64351);function Sync(t){s.prototype.constructor.call(this,t,"Sync");this._services=undefined}n.extend(Sync.prototype,s.prototype);Sync.prototype.constructor=Sync;Object.defineProperty(Sync.prototype,"services",{get:function(){this._services=this._services||new o(this);return this._services}});t.exports=Sync},63819:(t,e,i)=>{"use strict";var n=i(90250);var o=i(6611).BrandedChannelList;var s=i(47394).BrandsInformationList;var r=i(62599).CpsList;var c=i(75025).CurrentCallList;var a=i(64351);function TrustedComms(t){a.prototype.constructor.call(this,t,"TrustedComms");this._brandedChannels=undefined;this._brandsInformation=undefined;this._cps=undefined;this._currentCalls=undefined}n.extend(TrustedComms.prototype,a.prototype);TrustedComms.prototype.constructor=TrustedComms;Object.defineProperty(TrustedComms.prototype,"brandedChannels",{get:function(){this._brandedChannels=this._brandedChannels||new o(this);return this._brandedChannels}});Object.defineProperty(TrustedComms.prototype,"brandsInformation",{get:function(){this._brandsInformation=this._brandsInformation||new s(this);return this._brandsInformation}});Object.defineProperty(TrustedComms.prototype,"cps",{get:function(){this._cps=this._cps||new r(this);return this._cps}});Object.defineProperty(TrustedComms.prototype,"currentCalls",{get:function(){this._currentCalls=this._currentCalls||new c(this);return this._currentCalls}});t.exports=TrustedComms},89265:(t,e,i)=>{"use strict";var n=i(90250);var o=i(96714).AssistantList;var s=i(64351);function Understand(t){s.prototype.constructor.call(this,t,"understand");this._assistants=undefined}n.extend(Understand.prototype,s.prototype);Understand.prototype.constructor=Understand;Object.defineProperty(Understand.prototype,"assistants",{get:function(){this._assistants=this._assistants||new o(this);return this._assistants}});t.exports=Understand},87152:(t,e,i)=>{"use strict";var n=i(90250);var o=i(37480).CommandList;var s=i(44607).RatePlanList;var r=i(52633).SimList;var c=i(64351);function Wireless(t){c.prototype.constructor.call(this,t,"wireless");this._commands=undefined;this._ratePlans=undefined;this._sims=undefined}n.extend(Wireless.prototype,c.prototype);Wireless.prototype.constructor=Wireless;Object.defineProperty(Wireless.prototype,"commands",{get:function(){this._commands=this._commands||new o(this);return this._commands}});Object.defineProperty(Wireless.prototype,"ratePlans",{get:function(){this._ratePlans=this._ratePlans||new s(this);return this._ratePlans}});Object.defineProperty(Wireless.prototype,"sims",{get:function(){this._sims=this._sims||new r(this);return this._sims}});t.exports=Wireless},80683:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(18260).DayList;var c=i(51850).ExportCustomJobList;var a=i(33264).JobList;var u=i(60938);var h=i(72142);var f;var p;var d;var l;f=function ExportList(t){function ExportListInstance(t){return ExportListInstance.get(t)}ExportListInstance._version=t;ExportListInstance._solution={};ExportListInstance._jobs=undefined;ExportListInstance.get=function get(t){return new l(this._version,t)};Object.defineProperty(ExportListInstance,"jobs",{get:function jobs(){if(!this._jobs){this._jobs=new a(this._version)}return this._jobs}});ExportListInstance.toJSON=function toJSON(){return this._solution};ExportListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportListInstance};p=function ExportPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,u.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ExportInstance(t,e,i){this._version=t;this.resourceType=e.resource_type;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={resourceType:i||this.resourceType}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.resourceType)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.days=function days(){return this._proxy.days};d.prototype.exportCustomJobs=function exportCustomJobs(){return this._proxy.exportCustomJobs};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ExportContext(t,e){this._version=t;this._solution={resourceType:e};this._uri=`/Exports/${e}`;this._days=undefined;this._exportCustomJobs=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.resourceType))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"days",{get:function(){if(!this._days){this._days=new r(this._version,this._solution.resourceType)}return this._days}});Object.defineProperty(l.prototype,"exportCustomJobs",{get:function(){if(!this._exportCustomJobs){this._exportCustomJobs=new c(this._version,this._solution.resourceType)}return this._exportCustomJobs}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportList:f,ExportPage:p,ExportInstance:d,ExportContext:l}},18260:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DayList(t,e){function DayListInstance(t){return DayListInstance.get(t)}DayListInstance._version=t;DayListInstance._solution={resourceType:e};DayListInstance._uri=`/Exports/${e}/Days`;DayListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DayListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DayListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DayListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DayListInstance.get=function get(t){return new p(this._version,this._solution.resourceType,t)};DayListInstance.toJSON=function toJSON(){return this._solution};DayListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DayListInstance};h=function DayPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.resourceType)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DayInstance(t,e,i,n){this._version=t;this.redirectTo=e.redirect_to;this.day=e.day;this.size=c.integer(e.size);this.createDate=e.create_date;this.friendlyName=e.friendly_name;this.resourceType=e.resource_type;this._context=undefined;this._solution={resourceType:i,day:n||this.day}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.resourceType,this._solution.day)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DayContext(t,e,i){this._version=t;this._solution={resourceType:e,day:i};this._uri=`/Exports/${e}/Days/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.resourceType,this._solution.day))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DayList:u,DayPage:h,DayInstance:f,DayContext:p}},51850:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function ExportCustomJobList(t,e){function ExportCustomJobListInstance(t){return ExportCustomJobListInstance.get(t)}ExportCustomJobListInstance._version=t;ExportCustomJobListInstance._solution={resourceType:e};ExportCustomJobListInstance._uri=`/Exports/${e}/Jobs`;ExportCustomJobListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExportCustomJobListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExportCustomJobListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.startDay)){throw new Error('Required parameter "opts.startDay" missing.')}if(o.isUndefined(t.endDay)){throw new Error('Required parameter "opts.endDay" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=c.of({StartDay:o.get(t,"startDay"),EndDay:o.get(t,"endDay"),FriendlyName:o.get(t,"friendlyName"),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod"),Email:o.get(t,"email")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExportCustomJobListInstance.toJSON=function toJSON(){return this._solution};ExportCustomJobListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportCustomJobListInstance};u=function ExportCustomJobPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.resourceType)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExportCustomJobInstance(t,e,i){this._version=t;this.friendlyName=e.friendly_name;this.resourceType=e.resource_type;this.startDay=e.start_day;this.endDay=e.end_day;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.email=e.email;this.jobSid=e.job_sid;this.details=e.details;this._context=undefined;this._solution={resourceType:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportCustomJobList:a,ExportCustomJobPage:u,ExportCustomJobInstance:h}},33264:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function JobList(t){function JobListInstance(t){return JobListInstance.get(t)}JobListInstance._version=t;JobListInstance._solution={};JobListInstance.get=function get(t){return new f(this._version,t)};JobListInstance.toJSON=function toJSON(){return this._solution};JobListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return JobListInstance};u=function JobPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function JobInstance(t,e,i){this._version=t;this.resourceType=e.resource_type;this.friendlyName=e.friendly_name;this.details=e.details;this.startDay=e.start_day;this.endDay=e.end_day;this.jobSid=e.job_sid;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.email=e.email;this.url=e.url;this._context=undefined;this._solution={jobSid:i||this.jobSid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.jobSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.remove=function remove(t){return this._proxy.remove(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function JobContext(t,e){this._version=t;this._solution={jobSid:e};this._uri=`/Exports/Jobs/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.jobSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={JobList:a,JobPage:u,JobInstance:h,JobContext:f}},85387:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function ExportConfigurationList(t){function ExportConfigurationListInstance(t){return ExportConfigurationListInstance.get(t)}ExportConfigurationListInstance._version=t;ExportConfigurationListInstance._solution={};ExportConfigurationListInstance.get=function get(t){return new p(this._version,t)};ExportConfigurationListInstance.toJSON=function toJSON(){return this._solution};ExportConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExportConfigurationListInstance};h=function ExportConfigurationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExportConfigurationInstance(t,e,i){this._version=t;this.enabled=e.enabled;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.resourceType=e.resource_type;this.url=e.url;this._context=undefined;this._solution={resourceType:i||this.resourceType}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.resourceType)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ExportConfigurationContext(t,e){this._version=t;this._solution={resourceType:e};this._uri=`/Exports/${e}/Configuration`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.resourceType))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Enabled:c.bool(o.get(t,"enabled")),WebhookUrl:o.get(t,"webhookUrl"),WebhookMethod:o.get(t,"webhookMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.resourceType))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExportConfigurationList:u,ExportConfigurationPage:h,ExportConfigurationInstance:f,ExportConfigurationContext:p}},55897:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(59777).CertificateList;var c=i(66020).DeploymentList;var a=i(41268).DeviceList;var u=i(34699).KeyList;var h=i(60938);var f=i(80513);var p=i(72142);var d;var l;var v;var m;d=function FleetList(t){function FleetListInstance(t){return FleetListInstance.get(t)}FleetListInstance._version=t;FleetListInstance._solution={};FleetListInstance._uri=`/Fleets`;FleetListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FleetListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FleetListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.get=function get(t){return new m(this._version,t)};FleetListInstance.toJSON=function toJSON(){return this._solution};FleetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FleetListInstance};l=function FleetPage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,h.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function FleetInstance(t,e,i){this._version=t;this.sid=e.sid;this.url=e.url;this.uniqueName=e.unique_name;this.friendlyName=e.friendly_name;this.accountSid=e.account_sid;this.defaultDeploymentSid=e.default_deployment_sid;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.devices=function devices(){return this._proxy.devices};v.prototype.deployments=function deployments(){return this._proxy.deployments};v.prototype.certificates=function certificates(){return this._proxy.certificates};v.prototype.keys=function keys(){return this._proxy.keys};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function FleetContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Fleets/${e}`;this._devices=undefined;this._deployments=undefined;this._certificates=undefined;this._keys=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),DefaultDeploymentSid:o.get(t,"defaultDeploymentSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"devices",{get:function(){if(!this._devices){this._devices=new a(this._version,this._solution.sid)}return this._devices}});Object.defineProperty(m.prototype,"deployments",{get:function(){if(!this._deployments){this._deployments=new c(this._version,this._solution.sid)}return this._deployments}});Object.defineProperty(m.prototype,"certificates",{get:function(){if(!this._certificates){this._certificates=new r(this._version,this._solution.sid)}return this._certificates}});Object.defineProperty(m.prototype,"keys",{get:function(){if(!this._keys){this._keys=new u(this._version,this._solution.sid)}return this._keys}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FleetList:d,FleetPage:l,FleetInstance:v,FleetContext:m}},59777:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CertificateList(t,e){function CertificateListInstance(t){return CertificateListInstance.get(t)}CertificateListInstance._version=t;CertificateListInstance._solution={fleetSid:e};CertificateListInstance._uri=`/Fleets/${e}/Certificates`;CertificateListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.certificateData)){throw new Error('Required parameter "opts.certificateData" missing.')}var i=n.defer();var s=a.of({CertificateData:o.get(t,"certificateData"),FriendlyName:o.get(t,"friendlyName"),DeviceSid:o.get(t,"deviceSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CertificateListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CertificateListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CertificateListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({DeviceSid:o.get(t,"deviceSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CertificateListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CertificateListInstance.get=function get(t){return new p(this._version,this._solution.fleetSid,t)};CertificateListInstance.toJSON=function toJSON(){return this._solution};CertificateListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CertificateListInstance};h=function CertificatePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.fleetSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CertificateInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.url=e.url;this.friendlyName=e.friendly_name;this.fleetSid=e.fleet_sid;this.accountSid=e.account_sid;this.deviceSid=e.device_sid;this.thumbprint=e.thumbprint;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={fleetSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.fleetSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CertificateContext(t,e,i){this._version=t;this._solution={fleetSid:e,sid:i};this._uri=`/Fleets/${e}/Certificates/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),DeviceSid:o.get(t,"deviceSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CertificateList:u,CertificatePage:h,CertificateInstance:f,CertificateContext:p}},66020:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DeploymentList(t,e){function DeploymentListInstance(t){return DeploymentListInstance.get(t)}DeploymentListInstance._version=t;DeploymentListInstance._solution={fleetSid:e};DeploymentListInstance._uri=`/Fleets/${e}/Deployments`;DeploymentListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),SyncServiceSid:o.get(t,"syncServiceSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DeploymentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DeploymentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.get=function get(t){return new p(this._version,this._solution.fleetSid,t)};DeploymentListInstance.toJSON=function toJSON(){return this._solution};DeploymentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeploymentListInstance};h=function DeploymentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.fleetSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DeploymentInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.url=e.url;this.friendlyName=e.friendly_name;this.fleetSid=e.fleet_sid;this.accountSid=e.account_sid;this.syncServiceSid=e.sync_service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={fleetSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.fleetSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeploymentContext(t,e,i){this._version=t;this._solution={fleetSid:e,sid:i};this._uri=`/Fleets/${e}/Deployments/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),SyncServiceSid:o.get(t,"syncServiceSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeploymentList:u,DeploymentPage:h,DeploymentInstance:f,DeploymentContext:p}},41268:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function DeviceList(t,e){function DeviceListInstance(t){return DeviceListInstance.get(t)}DeviceListInstance._version=t;DeviceListInstance._solution={fleetSid:e};DeviceListInstance._uri=`/Fleets/${e}/Devices`;DeviceListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),Identity:o.get(t,"identity"),DeploymentSid:o.get(t,"deploymentSid"),Enabled:a.bool(o.get(t,"enabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeviceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DeviceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DeviceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({DeploymentSid:o.get(t,"deploymentSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeviceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeviceListInstance.get=function get(t){return new d(this._version,this._solution.fleetSid,t)};DeviceListInstance.toJSON=function toJSON(){return this._solution};DeviceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeviceListInstance};f=function DevicePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.fleetSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeviceInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.url=e.url;this.uniqueName=e.unique_name;this.friendlyName=e.friendly_name;this.fleetSid=e.fleet_sid;this.enabled=e.enabled;this.accountSid=e.account_sid;this.identity=e.identity;this.deploymentSid=e.deployment_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.dateAuthenticated=c.iso8601DateTime(e.date_authenticated);this._context=undefined;this._solution={fleetSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.fleetSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function DeviceContext(t,e,i){this._version=t;this._solution={fleetSid:e,sid:i};this._uri=`/Fleets/${e}/Devices/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Identity:o.get(t,"identity"),DeploymentSid:o.get(t,"deploymentSid"),Enabled:a.bool(o.get(t,"enabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeviceList:h,DevicePage:f,DeviceInstance:p,DeviceContext:d}},34699:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function KeyList(t,e){function KeyListInstance(t){return KeyListInstance.get(t)}KeyListInstance._version=t;KeyListInstance._solution={fleetSid:e};KeyListInstance._uri=`/Fleets/${e}/Keys`;KeyListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),DeviceSid:o.get(t,"deviceSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};KeyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};KeyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};KeyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({DeviceSid:o.get(t,"deviceSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};KeyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};KeyListInstance.get=function get(t){return new p(this._version,this._solution.fleetSid,t)};KeyListInstance.toJSON=function toJSON(){return this._solution};KeyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return KeyListInstance};h=function KeyPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.fleetSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function KeyInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.url=e.url;this.friendlyName=e.friendly_name;this.fleetSid=e.fleet_sid;this.accountSid=e.account_sid;this.deviceSid=e.device_sid;this.secret=e.secret;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={fleetSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.fleetSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function KeyContext(t,e,i){this._version=t;this._solution={fleetSid:e,sid:i};this._uri=`/Fleets/${e}/Keys/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),DeviceSid:o.get(t,"deviceSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.fleetSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={KeyList:u,KeyPage:h,KeyInstance:f,KeyContext:p}},2676:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60310).DependentHostedNumberOrderList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function AuthorizationDocumentList(t){function AuthorizationDocumentListInstance(t){return AuthorizationDocumentListInstance.get(t)}AuthorizationDocumentListInstance._version=t;AuthorizationDocumentListInstance._solution={};AuthorizationDocumentListInstance._uri=`/AuthorizationDocuments`;AuthorizationDocumentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AuthorizationDocumentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AuthorizationDocumentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Email:o.get(t,"email"),Status:o.get(t,"status"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthorizationDocumentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthorizationDocumentListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.hostedNumberOrderSids)){throw new Error('Required parameter "opts.hostedNumberOrderSids" missing.')}if(o.isUndefined(t.addressSid)){throw new Error('Required parameter "opts.addressSid" missing.')}if(o.isUndefined(t.email)){throw new Error('Required parameter "opts.email" missing.')}if(o.isUndefined(t.contactTitle)){throw new Error('Required parameter "opts.contactTitle" missing.')}if(o.isUndefined(t.contactPhoneNumber)){throw new Error('Required parameter "opts.contactPhoneNumber" missing.')}var i=n.defer();var s=h.of({HostedNumberOrderSids:u.map(o.get(t,"hostedNumberOrderSids"),function(t){return t}),AddressSid:o.get(t,"addressSid"),Email:o.get(t,"email"),ContactTitle:o.get(t,"contactTitle"),ContactPhoneNumber:o.get(t,"contactPhoneNumber"),CcEmails:u.map(o.get(t,"ccEmails"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AuthorizationDocumentListInstance.get=function get(t){return new l(this._version,t)};AuthorizationDocumentListInstance.toJSON=function toJSON(){return this._solution};AuthorizationDocumentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AuthorizationDocumentListInstance};p=function AuthorizationDocumentPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AuthorizationDocumentInstance(t,e,i){this._version=t;this.sid=e.sid;this.addressSid=e.address_sid;this.status=e.status;this.email=e.email;this.ccEmails=e.cc_emails;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.dependentHostedNumberOrders=function dependentHostedNumberOrders(){return this._proxy.dependentHostedNumberOrders};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function AuthorizationDocumentContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/AuthorizationDocuments/${e}`;this._dependentHostedNumberOrders=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({HostedNumberOrderSids:u.map(o.get(t,"hostedNumberOrderSids"),function(t){return t}),AddressSid:o.get(t,"addressSid"),Email:o.get(t,"email"),CcEmails:u.map(o.get(t,"ccEmails"),function(t){return t}),Status:o.get(t,"status"),ContactTitle:o.get(t,"contactTitle"),ContactPhoneNumber:o.get(t,"contactPhoneNumber")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"dependentHostedNumberOrders",{get:function(){if(!this._dependentHostedNumberOrders){this._dependentHostedNumberOrders=new r(this._version,this._solution.sid)}return this._dependentHostedNumberOrders}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AuthorizationDocumentList:f,AuthorizationDocumentPage:p,AuthorizationDocumentInstance:d,AuthorizationDocumentContext:l}},60310:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function DependentHostedNumberOrderList(t,e){function DependentHostedNumberOrderListInstance(t){return DependentHostedNumberOrderListInstance.get(t)}DependentHostedNumberOrderListInstance._version=t;DependentHostedNumberOrderListInstance._solution={signingDocumentSid:e};DependentHostedNumberOrderListInstance._uri=`/AuthorizationDocuments/${e}/DependentHostedNumberOrders`;DependentHostedNumberOrderListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DependentHostedNumberOrderListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DependentHostedNumberOrderListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Status:o.get(t,"status"),PhoneNumber:o.get(t,"phoneNumber"),IncomingPhoneNumberSid:o.get(t,"incomingPhoneNumberSid"),FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DependentHostedNumberOrderListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DependentHostedNumberOrderListInstance.toJSON=function toJSON(){return this._solution};DependentHostedNumberOrderListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DependentHostedNumberOrderListInstance};h=function DependentHostedNumberOrderPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.signingDocumentSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DependentHostedNumberOrderInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.incomingPhoneNumberSid=e.incoming_phone_number_sid;this.addressSid=e.address_sid;this.signingDocumentSid=e.signing_document_sid;this.phoneNumber=e.phone_number;this.capabilities=e.capabilities;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.status=e.status;this.failureReason=e.failure_reason;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.verificationAttempts=c.integer(e.verification_attempts);this.email=e.email;this.ccEmails=e.cc_emails;this.verificationType=e.verification_type;this.verificationDocumentSid=e.verification_document_sid;this.extension=e.extension;this.callDelay=c.integer(e.call_delay);this.verificationCode=e.verification_code;this.verificationCallSids=e.verification_call_sids;this._context=undefined;this._solution={signingDocumentSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DependentHostedNumberOrderList:u,DependentHostedNumberOrderPage:h,DependentHostedNumberOrderInstance:f}},95372:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function HostedNumberOrderList(t){function HostedNumberOrderListInstance(t){return HostedNumberOrderListInstance.get(t)}HostedNumberOrderListInstance._version=t;HostedNumberOrderListInstance._solution={};HostedNumberOrderListInstance._uri=`/HostedNumberOrders`;HostedNumberOrderListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};HostedNumberOrderListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};HostedNumberOrderListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Status:o.get(t,"status"),PhoneNumber:o.get(t,"phoneNumber"),IncomingPhoneNumberSid:o.get(t,"incomingPhoneNumberSid"),FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};HostedNumberOrderListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};HostedNumberOrderListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumber)){throw new Error('Required parameter "opts.phoneNumber" missing.')}if(o.isUndefined(t.smsCapability)){throw new Error('Required parameter "opts.smsCapability" missing.')}var i=n.defer();var s=u.of({PhoneNumber:o.get(t,"phoneNumber"),SmsCapability:a.bool(o.get(t,"smsCapability")),AccountSid:o.get(t,"accountSid"),FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),CcEmails:a.map(o.get(t,"ccEmails"),function(t){return t}),SmsUrl:o.get(t,"smsUrl"),SmsMethod:o.get(t,"smsMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),StatusCallbackUrl:o.get(t,"statusCallbackUrl"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),SmsApplicationSid:o.get(t,"smsApplicationSid"),AddressSid:o.get(t,"addressSid"),Email:o.get(t,"email"),VerificationType:o.get(t,"verificationType"),VerificationDocumentSid:o.get(t,"verificationDocumentSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};HostedNumberOrderListInstance.get=function get(t){return new d(this._version,t)};HostedNumberOrderListInstance.toJSON=function toJSON(){return this._solution};HostedNumberOrderListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return HostedNumberOrderListInstance};f=function HostedNumberOrderPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function HostedNumberOrderInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.incomingPhoneNumberSid=e.incoming_phone_number_sid;this.addressSid=e.address_sid;this.signingDocumentSid=e.signing_document_sid;this.phoneNumber=e.phone_number;this.capabilities=e.capabilities;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.status=e.status;this.failureReason=e.failure_reason;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.verificationAttempts=c.integer(e.verification_attempts);this.email=e.email;this.ccEmails=e.cc_emails;this.url=e.url;this.verificationType=e.verification_type;this.verificationDocumentSid=e.verification_document_sid;this.extension=e.extension;this.callDelay=c.integer(e.call_delay);this.verificationCode=e.verification_code;this.verificationCallSids=e.verification_call_sids;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function HostedNumberOrderContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/HostedNumberOrders/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Email:o.get(t,"email"),CcEmails:a.map(o.get(t,"ccEmails"),function(t){return t}),Status:o.get(t,"status"),VerificationCode:o.get(t,"verificationCode"),VerificationType:o.get(t,"verificationType"),VerificationDocumentSid:o.get(t,"verificationDocumentSid"),Extension:o.get(t,"extension"),CallDelay:o.get(t,"callDelay")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={HostedNumberOrderList:h,HostedNumberOrderPage:f,HostedNumberOrderInstance:p,HostedNumberOrderContext:d}},55988:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(71509).AvailableAddOnExtensionList;var c=i(60938);var a=i(72142);var u;var h;var f;var p;u=function AvailableAddOnList(t){function AvailableAddOnListInstance(t){return AvailableAddOnListInstance.get(t)}AvailableAddOnListInstance._version=t;AvailableAddOnListInstance._solution={};AvailableAddOnListInstance._uri=`/AvailableAddOns`;AvailableAddOnListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AvailableAddOnListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AvailableAddOnListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailableAddOnListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailableAddOnListInstance.get=function get(t){return new p(this._version,t)};AvailableAddOnListInstance.toJSON=function toJSON(){return this._solution};AvailableAddOnListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AvailableAddOnListInstance};h=function AvailableAddOnPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,c.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AvailableAddOnInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.description=e.description;this.pricingType=e.pricing_type;this.configurationSchema=e.configuration_schema;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.extensions=function extensions(){return this._proxy.extensions};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AvailableAddOnContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/AvailableAddOns/${e}`;this._extensions=undefined};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(p.prototype,"extensions",{get:function(){if(!this._extensions){this._extensions=new r(this._version,this._solution.sid)}return this._extensions}});p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AvailableAddOnList:u,AvailableAddOnPage:h,AvailableAddOnInstance:f,AvailableAddOnContext:p}},71509:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function AvailableAddOnExtensionList(t,e){function AvailableAddOnExtensionListInstance(t){return AvailableAddOnExtensionListInstance.get(t)}AvailableAddOnExtensionListInstance._version=t;AvailableAddOnExtensionListInstance._solution={availableAddOnSid:e};AvailableAddOnExtensionListInstance._uri=`/AvailableAddOns/${e}/Extensions`;AvailableAddOnExtensionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AvailableAddOnExtensionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AvailableAddOnExtensionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailableAddOnExtensionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AvailableAddOnExtensionListInstance.get=function get(t){return new f(this._version,this._solution.availableAddOnSid,t)};AvailableAddOnExtensionListInstance.toJSON=function toJSON(){return this._solution};AvailableAddOnExtensionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AvailableAddOnExtensionListInstance};u=function AvailableAddOnExtensionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.availableAddOnSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function AvailableAddOnExtensionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.availableAddOnSid=e.available_add_on_sid;this.friendlyName=e.friendly_name;this.productName=e.product_name;this.uniqueName=e.unique_name;this.url=e.url;this._context=undefined;this._solution={availableAddOnSid:i,sid:n||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.availableAddOnSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AvailableAddOnExtensionContext(t,e,i){this._version=t;this._solution={availableAddOnSid:e,sid:i};this._uri=`/AvailableAddOns/${e}/Extensions/${i}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.availableAddOnSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AvailableAddOnExtensionList:a,AvailableAddOnExtensionPage:u,AvailableAddOnExtensionInstance:h,AvailableAddOnExtensionContext:f}},74874:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(20517).InstalledAddOnExtensionList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function InstalledAddOnList(t){function InstalledAddOnListInstance(t){return InstalledAddOnListInstance.get(t)}InstalledAddOnListInstance._version=t;InstalledAddOnListInstance._solution={};InstalledAddOnListInstance._uri=`/InstalledAddOns`;InstalledAddOnListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.availableAddOnSid)){throw new Error('Required parameter "opts.availableAddOnSid" missing.')}if(o.isUndefined(t.acceptTermsOfService)){throw new Error('Required parameter "opts.acceptTermsOfService" missing.')}var i=n.defer();var s=h.of({AvailableAddOnSid:o.get(t,"availableAddOnSid"),AcceptTermsOfService:u.bool(o.get(t,"acceptTermsOfService")),Configuration:u.object(o.get(t,"configuration")),UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InstalledAddOnListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InstalledAddOnListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InstalledAddOnListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InstalledAddOnListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InstalledAddOnListInstance.get=function get(t){return new l(this._version,t)};InstalledAddOnListInstance.toJSON=function toJSON(){return this._solution};InstalledAddOnListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InstalledAddOnListInstance};p=function InstalledAddOnPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function InstalledAddOnInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.description=e.description;this.configuration=e.configuration;this.uniqueName=e.unique_name;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.extensions=function extensions(){return this._proxy.extensions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function InstalledAddOnContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/InstalledAddOns/${e}`;this._extensions=undefined};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Configuration:u.object(o.get(t,"configuration")),UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"extensions",{get:function(){if(!this._extensions){this._extensions=new r(this._version,this._solution.sid)}return this._extensions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InstalledAddOnList:f,InstalledAddOnPage:p,InstalledAddOnInstance:d,InstalledAddOnContext:l}},20517:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function InstalledAddOnExtensionList(t,e){function InstalledAddOnExtensionListInstance(t){return InstalledAddOnExtensionListInstance.get(t)}InstalledAddOnExtensionListInstance._version=t;InstalledAddOnExtensionListInstance._solution={installedAddOnSid:e};InstalledAddOnExtensionListInstance._uri=`/InstalledAddOns/${e}/Extensions`;InstalledAddOnExtensionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InstalledAddOnExtensionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InstalledAddOnExtensionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InstalledAddOnExtensionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InstalledAddOnExtensionListInstance.get=function get(t){return new p(this._version,this._solution.installedAddOnSid,t)};InstalledAddOnExtensionListInstance.toJSON=function toJSON(){return this._solution};InstalledAddOnExtensionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InstalledAddOnExtensionListInstance};h=function InstalledAddOnExtensionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.installedAddOnSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function InstalledAddOnExtensionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.installedAddOnSid=e.installed_add_on_sid;this.friendlyName=e.friendly_name;this.productName=e.product_name;this.uniqueName=e.unique_name;this.enabled=e.enabled;this.url=e.url;this._context=undefined;this._solution={installedAddOnSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.installedAddOnSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InstalledAddOnExtensionContext(t,e,i){this._version=t;this._solution={installedAddOnSid:e,sid:i};this._uri=`/InstalledAddOns/${e}/Extensions/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.installedAddOnSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.enabled)){throw new Error('Required parameter "opts.enabled" missing.')}var i=n.defer();var s=a.of({Enabled:c.bool(o.get(t,"enabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.installedAddOnSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InstalledAddOnExtensionList:u,InstalledAddOnExtensionPage:h,InstalledAddOnExtensionInstance:f,InstalledAddOnExtensionContext:p}},53087:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(28234).DocumentList;var c=i(60938);var a=i(45068).SyncListList;var u=i(47515).SyncMapList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),WebhookUrl:o.get(t,"webhookUrl"),ReachabilityWebhooksEnabled:f.bool(o.get(t,"reachabilityWebhooksEnabled")),AclEnabled:f.bool(o.get(t,"aclEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new m(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};l=function ServicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,c.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.url=e.url;this.webhookUrl=e.webhook_url;this.reachabilityWebhooksEnabled=e.reachability_webhooks_enabled;this.aclEnabled=e.acl_enabled;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.documents=function documents(){return this._proxy.documents};v.prototype.syncLists=function syncLists(){return this._proxy.syncLists};v.prototype.syncMaps=function syncMaps(){return this._proxy.syncMaps};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._documents=undefined;this._syncLists=undefined;this._syncMaps=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({WebhookUrl:o.get(t,"webhookUrl"),FriendlyName:o.get(t,"friendlyName"),ReachabilityWebhooksEnabled:f.bool(o.get(t,"reachabilityWebhooksEnabled")),AclEnabled:f.bool(o.get(t,"aclEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"documents",{get:function(){if(!this._documents){this._documents=new r(this._version,this._solution.sid)}return this._documents}});Object.defineProperty(m.prototype,"syncLists",{get:function(){if(!this._syncLists){this._syncLists=new a(this._version,this._solution.sid)}return this._syncLists}});Object.defineProperty(m.prototype,"syncMaps",{get:function(){if(!this._syncMaps){this._syncMaps=new u(this._version,this._solution.sid)}return this._syncMaps}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:d,ServicePage:l,ServiceInstance:v,ServiceContext:m}},28234:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(58236).DocumentPermissionList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function DocumentList(t,e){function DocumentListInstance(t){return DocumentListInstance.get(t)}DocumentListInstance._version=t;DocumentListInstance._solution={serviceSid:e};DocumentListInstance._uri=`/Services/${e}/Documents`;DocumentListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),Data:u.object(o.get(t,"data"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DocumentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DocumentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};DocumentListInstance.toJSON=function toJSON(){return this._solution};DocumentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DocumentListInstance};p=function DocumentPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function DocumentInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.data=e.data;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.documentPermissions=function documentPermissions(){return this._proxy.documentPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function DocumentContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Documents/${i}`;this._documentPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=h.of({Data:u.object(o.get(t,"data"))});var r=h.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"documentPermissions",{get:function(){if(!this._documentPermissions){this._documentPermissions=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._documentPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DocumentList:f,DocumentPage:p,DocumentInstance:d,DocumentContext:l}},58236:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function DocumentPermissionList(t,e,i){function DocumentPermissionListInstance(t){return DocumentPermissionListInstance.get(t)}DocumentPermissionListInstance._version=t;DocumentPermissionListInstance._solution={serviceSid:e,documentSid:i};DocumentPermissionListInstance._uri=`/Services/${e}/Documents/${i}/Permissions`;DocumentPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DocumentPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DocumentPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.documentSid,t)};DocumentPermissionListInstance.toJSON=function toJSON(){return this._solution};DocumentPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DocumentPermissionListInstance};h=function DocumentPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.documentSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DocumentPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.documentSid=e.document_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,documentSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.documentSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DocumentPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,documentSid:i,identity:n};this._uri=`/Services/${e}/Documents/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.documentSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.documentSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DocumentPermissionList:u,DocumentPermissionPage:h,DocumentPermissionInstance:f,DocumentPermissionContext:p}},45068:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(58940).SyncListItemList;var a=i(14413).SyncListPermissionList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function SyncListList(t,e){function SyncListListInstance(t){return SyncListListInstance.get(t)}SyncListListInstance._version=t;SyncListListInstance._solution={serviceSid:e};SyncListListInstance._uri=`/Services/${e}/Lists`;SyncListListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};SyncListListInstance.toJSON=function toJSON(){return this._solution};SyncListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListListInstance};p=function SyncListPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncListInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.syncListItems=function syncListItems(){return this._proxy.syncListItems};d.prototype.syncListPermissions=function syncListPermissions(){return this._proxy.syncListPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SyncListContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Lists/${i}`;this._syncListItems=undefined;this._syncListPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"syncListItems",{get:function(){if(!this._syncListItems){this._syncListItems=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncListItems}});Object.defineProperty(l.prototype,"syncListPermissions",{get:function(){if(!this._syncListPermissions){this._syncListPermissions=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncListPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListList:f,SyncListPage:p,SyncListInstance:d,SyncListContext:l}},58940:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function SyncListItemList(t,e,i){function SyncListItemListInstance(t){return SyncListItemListInstance.get(t)}SyncListItemListInstance._version=t;SyncListItemListInstance._solution={serviceSid:e,listSid:i};SyncListItemListInstance._uri=`/Services/${e}/Lists/${i}/Items`;SyncListItemListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListItemListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListItemListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),From:o.get(t,"from"),Bounds:o.get(t,"bounds"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.listSid,t)};SyncListItemListInstance.toJSON=function toJSON(){return this._solution};SyncListItemListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListItemListInstance};f=function SyncListItemPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.listSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncListItemInstance(t,e,i,n,o){this._version=t;this.index=c.integer(e.index);this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.listSid=e.list_sid;this.url=e.url;this.revision=e.revision;this.data=e.data;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,listSid:n,index:o||this.index}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.listSid,this._solution.index)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncListItemContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,listSid:i,index:n};this._uri=`/Services/${e}/Lists/${i}/Items/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data"))});var r=u.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListItemList:h,SyncListItemPage:f,SyncListItemInstance:p,SyncListItemContext:d}},14413:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function SyncListPermissionList(t,e,i){function SyncListPermissionListInstance(t){return SyncListPermissionListInstance.get(t)}SyncListPermissionListInstance._version=t;SyncListPermissionListInstance._solution={serviceSid:e,listSid:i};SyncListPermissionListInstance._uri=`/Services/${e}/Lists/${i}/Permissions`;SyncListPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.listSid,t)};SyncListPermissionListInstance.toJSON=function toJSON(){return this._solution};SyncListPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListPermissionListInstance};h=function SyncListPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.listSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SyncListPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.listSid=e.list_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,listSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.listSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncListPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,listSid:i,identity:n};this._uri=`/Services/${e}/Lists/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListPermissionList:u,SyncListPermissionPage:h,SyncListPermissionInstance:f,SyncListPermissionContext:p}},47515:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(76296).SyncMapItemList;var a=i(51290).SyncMapPermissionList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function SyncMapList(t,e){function SyncMapListInstance(t){return SyncMapListInstance.get(t)}SyncMapListInstance._version=t;SyncMapListInstance._solution={serviceSid:e};SyncMapListInstance._uri=`/Services/${e}/Maps`;SyncMapListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};SyncMapListInstance.toJSON=function toJSON(){return this._solution};SyncMapListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapListInstance};p=function SyncMapPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncMapInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.syncMapItems=function syncMapItems(){return this._proxy.syncMapItems};d.prototype.syncMapPermissions=function syncMapPermissions(){return this._proxy.syncMapPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SyncMapContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Maps/${i}`;this._syncMapItems=undefined;this._syncMapPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"syncMapItems",{get:function(){if(!this._syncMapItems){this._syncMapItems=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncMapItems}});Object.defineProperty(l.prototype,"syncMapPermissions",{get:function(){if(!this._syncMapPermissions){this._syncMapPermissions=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncMapPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapList:f,SyncMapPage:p,SyncMapInstance:d,SyncMapContext:l}},76296:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function SyncMapItemList(t,e,i){function SyncMapItemListInstance(t){return SyncMapItemListInstance.get(t)}SyncMapItemListInstance._version=t;SyncMapItemListInstance._solution={serviceSid:e,mapSid:i};SyncMapItemListInstance._uri=`/Services/${e}/Maps/${i}/Items`;SyncMapItemListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.key)){throw new Error('Required parameter "opts.key" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Key:o.get(t,"key"),Data:a.object(o.get(t,"data"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapItemListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapItemListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),From:o.get(t,"from"),Bounds:o.get(t,"bounds"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.mapSid,t)};SyncMapItemListInstance.toJSON=function toJSON(){return this._solution};SyncMapItemListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapItemListInstance};f=function SyncMapItemPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.mapSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncMapItemInstance(t,e,i,n,o){this._version=t;this.key=e.key;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.mapSid=e.map_sid;this.url=e.url;this.revision=e.revision;this.data=e.data;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,mapSid:n,key:o||this.key}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.mapSid,this._solution.key)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncMapItemContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,mapSid:i,key:n};this._uri=`/Services/${e}/Maps/${i}/Items/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data"))});var r=u.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapItemList:h,SyncMapItemPage:f,SyncMapItemInstance:p,SyncMapItemContext:d}},51290:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function SyncMapPermissionList(t,e,i){function SyncMapPermissionListInstance(t){return SyncMapPermissionListInstance.get(t)}SyncMapPermissionListInstance._version=t;SyncMapPermissionListInstance._solution={serviceSid:e,mapSid:i};SyncMapPermissionListInstance._uri=`/Services/${e}/Maps/${i}/Permissions`;SyncMapPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.mapSid,t)};SyncMapPermissionListInstance.toJSON=function toJSON(){return this._solution};SyncMapPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapPermissionListInstance};h=function SyncMapPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.mapSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SyncMapPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.mapSid=e.map_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,mapSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.mapSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncMapPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,mapSid:i,identity:n};this._uri=`/Services/${e}/Maps/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapPermissionList:u,SyncMapPermissionPage:h,SyncMapPermissionInstance:f,SyncMapPermissionContext:p}},6611:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(92290).ChannelList;var c=i(60938);var a=i(72142);var u;var h;var f;var p;u=function BrandedChannelList(t){function BrandedChannelListInstance(t){return BrandedChannelListInstance.get(t)}BrandedChannelListInstance._version=t;BrandedChannelListInstance._solution={};BrandedChannelListInstance.get=function get(t){return new p(this._version,t)};BrandedChannelListInstance.toJSON=function toJSON(){return this._solution};BrandedChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BrandedChannelListInstance};h=function BrandedChannelPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,c.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function BrandedChannelInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.businessSid=e.business_sid;this.brandSid=e.brand_sid;this.sid=e.sid;this.links=e.links;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.channels=function channels(){return this._proxy.channels};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BrandedChannelContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/BrandedChannels/${e}`;this._channels=undefined};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(p.prototype,"channels",{get:function(){if(!this._channels){this._channels=new r(this._version,this._solution.sid)}return this._channels}});p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BrandedChannelList:u,BrandedChannelPage:h,BrandedChannelInstance:f,BrandedChannelContext:p}},92290:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function ChannelList(t,e){function ChannelListInstance(t){return ChannelListInstance.get(t)}ChannelListInstance._version=t;ChannelListInstance._solution={brandedChannelSid:e};ChannelListInstance._uri=`/BrandedChannels/${e}/Channels`;ChannelListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumberSid)){throw new Error('Required parameter "opts.phoneNumberSid" missing.')}var i=n.defer();var s=c.of({PhoneNumberSid:o.get(t,"phoneNumberSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChannelListInstance.toJSON=function toJSON(){return this._solution};ChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChannelListInstance};u=function ChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.brandedChannelSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ChannelInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.businessSid=e.business_sid;this.brandSid=e.brand_sid;this.brandedChannelSid=e.branded_channel_sid;this.phoneNumberSid=e.phone_number_sid;this.phoneNumber=e.phone_number;this.url=e.url;this._context=undefined;this._solution={brandedChannelSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChannelList:a,ChannelPage:u,ChannelInstance:h}},47394:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function BrandsInformationList(t){function BrandsInformationListInstance(t){return BrandsInformationListInstance.get(t)}BrandsInformationListInstance._version=t;BrandsInformationListInstance._solution={};BrandsInformationListInstance.get=function get(){return new p(this._version)};BrandsInformationListInstance.toJSON=function toJSON(){return this._solution};BrandsInformationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BrandsInformationListInstance};h=function BrandsInformationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function BrandsInformationInstance(t,e){this._version=t;this.updateTime=c.iso8601DateTime(e.update_time);this.fileLink=e.file_link;this.fileLinkTtlInSeconds=e.file_link_ttl_in_seconds;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BrandsInformationContext(t){this._version=t;this._solution={};this._uri=`/BrandsInformation`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({"If-None-Match":o.get(t,"ifNoneMatch")});var r=this._version.fetch({uri:this._uri,method:"GET",headers:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BrandsInformationList:u,BrandsInformationPage:h,BrandsInformationInstance:f,BrandsInformationContext:p}},62599:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function CpsList(t){function CpsListInstance(t){return CpsListInstance.get(t)}CpsListInstance._version=t;CpsListInstance._solution={};CpsListInstance.get=function get(){return new f(this._version)};CpsListInstance.toJSON=function toJSON(){return this._solution};CpsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CpsListInstance};u=function CpsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function CpsInstance(t,e){this._version=t;this.cpsUrl=e.cps_url;this.phoneNumber=e.phone_number;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version)}return this._context}});h.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CpsContext(t){this._version=t;this._solution={};this._uri=`/CPS`};f.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({"X-Xcnam-Sensitive-Phone-Number":o.get(t,"xXcnamSensitivePhoneNumber")});var r=this._version.fetch({uri:this._uri,method:"GET",headers:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CpsList:a,CpsPage:u,CpsInstance:h,CpsContext:f}},75025:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CurrentCallList(t){function CurrentCallListInstance(t){return CurrentCallListInstance.get(t)}CurrentCallListInstance._version=t;CurrentCallListInstance._solution={};CurrentCallListInstance.get=function get(){return new p(this._version)};CurrentCallListInstance.toJSON=function toJSON(){return this._solution};CurrentCallListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CurrentCallListInstance};h=function CurrentCallPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CurrentCallInstance(t,e){this._version=t;this.bgColor=e.bg_color;this.caller=e.caller;this.createdAt=c.iso8601DateTime(e.created_at);this.fontColor=e.font_color;this.from=e.from;this.logo=e.logo;this.manager=e.manager;this.reason=e.reason;this.shieldImg=e.shield_img;this.sid=e.sid;this.status=e.status;this.to=e.to;this.url=e.url;this.useCase=e.use_case;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CurrentCallContext(t){this._version=t;this._solution={};this._uri=`/CurrentCall`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({"X-Xcnam-Sensitive-Phone-Number-From":o.get(t,"xXcnamSensitivePhoneNumberFrom"),"X-Xcnam-Sensitive-Phone-Number-To":o.get(t,"xXcnamSensitivePhoneNumberTo")});var r=this._version.fetch({uri:this._uri,method:"GET",headers:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CurrentCallList:u,CurrentCallPage:h,CurrentCallInstance:f,CurrentCallContext:p}},96714:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(51746).AssistantFallbackActionsList;var c=i(33903).AssistantInitiationActionsList;var a=i(96381).DialogueList;var u=i(40281).FieldTypeList;var h=i(80365).ModelBuildList;var f=i(60938);var p=i(60731).QueryList;var d=i(70387).StyleSheetList;var l=i(75994).TaskList;var v=i(80513);var m=i(6372);var _=i(72142);var g;var y;var S;var b;g=function AssistantList(t){function AssistantListInstance(t){return AssistantListInstance.get(t)}AssistantListInstance._version=t;AssistantListInstance._solution={};AssistantListInstance._uri=`/Assistants`;AssistantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssistantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssistantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new y(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({FriendlyName:o.get(t,"friendlyName"),LogQueries:m.bool(o.get(t,"logQueries")),UniqueName:o.get(t,"uniqueName"),CallbackUrl:o.get(t,"callbackUrl"),CallbackEvents:o.get(t,"callbackEvents"),FallbackActions:m.object(o.get(t,"fallbackActions")),InitiationActions:m.object(o.get(t,"initiationActions")),StyleSheet:m.object(o.get(t,"styleSheet"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new S(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssistantListInstance.get=function get(t){return new b(this._version,t)};AssistantListInstance.toJSON=function toJSON(){return this._solution};AssistantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssistantListInstance};y=function AssistantPage(t,e,i){this._solution=i;f.prototype.constructor.call(this,t,e,this._solution)};o.extend(y.prototype,f.prototype);y.prototype.constructor=y;y.prototype.getInstance=function getInstance(t){return new S(this._version,t)};y.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};S=function AssistantInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.dateCreated=v.iso8601DateTime(e.date_created);this.dateUpdated=v.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.latestModelBuildSid=e.latest_model_build_sid;this.links=e.links;this.logQueries=e.log_queries;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this.callbackUrl=e.callback_url;this.callbackEvents=e.callback_events;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(S.prototype,"_proxy",{get:function(){if(!this._context){this._context=new b(this._version,this._solution.sid)}return this._context}});S.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};S.prototype.update=function update(t,e){return this._proxy.update(t,e)};S.prototype.remove=function remove(t){return this._proxy.remove(t)};S.prototype.fieldTypes=function fieldTypes(){return this._proxy.fieldTypes};S.prototype.tasks=function tasks(){return this._proxy.tasks};S.prototype.modelBuilds=function modelBuilds(){return this._proxy.modelBuilds};S.prototype.queries=function queries(){return this._proxy.queries};S.prototype.assistantFallbackActions=function assistantFallbackActions(){return this._proxy.assistantFallbackActions};S.prototype.assistantInitiationActions=function assistantInitiationActions(){return this._proxy.assistantInitiationActions};S.prototype.dialogues=function dialogues(){return this._proxy.dialogues};S.prototype.styleSheet=function styleSheet(){return this._proxy.styleSheet};S.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};S.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};b=function AssistantContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Assistants/${e}`;this._fieldTypes=undefined;this._tasks=undefined;this._modelBuilds=undefined;this._queries=undefined;this._assistantFallbackActions=undefined;this._assistantInitiationActions=undefined;this._dialogues=undefined;this._styleSheet=undefined};b.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new S(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};b.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=_.of({FriendlyName:o.get(t,"friendlyName"),LogQueries:m.bool(o.get(t,"logQueries")),UniqueName:o.get(t,"uniqueName"),CallbackUrl:o.get(t,"callbackUrl"),CallbackEvents:o.get(t,"callbackEvents"),FallbackActions:m.object(o.get(t,"fallbackActions")),InitiationActions:m.object(o.get(t,"initiationActions")),StyleSheet:m.object(o.get(t,"styleSheet"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new S(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};b.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(b.prototype,"fieldTypes",{get:function(){if(!this._fieldTypes){this._fieldTypes=new u(this._version,this._solution.sid)}return this._fieldTypes}});Object.defineProperty(b.prototype,"tasks",{get:function(){if(!this._tasks){this._tasks=new l(this._version,this._solution.sid)}return this._tasks}});Object.defineProperty(b.prototype,"modelBuilds",{get:function(){if(!this._modelBuilds){this._modelBuilds=new h(this._version,this._solution.sid)}return this._modelBuilds}});Object.defineProperty(b.prototype,"queries",{get:function(){if(!this._queries){this._queries=new p(this._version,this._solution.sid)}return this._queries}});Object.defineProperty(b.prototype,"assistantFallbackActions",{get:function(){if(!this._assistantFallbackActions){this._assistantFallbackActions=new r(this._version,this._solution.sid)}return this._assistantFallbackActions}});Object.defineProperty(b.prototype,"assistantInitiationActions",{get:function(){if(!this._assistantInitiationActions){this._assistantInitiationActions=new c(this._version,this._solution.sid)}return this._assistantInitiationActions}});Object.defineProperty(b.prototype,"dialogues",{get:function(){if(!this._dialogues){this._dialogues=new a(this._version,this._solution.sid)}return this._dialogues}});Object.defineProperty(b.prototype,"styleSheet",{get:function(){if(!this._styleSheet){this._styleSheet=new d(this._version,this._solution.sid)}return this._styleSheet}});b.prototype.toJSON=function toJSON(){return this._solution};b.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssistantList:g,AssistantPage:y,AssistantInstance:S,AssistantContext:b}},51746:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function AssistantFallbackActionsList(t,e){function AssistantFallbackActionsListInstance(t){return AssistantFallbackActionsListInstance.get(t)}AssistantFallbackActionsListInstance._version=t;AssistantFallbackActionsListInstance._solution={assistantSid:e};AssistantFallbackActionsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid)};AssistantFallbackActionsListInstance.toJSON=function toJSON(){return this._solution};AssistantFallbackActionsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssistantFallbackActionsListInstance};h=function AssistantFallbackActionsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AssistantFallbackActionsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AssistantFallbackActionsContext(t,e){this._version=t;this._solution={assistantSid:e};this._uri=`/Assistants/${e}/FallbackActions`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FallbackActions:c.object(o.get(t,"fallbackActions"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssistantFallbackActionsList:u,AssistantFallbackActionsPage:h,AssistantFallbackActionsInstance:f,AssistantFallbackActionsContext:p}},33903:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function AssistantInitiationActionsList(t,e){function AssistantInitiationActionsListInstance(t){return AssistantInitiationActionsListInstance.get(t)}AssistantInitiationActionsListInstance._version=t;AssistantInitiationActionsListInstance._solution={assistantSid:e};AssistantInitiationActionsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid)};AssistantInitiationActionsListInstance.toJSON=function toJSON(){return this._solution};AssistantInitiationActionsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssistantInitiationActionsListInstance};h=function AssistantInitiationActionsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AssistantInitiationActionsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AssistantInitiationActionsContext(t,e){this._version=t;this._solution={assistantSid:e};this._uri=`/Assistants/${e}/InitiationActions`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({InitiationActions:c.object(o.get(t,"initiationActions"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssistantInitiationActionsList:u,AssistantInitiationActionsPage:h,AssistantInitiationActionsInstance:f,AssistantInitiationActionsContext:p}},96381:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function DialogueList(t,e){function DialogueListInstance(t){return DialogueListInstance.get(t)}DialogueListInstance._version=t;DialogueListInstance._solution={assistantSid:e};DialogueListInstance.get=function get(t){return new f(this._version,this._solution.assistantSid,t)};DialogueListInstance.toJSON=function toJSON(){return this._solution};DialogueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DialogueListInstance};u=function DialoguePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.assistantSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function DialogueInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.data=e.data;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DialogueContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Dialogues/${i}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DialogueList:a,DialoguePage:u,DialogueInstance:h,DialogueContext:f}},40281:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(47746).FieldValueList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function FieldTypeList(t,e){function FieldTypeListInstance(t){return FieldTypeListInstance.get(t)}FieldTypeListInstance._version=t;FieldTypeListInstance._solution={assistantSid:e};FieldTypeListInstance._uri=`/Assistants/${e}/FieldTypes`;FieldTypeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldTypeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldTypeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldTypeListInstance.get=function get(t){return new d(this._version,this._solution.assistantSid,t)};FieldTypeListInstance.toJSON=function toJSON(){return this._solution};FieldTypeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldTypeListInstance};f=function FieldTypePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.assistantSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldTypeInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.links=e.links;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fieldValues=function fieldValues(){return this._proxy.fieldValues};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FieldTypeContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/FieldTypes/${i}`;this._fieldValues=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"fieldValues",{get:function(){if(!this._fieldValues){this._fieldValues=new r(this._version,this._solution.assistantSid,this._solution.sid)}return this._fieldValues}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldTypeList:h,FieldTypePage:f,FieldTypeInstance:p,FieldTypeContext:d}},47746:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FieldValueList(t,e,i){function FieldValueListInstance(t){return FieldValueListInstance.get(t)}FieldValueListInstance._version=t;FieldValueListInstance._solution={assistantSid:e,fieldTypeSid:i};FieldValueListInstance._uri=`/Assistants/${e}/FieldTypes/${i}/FieldValues`;FieldValueListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldValueListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldValueListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.value)){throw new Error('Required parameter "opts.value" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),Value:o.get(t,"value"),SynonymOf:o.get(t,"synonymOf")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldValueListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.fieldTypeSid,t)};FieldValueListInstance.toJSON=function toJSON(){return this._solution};FieldValueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldValueListInstance};h=function FieldValuePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FieldValueInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.fieldTypeSid=e.field_type_sid;this.language=e.language;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.value=e.value;this.url=e.url;this.synonymOf=e.synonym_of;this._context=undefined;this._solution={assistantSid:i,fieldTypeSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldValueContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,fieldTypeSid:i,sid:n};this._uri=`/Assistants/${e}/FieldTypes/${i}/FieldValues/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.fieldTypeSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldValueList:u,FieldValuePage:h,FieldValueInstance:f,FieldValueContext:p}},80365:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function ModelBuildList(t,e){function ModelBuildListInstance(t){return ModelBuildListInstance.get(t)}ModelBuildListInstance._version=t;ModelBuildListInstance._solution={assistantSid:e};ModelBuildListInstance._uri=`/Assistants/${e}/ModelBuilds`;ModelBuildListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ModelBuildListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ModelBuildListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({StatusCallback:o.get(t,"statusCallback"),UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ModelBuildListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,t)};ModelBuildListInstance.toJSON=function toJSON(){return this._solution};ModelBuildListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ModelBuildListInstance};h=function ModelBuildPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ModelBuildInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.assistantSid=e.assistant_sid;this.sid=e.sid;this.status=e.status;this.uniqueName=e.unique_name;this.url=e.url;this.buildDuration=c.integer(e.build_duration);this.errorCode=c.integer(e.error_code);this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ModelBuildContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/ModelBuilds/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ModelBuildList:u,ModelBuildPage:h,ModelBuildInstance:f,ModelBuildContext:p}},60731:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function QueryList(t,e){function QueryListInstance(t){return QueryListInstance.get(t)}QueryListInstance._version=t;QueryListInstance._solution={assistantSid:e};QueryListInstance._uri=`/Assistants/${e}/Queries`;QueryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};QueryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};QueryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),ModelBuild:o.get(t,"modelBuild"),Status:o.get(t,"status"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.query)){throw new Error('Required parameter "opts.query" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),Query:o.get(t,"query"),Tasks:o.get(t,"tasks"),ModelBuild:o.get(t,"modelBuild"),Field:o.get(t,"field")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};QueryListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,t)};QueryListInstance.toJSON=function toJSON(){return this._solution};QueryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return QueryListInstance};h=function QueryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function QueryInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.results=e.results;this.language=e.language;this.modelBuildSid=e.model_build_sid;this.query=e.query;this.sampleSid=e.sample_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.status=e.status;this.url=e.url;this.sourceChannel=e.source_channel;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function QueryContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Queries/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({SampleSid:o.get(t,"sampleSid"),Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={QueryList:u,QueryPage:h,QueryInstance:f,QueryContext:p}},70387:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function StyleSheetList(t,e){function StyleSheetListInstance(t){return StyleSheetListInstance.get(t)}StyleSheetListInstance._version=t;StyleSheetListInstance._solution={assistantSid:e};StyleSheetListInstance.get=function get(){return new p(this._version,this._solution.assistantSid)};StyleSheetListInstance.toJSON=function toJSON(){return this._solution};StyleSheetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return StyleSheetListInstance};h=function StyleSheetPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function StyleSheetInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function StyleSheetContext(t,e){this._version=t;this._solution={assistantSid:e};this._uri=`/Assistants/${e}/StyleSheet`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({StyleSheet:c.object(o.get(t,"styleSheet"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={StyleSheetList:u,StyleSheetPage:h,StyleSheetInstance:f,StyleSheetContext:p}},75994:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(74686).FieldList;var c=i(60938);var a=i(98401).SampleList;var u=i(47050).TaskActionsList;var h=i(48520).TaskStatisticsList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function TaskList(t,e){function TaskListInstance(t){return TaskListInstance.get(t)}TaskListInstance._version=t;TaskListInstance._solution={assistantSid:e};TaskListInstance._uri=`/Assistants/${e}/Tasks`;TaskListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=d.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),Actions:p.object(o.get(t,"actions")),ActionsUrl:o.get(t,"actionsUrl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.get=function get(t){return new _(this._version,this._solution.assistantSid,t)};TaskListInstance.toJSON=function toJSON(){return this._solution};TaskListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskListInstance};v=function TaskPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,c.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t,this._solution.assistantSid)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function TaskInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.links=e.links;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.actionsUrl=e.actions_url;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,sid:n||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.assistantSid,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.fields=function fields(){return this._proxy.fields};m.prototype.samples=function samples(){return this._proxy.samples};m.prototype.taskActions=function taskActions(){return this._proxy.taskActions};m.prototype.statistics=function statistics(){return this._proxy.statistics};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function TaskContext(t,e,i){this._version=t;this._solution={assistantSid:e,sid:i};this._uri=`/Assistants/${e}/Tasks/${i}`;this._fields=undefined;this._samples=undefined;this._taskActions=undefined;this._statistics=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),Actions:p.object(o.get(t,"actions")),ActionsUrl:o.get(t,"actionsUrl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.assistantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(_.prototype,"fields",{get:function(){if(!this._fields){this._fields=new r(this._version,this._solution.assistantSid,this._solution.sid)}return this._fields}});Object.defineProperty(_.prototype,"samples",{get:function(){if(!this._samples){this._samples=new a(this._version,this._solution.assistantSid,this._solution.sid)}return this._samples}});Object.defineProperty(_.prototype,"taskActions",{get:function(){if(!this._taskActions){this._taskActions=new u(this._version,this._solution.assistantSid,this._solution.sid)}return this._taskActions}});Object.defineProperty(_.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new h(this._version,this._solution.assistantSid,this._solution.sid)}return this._statistics}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskList:l,TaskPage:v,TaskInstance:m,TaskContext:_}},74686:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FieldList(t,e,i){function FieldListInstance(t){return FieldListInstance.get(t)}FieldListInstance._version=t;FieldListInstance._solution={assistantSid:e,taskSid:i};FieldListInstance._uri=`/Assistants/${e}/Tasks/${i}/Fields`;FieldListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FieldListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FieldListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.fieldType)){throw new Error('Required parameter "opts.fieldType" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=a.of({FieldType:o.get(t,"fieldType"),UniqueName:o.get(t,"uniqueName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FieldListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.taskSid,t)};FieldListInstance.toJSON=function toJSON(){return this._solution};FieldListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FieldListInstance};h=function FieldPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FieldInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.fieldType=e.field_type;this.taskSid=e.task_sid;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.url=e.url;this._context=undefined;this._solution={assistantSid:i,taskSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FieldContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,taskSid:i,sid:n};this._uri=`/Assistants/${e}/Tasks/${i}/Fields/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FieldList:u,FieldPage:h,FieldInstance:f,FieldContext:p}},98401:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SampleList(t,e,i){function SampleListInstance(t){return SampleListInstance.get(t)}SampleListInstance._version=t;SampleListInstance._solution={assistantSid:e,taskSid:i};SampleListInstance._uri=`/Assistants/${e}/Tasks/${i}/Samples`;SampleListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SampleListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SampleListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.language)){throw new Error('Required parameter "opts.language" missing.')}if(o.isUndefined(t.taggedText)){throw new Error('Required parameter "opts.taggedText" missing.')}var i=n.defer();var s=a.of({Language:o.get(t,"language"),TaggedText:o.get(t,"taggedText"),SourceChannel:o.get(t,"sourceChannel")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SampleListInstance.get=function get(t){return new p(this._version,this._solution.assistantSid,this._solution.taskSid,t)};SampleListInstance.toJSON=function toJSON(){return this._solution};SampleListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SampleListInstance};h=function SamplePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SampleInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.taskSid=e.task_sid;this.language=e.language;this.assistantSid=e.assistant_sid;this.sid=e.sid;this.taggedText=e.tagged_text;this.url=e.url;this.sourceChannel=e.source_channel;this._context=undefined;this._solution={assistantSid:i,taskSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SampleContext(t,e,i,n){this._version=t;this._solution={assistantSid:e,taskSid:i,sid:n};this._uri=`/Assistants/${e}/Tasks/${i}/Samples/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Language:o.get(t,"language"),TaggedText:o.get(t,"taggedText"),SourceChannel:o.get(t,"sourceChannel")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SampleList:u,SamplePage:h,SampleInstance:f,SampleContext:p}},47050:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function TaskActionsList(t,e,i){function TaskActionsListInstance(t){return TaskActionsListInstance.get(t)}TaskActionsListInstance._version=t;TaskActionsListInstance._solution={assistantSid:e,taskSid:i};TaskActionsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid,this._solution.taskSid)};TaskActionsListInstance.toJSON=function toJSON(){return this._solution};TaskActionsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskActionsListInstance};h=function TaskActionsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskActionsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.taskSid=e.task_sid;this.url=e.url;this.data=e.data;this._context=undefined;this._solution={assistantSid:i,taskSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskActionsContext(t,e,i){this._version=t;this._solution={assistantSid:e,taskSid:i};this._uri=`/Assistants/${e}/Tasks/${i}/Actions`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Actions:c.object(o.get(t,"actions"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskActionsList:u,TaskActionsPage:h,TaskActionsInstance:f,TaskActionsContext:p}},48520:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TaskStatisticsList(t,e,i){function TaskStatisticsListInstance(t){return TaskStatisticsListInstance.get(t)}TaskStatisticsListInstance._version=t;TaskStatisticsListInstance._solution={assistantSid:e,taskSid:i};TaskStatisticsListInstance.get=function get(){return new p(this._version,this._solution.assistantSid,this._solution.taskSid)};TaskStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskStatisticsListInstance};h=function TaskStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.assistantSid,this._solution.taskSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assistantSid=e.assistant_sid;this.taskSid=e.task_sid;this.samplesCount=c.integer(e.samples_count);this.fieldsCount=c.integer(e.fields_count);this.url=e.url;this._context=undefined;this._solution={assistantSid:i,taskSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.assistantSid,this._solution.taskSid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskStatisticsContext(t,e,i){this._version=t;this._solution={assistantSid:e,taskSid:i};this._uri=`/Assistants/${e}/Tasks/${i}/Statistics`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.assistantSid,this._solution.taskSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskStatisticsList:u,TaskStatisticsPage:h,TaskStatisticsInstance:f,TaskStatisticsContext:p}},37480:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CommandList(t){function CommandListInstance(t){return CommandListInstance.get(t)}CommandListInstance._version=t;CommandListInstance._solution={};CommandListInstance._uri=`/Commands`;CommandListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CommandListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CommandListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Device:o.get(t,"device"),Sim:o.get(t,"sim"),Status:o.get(t,"status"),Direction:o.get(t,"direction"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.command)){throw new Error('Required parameter "opts.command" missing.')}var i=n.defer();var s=a.of({Command:o.get(t,"command"),Device:o.get(t,"device"),Sim:o.get(t,"sim"),CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl"),CommandMode:o.get(t,"commandMode"),IncludeSid:o.get(t,"includeSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.get=function get(t){return new p(this._version,t)};CommandListInstance.toJSON=function toJSON(){return this._solution};CommandListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CommandListInstance};h=function CommandPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CommandInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.deviceSid=e.device_sid;this.simSid=e.sim_sid;this.command=e.command;this.commandMode=e.command_mode;this.status=e.status;this.direction=e.direction;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CommandContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Commands/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CommandList:u,CommandPage:h,CommandInstance:f,CommandContext:p}},44607:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RatePlanList(t){function RatePlanListInstance(t){return RatePlanListInstance.get(t)}RatePlanListInstance._version=t;RatePlanListInstance._solution={};RatePlanListInstance._uri=`/RatePlans`;RatePlanListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RatePlanListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RatePlanListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),DataEnabled:a.bool(o.get(t,"dataEnabled")),DataLimit:o.get(t,"dataLimit"),DataMetering:o.get(t,"dataMetering"),MessagingEnabled:a.bool(o.get(t,"messagingEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),CommandsEnabled:a.bool(o.get(t,"commandsEnabled")),NationalRoamingEnabled:a.bool(o.get(t,"nationalRoamingEnabled")),InternationalRoaming:a.map(o.get(t,"internationalRoaming"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.get=function get(t){return new d(this._version,t)};RatePlanListInstance.toJSON=function toJSON(){return this._solution};RatePlanListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RatePlanListInstance};f=function RatePlanPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RatePlanInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dataEnabled=e.data_enabled;this.dataMetering=e.data_metering;this.dataLimit=c.integer(e.data_limit);this.messagingEnabled=e.messaging_enabled;this.voiceEnabled=e.voice_enabled;this.nationalRoamingEnabled=e.national_roaming_enabled;this.internationalRoaming=e.international_roaming;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RatePlanContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RatePlans/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RatePlanList:h,RatePlanPage:f,RatePlanInstance:p,RatePlanContext:d}},52633:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(3593).UsageList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function SimList(t){function SimListInstance(t){return SimListInstance.get(t)}SimListInstance._version=t;SimListInstance._solution={};SimListInstance._uri=`/Sims`;SimListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SimListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SimListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Status:o.get(t,"status"),Iccid:o.get(t,"iccid"),RatePlan:o.get(t,"ratePlan"),EId:o.get(t,"eId"),SimRegistrationCode:o.get(t,"simRegistrationCode"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.get=function get(t){return new d(this._version,t)};SimListInstance.toJSON=function toJSON(){return this._solution};SimListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SimListInstance};f=function SimPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SimInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.ratePlanSid=e.rate_plan_sid;this.friendlyName=e.friendly_name;this.iccid=e.iccid;this.eId=e.e_id;this.status=e.status;this.commandsCallbackUrl=e.commands_callback_url;this.commandsCallbackMethod=e.commands_callback_method;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.usage=function usage(){return this._proxy.usage};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SimContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Sims/${e}`;this._usage=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl"),FriendlyName:o.get(t,"friendlyName"),RatePlan:o.get(t,"ratePlan"),Status:o.get(t,"status"),CommandsCallbackMethod:o.get(t,"commandsCallbackMethod"),CommandsCallbackUrl:o.get(t,"commandsCallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"usage",{get:function(){if(!this._usage){this._usage=new c(this._version,this._solution.sid)}return this._usage}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SimList:h,SimPage:f,SimInstance:p,SimContext:d}},3593:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function UsageList(t,e){function UsageListInstance(t){return UsageListInstance.get(t)}UsageListInstance._version=t;UsageListInstance._solution={simSid:e};UsageListInstance.get=function get(){return new f(this._version,this._solution.simSid)};UsageListInstance.toJSON=function toJSON(){return this._solution};UsageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UsageListInstance};u=function UsagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.simSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function UsageInstance(t,e,i){this._version=t;this.simSid=e.sim_sid;this.simUniqueName=e.sim_unique_name;this.accountSid=e.account_sid;this.period=e.period;this.commandsUsage=e.commands_usage;this.commandsCosts=e.commands_costs;this.dataUsage=e.data_usage;this.dataCosts=e.data_costs;this.url=e.url;this._context=undefined;this._solution={simSid:i}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.simSid)}return this._context}});h.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UsageContext(t,e){this._version=t;this._solution={simSid:e};this._uri=`/Sims/${e}/Usage`};f.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({End:o.get(t,"end"),Start:o.get(t,"start")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution.simSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UsageList:a,UsagePage:u,UsageInstance:h,UsageContext:f}},49274:(t,e,i)=>{"use strict";var n=i(90250);var o=i(18127).MessagingList;var s=i(23755).PhoneNumberList;var r=i(64351);var c=i(43878).VoiceList;function V1(t){r.prototype.constructor.call(this,t,"v1");this._messaging=undefined;this._phoneNumbers=undefined;this._voice=undefined}n.extend(V1.prototype,r.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"messaging",{get:function(){this._messaging=this._messaging||new o(this);return this._messaging}});Object.defineProperty(V1.prototype,"phoneNumbers",{get:function(){this._phoneNumbers=this._phoneNumbers||new s(this);return this._phoneNumbers}});Object.defineProperty(V1.prototype,"voice",{get:function(){this._voice=this._voice||new c(this);return this._voice}});t.exports=V1},27068:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64351);var s=i(55726).VoiceList;function V2(t){o.prototype.constructor.call(this,t,"v2");this._voice=undefined}n.extend(V2.prototype,o.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"voice",{get:function(){this._voice=this._voice||new s(this);return this._voice}});t.exports=V2},18127:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(61788).CountryList;var r=i(60938);var c;var a;var u;c=function MessagingList(t){function MessagingListInstance(t){return MessagingListInstance.get(t)}MessagingListInstance._version=t;MessagingListInstance._solution={};MessagingListInstance._countries=undefined;Object.defineProperty(MessagingListInstance,"countries",{get:function countries(){if(!this._countries){this._countries=new s(this._version)}return this._countries}});MessagingListInstance.toJSON=function toJSON(){return this._solution};MessagingListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return MessagingListInstance};a=function MessagingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};n.extend(a.prototype,r.prototype);a.prototype.constructor=a;a.prototype.getInstance=function getInstance(t){return new u(this._version,t)};a.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};a.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};u=function MessagingInstance(t,e){this._version=t;this.name=e.name;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={}};u.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};u.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};t.exports={MessagingList:c,MessagingPage:a,MessagingInstance:u}},61788:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function CountryList(t){function CountryListInstance(t){return CountryListInstance.get(t)}CountryListInstance._version=t;CountryListInstance._solution={};CountryListInstance._uri=`/Messaging/Countries`;CountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.get=function get(t){return new f(this._version,t)};CountryListInstance.toJSON=function toJSON(){return this._solution};CountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CountryListInstance};u=function CountryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function CountryInstance(t,e,i){this._version=t;this.country=e.country;this.isoCountry=e.iso_country;this.outboundSmsPrices=e.outbound_sms_prices;this.inboundSmsPrices=e.inbound_sms_prices;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={isoCountry:i||this.isoCountry}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.isoCountry)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CountryContext(t,e){this._version=t;this._solution={isoCountry:e};this._uri=`/Messaging/Countries/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.isoCountry))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CountryList:a,CountryPage:u,CountryInstance:h,CountryContext:f}},23755:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(939).CountryList;var r=i(60938);var c;var a;var u;c=function PhoneNumberList(t){function PhoneNumberListInstance(t){return PhoneNumberListInstance.get(t)}PhoneNumberListInstance._version=t;PhoneNumberListInstance._solution={};PhoneNumberListInstance._countries=undefined;Object.defineProperty(PhoneNumberListInstance,"countries",{get:function countries(){if(!this._countries){this._countries=new s(this._version)}return this._countries}});PhoneNumberListInstance.toJSON=function toJSON(){return this._solution};PhoneNumberListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return PhoneNumberListInstance};a=function PhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};n.extend(a.prototype,r.prototype);a.prototype.constructor=a;a.prototype.getInstance=function getInstance(t){return new u(this._version,t)};a.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};a.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};u=function PhoneNumberInstance(t,e){this._version=t;this.name=e.name;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={}};u.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};u.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};t.exports={PhoneNumberList:c,PhoneNumberPage:a,PhoneNumberInstance:u}},939:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function CountryList(t){function CountryListInstance(t){return CountryListInstance.get(t)}CountryListInstance._version=t;CountryListInstance._solution={};CountryListInstance._uri=`/PhoneNumbers/Countries`;CountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.get=function get(t){return new f(this._version,t)};CountryListInstance.toJSON=function toJSON(){return this._solution};CountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CountryListInstance};u=function CountryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function CountryInstance(t,e,i){this._version=t;this.country=e.country;this.isoCountry=e.iso_country;this.phoneNumberPrices=e.phone_number_prices;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={isoCountry:i||this.isoCountry}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.isoCountry)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CountryContext(t,e){this._version=t;this._solution={isoCountry:e};this._uri=`/PhoneNumbers/Countries/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.isoCountry))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CountryList:a,CountryPage:u,CountryInstance:h,CountryContext:f}},43878:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(35533).CountryList;var r=i(24475).NumberList;var c=i(60938);var a;var u;var h;a=function VoiceList(t){function VoiceListInstance(t){return VoiceListInstance.get(t)}VoiceListInstance._version=t;VoiceListInstance._solution={};VoiceListInstance._numbers=undefined;VoiceListInstance._countries=undefined;Object.defineProperty(VoiceListInstance,"numbers",{get:function numbers(){if(!this._numbers){this._numbers=new r(this._version)}return this._numbers}});Object.defineProperty(VoiceListInstance,"countries",{get:function countries(){if(!this._countries){this._countries=new s(this._version)}return this._countries}});VoiceListInstance.toJSON=function toJSON(){return this._solution};VoiceListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return VoiceListInstance};u=function VoicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};n.extend(u.prototype,c.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};u.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};h=function VoiceInstance(t,e){this._version=t;this.name=e.name;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={}};h.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};h.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};t.exports={VoiceList:a,VoicePage:u,VoiceInstance:h}},35533:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function CountryList(t){function CountryListInstance(t){return CountryListInstance.get(t)}CountryListInstance._version=t;CountryListInstance._solution={};CountryListInstance._uri=`/Voice/Countries`;CountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.get=function get(t){return new f(this._version,t)};CountryListInstance.toJSON=function toJSON(){return this._solution};CountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CountryListInstance};u=function CountryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function CountryInstance(t,e,i){this._version=t;this.country=e.country;this.isoCountry=e.iso_country;this.outboundPrefixPrices=e.outbound_prefix_prices;this.inboundCallPrices=e.inbound_call_prices;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={isoCountry:i||this.isoCountry}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.isoCountry)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CountryContext(t,e){this._version=t;this._solution={isoCountry:e};this._uri=`/Voice/Countries/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.isoCountry))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CountryList:a,CountryPage:u,CountryInstance:h,CountryContext:f}},24475:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function NumberList(t){function NumberListInstance(t){return NumberListInstance.get(t)}NumberListInstance._version=t;NumberListInstance._solution={};NumberListInstance.get=function get(t){return new f(this._version,t)};NumberListInstance.toJSON=function toJSON(){return this._solution};NumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NumberListInstance};u=function NumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function NumberInstance(t,e,i){this._version=t;this.number=e.number;this.country=e.country;this.isoCountry=e.iso_country;this.outboundCallPrice=e.outbound_call_price;this.inboundCallPrice=e.inbound_call_price;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={number:i||this.number}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.number)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NumberContext(t,e){this._version=t;this._solution={number:e};this._uri=`/Voice/Numbers/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.number))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NumberList:a,NumberPage:u,NumberInstance:h,NumberContext:f}},55726:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(37100).CountryList;var r=i(83009).NumberList;var c=i(60938);var a;var u;var h;a=function VoiceList(t){function VoiceListInstance(t){return VoiceListInstance.get(t)}VoiceListInstance._version=t;VoiceListInstance._solution={};VoiceListInstance._countries=undefined;VoiceListInstance._numbers=undefined;Object.defineProperty(VoiceListInstance,"countries",{get:function countries(){if(!this._countries){this._countries=new s(this._version)}return this._countries}});Object.defineProperty(VoiceListInstance,"numbers",{get:function numbers(){if(!this._numbers){this._numbers=new r(this._version)}return this._numbers}});VoiceListInstance.toJSON=function toJSON(){return this._solution};VoiceListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return VoiceListInstance};u=function VoicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};n.extend(u.prototype,c.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};u.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};h=function VoiceInstance(t,e){this._version=t;this.name=e.name;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={}};h.prototype.toJSON=function toJSON(){let t={};n.forOwn(this,function(e,i){if(!n.startsWith(i,"_")&&!n.isFunction(e)){t[i]=e}});return t};h.prototype[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};t.exports={VoiceList:a,VoicePage:u,VoiceInstance:h}},37100:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function CountryList(t){function CountryListInstance(t){return CountryListInstance.get(t)}CountryListInstance._version=t;CountryListInstance._solution={};CountryListInstance._uri=`/Voice/Countries`;CountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.get=function get(t){return new f(this._version,t)};CountryListInstance.toJSON=function toJSON(){return this._solution};CountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CountryListInstance};u=function CountryPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function CountryInstance(t,e,i){this._version=t;this.country=e.country;this.isoCountry=e.iso_country;this.outboundPrefixPrices=e.outbound_prefix_prices;this.inboundCallPrices=e.inbound_call_prices;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={isoCountry:i||this.isoCountry}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.isoCountry)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CountryContext(t,e){this._version=t;this._solution={isoCountry:e};this._uri=`/Voice/Countries/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.isoCountry))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CountryList:a,CountryPage:u,CountryInstance:h,CountryContext:f}},83009:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function NumberList(t){function NumberListInstance(t){return NumberListInstance.get(t)}NumberListInstance._version=t;NumberListInstance._solution={};NumberListInstance.get=function get(t){return new f(this._version,t)};NumberListInstance.toJSON=function toJSON(){return this._solution};NumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NumberListInstance};u=function NumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function NumberInstance(t,e,i){this._version=t;this.destinationNumber=e.destination_number;this.originationNumber=e.origination_number;this.country=e.country;this.isoCountry=e.iso_country;this.outboundCallPrices=e.outbound_call_prices;this.inboundCallPrice=e.inbound_call_price;this.priceUnit=e.price_unit;this.url=e.url;this._context=undefined;this._solution={destinationNumber:i||this.destinationNumber}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.destinationNumber)}return this._context}});h.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NumberContext(t,e){this._version=t;this._solution={destinationNumber:e};this._uri=`/Voice/Numbers/${e}`};f.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({OriginationNumber:o.get(t,"originationNumber")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution.destinationNumber))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NumberList:a,NumberPage:u,NumberInstance:h,NumberContext:f}},3986:(t,e,i)=>{"use strict";var n=i(90250);var o=i(44606).ServiceList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._services=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new o(this);return this._services}});t.exports=V1},44606:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(70694).PhoneNumberList;var a=i(1232).SessionList;var u=i(16320).ShortCodeList;var h=i(80513);var f=i(72142);var p;var d;var l;var v;p=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=f.of({UniqueName:o.get(t,"uniqueName"),DefaultTtl:o.get(t,"defaultTtl"),CallbackUrl:o.get(t,"callbackUrl"),GeoMatchLevel:o.get(t,"geoMatchLevel"),NumberSelectionBehavior:o.get(t,"numberSelectionBehavior"),InterceptCallbackUrl:o.get(t,"interceptCallbackUrl"),OutOfSessionCallbackUrl:o.get(t,"outOfSessionCallbackUrl"),ChatInstanceSid:o.get(t,"chatInstanceSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new v(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};d=function ServicePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,r.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.chatInstanceSid=e.chat_instance_sid;this.callbackUrl=e.callback_url;this.defaultTtl=h.integer(e.default_ttl);this.numberSelectionBehavior=e.number_selection_behavior;this.geoMatchLevel=e.geo_match_level;this.interceptCallbackUrl=e.intercept_callback_url;this.outOfSessionCallbackUrl=e.out_of_session_callback_url;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.sessions=function sessions(){return this._proxy.sessions};l.prototype.phoneNumbers=function phoneNumbers(){return this._proxy.phoneNumbers};l.prototype.shortCodes=function shortCodes(){return this._proxy.shortCodes};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._sessions=undefined;this._phoneNumbers=undefined;this._shortCodes=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({UniqueName:o.get(t,"uniqueName"),DefaultTtl:o.get(t,"defaultTtl"),CallbackUrl:o.get(t,"callbackUrl"),GeoMatchLevel:o.get(t,"geoMatchLevel"),NumberSelectionBehavior:o.get(t,"numberSelectionBehavior"),InterceptCallbackUrl:o.get(t,"interceptCallbackUrl"),OutOfSessionCallbackUrl:o.get(t,"outOfSessionCallbackUrl"),ChatInstanceSid:o.get(t,"chatInstanceSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"sessions",{get:function(){if(!this._sessions){this._sessions=new a(this._version,this._solution.sid)}return this._sessions}});Object.defineProperty(v.prototype,"phoneNumbers",{get:function(){if(!this._phoneNumbers){this._phoneNumbers=new c(this._version,this._solution.sid)}return this._phoneNumbers}});Object.defineProperty(v.prototype,"shortCodes",{get:function(){if(!this._shortCodes){this._shortCodes=new u(this._version,this._solution.sid)}return this._shortCodes}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:p,ServicePage:d,ServiceInstance:l,ServiceContext:v}},70694:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function PhoneNumberList(t,e){function PhoneNumberListInstance(t){return PhoneNumberListInstance.get(t)}PhoneNumberListInstance._version=t;PhoneNumberListInstance._solution={serviceSid:e};PhoneNumberListInstance._uri=`/Services/${e}/PhoneNumbers`;PhoneNumberListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Sid:o.get(t,"sid"),PhoneNumber:o.get(t,"phoneNumber"),IsReserved:a.bool(o.get(t,"isReserved"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PhoneNumberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PhoneNumberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};PhoneNumberListInstance.toJSON=function toJSON(){return this._solution};PhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PhoneNumberListInstance};f=function PhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PhoneNumberInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.phoneNumber=e.phone_number;this.friendlyName=e.friendly_name;this.isoCountry=e.iso_country;this.capabilities=e.capabilities;this.url=e.url;this.isReserved=e.is_reserved;this.inUse=c.integer(e.in_use);this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function PhoneNumberContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/PhoneNumbers/${i}`};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({IsReserved:a.bool(o.get(t,"isReserved"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PhoneNumberList:h,PhoneNumberPage:f,PhoneNumberInstance:p,PhoneNumberContext:d}},1232:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(887).InteractionList;var c=i(60938);var a=i(32630).ParticipantList;var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function SessionList(t,e){function SessionListInstance(t){return SessionListInstance.get(t)}SessionListInstance._version=t;SessionListInstance._solution={serviceSid:e};SessionListInstance._uri=`/Services/${e}/Sessions`;SessionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SessionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SessionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SessionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SessionListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({UniqueName:o.get(t,"uniqueName"),DateExpiry:h.iso8601DateTime(o.get(t,"dateExpiry")),Ttl:o.get(t,"ttl"),Mode:o.get(t,"mode"),Status:o.get(t,"status"),Participants:h.map(o.get(t,"participants"),function(t){return h.object(t)}),FailOnParticipantConflict:h.bool(o.get(t,"failOnParticipantConflict"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SessionListInstance.get=function get(t){return new v(this._version,this._solution.serviceSid,t)};SessionListInstance.toJSON=function toJSON(){return this._solution};SessionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SessionListInstance};d=function SessionPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,c.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.serviceSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SessionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.dateStarted=u.iso8601DateTime(e.date_started);this.dateEnded=u.iso8601DateTime(e.date_ended);this.dateLastInteraction=u.iso8601DateTime(e.date_last_interaction);this.dateExpiry=u.iso8601DateTime(e.date_expiry);this.uniqueName=e.unique_name;this.status=e.status;this.closedReason=e.closed_reason;this.ttl=u.integer(e.ttl);this.mode=e.mode;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.interactions=function interactions(){return this._proxy.interactions};l.prototype.participants=function participants(){return this._proxy.participants};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function SessionContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Sessions/${i}`;this._interactions=undefined;this._participants=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({DateExpiry:h.iso8601DateTime(o.get(t,"dateExpiry")),Ttl:o.get(t,"ttl"),Status:o.get(t,"status"),FailOnParticipantConflict:h.bool(o.get(t,"failOnParticipantConflict"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"interactions",{get:function(){if(!this._interactions){this._interactions=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._interactions}});Object.defineProperty(v.prototype,"participants",{get:function(){if(!this._participants){this._participants=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._participants}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SessionList:p,SessionPage:d,SessionInstance:l,SessionContext:v}},887:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function InteractionList(t,e,i){function InteractionListInstance(t){return InteractionListInstance.get(t)}InteractionListInstance._version=t;InteractionListInstance._solution={serviceSid:e,sessionSid:i};InteractionListInstance._uri=`/Services/${e}/Sessions/${i}/Interactions`;InteractionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};InteractionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};InteractionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InteractionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};InteractionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.sessionSid,t)};InteractionListInstance.toJSON=function toJSON(){return this._solution};InteractionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return InteractionListInstance};h=function InteractionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.sessionSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function InteractionInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.sessionSid=e.session_sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.data=e.data;this.type=e.type;this.inboundParticipantSid=e.inbound_participant_sid;this.inboundResourceSid=e.inbound_resource_sid;this.inboundResourceStatus=e.inbound_resource_status;this.inboundResourceType=e.inbound_resource_type;this.inboundResourceUrl=e.inbound_resource_url;this.outboundParticipantSid=e.outbound_participant_sid;this.outboundResourceSid=e.outbound_resource_sid;this.outboundResourceStatus=e.outbound_resource_status;this.outboundResourceType=e.outbound_resource_type;this.outboundResourceUrl=e.outbound_resource_url;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sessionSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function InteractionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,sessionSid:i,sid:n};this._uri=`/Services/${e}/Sessions/${i}/Interactions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={InteractionList:u,InteractionPage:h,InteractionInstance:f,InteractionContext:p}},32630:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(98550).MessageInteractionList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function ParticipantList(t,e,i){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={serviceSid:e,sessionSid:i};ParticipantListInstance._uri=`/Services/${e}/Sessions/${i}/Participants`;ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identifier)){throw new Error('Required parameter "opts.identifier" missing.')}var i=n.defer();var s=h.of({Identifier:o.get(t,"identifier"),FriendlyName:o.get(t,"friendlyName"),ProxyIdentifier:o.get(t,"proxyIdentifier"),ProxyIdentifierSid:o.get(t,"proxyIdentifierSid"),FailOnParticipantConflict:u.bool(o.get(t,"failOnParticipantConflict"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,this._solution.sessionSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};p=function ParticipantPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid,this._solution.sessionSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ParticipantInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.sessionSid=e.session_sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.identifier=e.identifier;this.proxyIdentifier=e.proxy_identifier;this.proxyIdentifierSid=e.proxy_identifier_sid;this.dateDeleted=a.iso8601DateTime(e.date_deleted);this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sessionSid:n,sid:o||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.messageInteractions=function messageInteractions(){return this._proxy.messageInteractions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ParticipantContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,sessionSid:i,sid:n};this._uri=`/Services/${e}/Sessions/${i}/Participants/${n}`;this._messageInteractions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"messageInteractions",{get:function(){if(!this._messageInteractions){this._messageInteractions=new r(this._version,this._solution.serviceSid,this._solution.sessionSid,this._solution.sid)}return this._messageInteractions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:f,ParticipantPage:p,ParticipantInstance:d,ParticipantContext:l}},98550:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function MessageInteractionList(t,e,i,r){function MessageInteractionListInstance(t){return MessageInteractionListInstance.get(t)}MessageInteractionListInstance._version=t;MessageInteractionListInstance._solution={serviceSid:e,sessionSid:i,participantSid:r};MessageInteractionListInstance._uri=`/Services/${e}/Sessions/${i}/Participants/${r}/MessageInteractions`;MessageInteractionListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Body:o.get(t,"body"),MediaUrl:a.map(o.get(t,"mediaUrl"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.participantSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageInteractionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessageInteractionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessageInteractionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageInteractionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessageInteractionListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.sessionSid,this._solution.participantSid,t)};MessageInteractionListInstance.toJSON=function toJSON(){return this._solution};MessageInteractionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessageInteractionListInstance};f=function MessageInteractionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.participantSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessageInteractionInstance(t,e,i,n,o,s){this._version=t;this.sid=e.sid;this.sessionSid=e.session_sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.data=e.data;this.type=e.type;this.participantSid=e.participant_sid;this.inboundParticipantSid=e.inbound_participant_sid;this.inboundResourceSid=e.inbound_resource_sid;this.inboundResourceStatus=e.inbound_resource_status;this.inboundResourceType=e.inbound_resource_type;this.inboundResourceUrl=e.inbound_resource_url;this.outboundParticipantSid=e.outbound_participant_sid;this.outboundResourceSid=e.outbound_resource_sid;this.outboundResourceStatus=e.outbound_resource_status;this.outboundResourceType=e.outbound_resource_type;this.outboundResourceUrl=e.outbound_resource_url;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sessionSid:n,participantSid:o,sid:s||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sessionSid,this._solution.participantSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function MessageInteractionContext(t,e,i,n,o){this._version=t;this._solution={serviceSid:e,sessionSid:i,participantSid:n,sid:o};this._uri=`/Services/${e}/Sessions/${i}/Participants/${n}/MessageInteractions/${o}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sessionSid,this._solution.participantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessageInteractionList:h,MessageInteractionPage:f,MessageInteractionInstance:p,MessageInteractionContext:d}},16320:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ShortCodeList(t,e){function ShortCodeListInstance(t){return ShortCodeListInstance.get(t)}ShortCodeListInstance._version=t;ShortCodeListInstance._solution={serviceSid:e};ShortCodeListInstance._uri=`/Services/${e}/ShortCodes`;ShortCodeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.sid)){throw new Error('Required parameter "opts.sid" missing.')}var i=n.defer();var s=u.of({Sid:o.get(t,"sid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ShortCodeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ShortCodeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ShortCodeListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};ShortCodeListInstance.toJSON=function toJSON(){return this._solution};ShortCodeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ShortCodeListInstance};f=function ShortCodePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ShortCodeInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.shortCode=e.short_code;this.isoCountry=e.iso_country;this.capabilities=e.capabilities;this.url=e.url;this.isReserved=e.is_reserved;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ShortCodeContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/ShortCodes/${i}`};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({IsReserved:a.bool(o.get(t,"isReserved"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ShortCodeList:h,ShortCodePage:f,ShortCodeInstance:p,ShortCodeContext:d}},98995:(t,e,i)=>{"use strict";var n=i(90250);var o=i(39178).ServiceList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._services=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new o(this);return this._services}});t.exports=V1},39178:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(66898).AssetList;var c=i(7439).BuildList;var a=i(83150).EnvironmentList;var u=i(12904).FunctionList;var h=i(60938);var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=d.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),IncludeCredentials:p.bool(o.get(t,"includeCredentials")),UiEditable:p.bool(o.get(t,"uiEditable"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new _(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};v=function ServicePage(t,e,i){this._solution=i;h.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,h.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.uniqueName=e.unique_name;this.includeCredentials=e.include_credentials;this.uiEditable=e.ui_editable;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.environments=function environments(){return this._proxy.environments};m.prototype.functions=function functions(){return this._proxy.functions};m.prototype.assets=function assets(){return this._proxy.assets};m.prototype.builds=function builds(){return this._proxy.builds};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._environments=undefined;this._functions=undefined;this._assets=undefined;this._builds=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({IncludeCredentials:p.bool(o.get(t,"includeCredentials")),FriendlyName:o.get(t,"friendlyName"),UiEditable:p.bool(o.get(t,"uiEditable"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"environments",{get:function(){if(!this._environments){this._environments=new a(this._version,this._solution.sid)}return this._environments}});Object.defineProperty(_.prototype,"functions",{get:function(){if(!this._functions){this._functions=new u(this._version,this._solution.sid)}return this._functions}});Object.defineProperty(_.prototype,"assets",{get:function(){if(!this._assets){this._assets=new r(this._version,this._solution.sid)}return this._assets}});Object.defineProperty(_.prototype,"builds",{get:function(){if(!this._builds){this._builds=new c(this._version,this._solution.sid)}return this._builds}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:l,ServicePage:v,ServiceInstance:m,ServiceContext:_}},66898:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(39157).AssetVersionList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function AssetList(t,e){function AssetListInstance(t){return AssetListInstance.get(t)}AssetListInstance._version=t;AssetListInstance._solution={serviceSid:e};AssetListInstance._uri=`/Services/${e}/Assets`;AssetListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssetListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssetListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssetListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssetListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssetListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};AssetListInstance.toJSON=function toJSON(){return this._solution};AssetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssetListInstance};f=function AssetPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AssetInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.assetVersions=function assetVersions(){return this._proxy.assetVersions};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function AssetContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Assets/${i}`;this._assetVersions=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"assetVersions",{get:function(){if(!this._assetVersions){this._assetVersions=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._assetVersions}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssetList:h,AssetPage:f,AssetInstance:p,AssetContext:d}},39157:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function AssetVersionList(t,e,i){function AssetVersionListInstance(t){return AssetVersionListInstance.get(t)}AssetVersionListInstance._version=t;AssetVersionListInstance._solution={serviceSid:e,assetSid:i};AssetVersionListInstance._uri=`/Services/${e}/Assets/${i}/Versions`;AssetVersionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};AssetVersionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};AssetVersionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssetVersionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AssetVersionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.assetSid,t)};AssetVersionListInstance.toJSON=function toJSON(){return this._solution};AssetVersionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AssetVersionListInstance};h=function AssetVersionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.assetSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function AssetVersionInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.assetSid=e.asset_sid;this.path=e.path;this.visibility=e.visibility;this.dateCreated=c.iso8601DateTime(e.date_created);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,assetSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.assetSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function AssetVersionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,assetSid:i,sid:n};this._uri=`/Services/${e}/Assets/${i}/Versions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.assetSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AssetVersionList:u,AssetVersionPage:h,AssetVersionInstance:f,AssetVersionContext:p}},7439:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(13455).BuildStatusList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function BuildList(t,e){function BuildListInstance(t){return BuildListInstance.get(t)}BuildListInstance._version=t;BuildListInstance._solution={serviceSid:e};BuildListInstance._uri=`/Services/${e}/Builds`;BuildListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BuildListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BuildListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BuildListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BuildListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({AssetVersions:u.map(o.get(t,"assetVersions"),function(t){return t}),FunctionVersions:u.map(o.get(t,"functionVersions"),function(t){return t}),Dependencies:o.get(t,"dependencies")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BuildListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};BuildListInstance.toJSON=function toJSON(){return this._solution};BuildListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BuildListInstance};p=function BuildPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function BuildInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.status=e.status;this.assetVersions=e.asset_versions;this.functionVersions=e.function_versions;this.dependencies=e.dependencies;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.buildStatus=function buildStatus(){return this._proxy.buildStatus};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function BuildContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Builds/${i}`;this._buildStatus=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"buildStatus",{get:function(){if(!this._buildStatus){this._buildStatus=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._buildStatus}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BuildList:f,BuildPage:p,BuildInstance:d,BuildContext:l}},13455:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function BuildStatusList(t,e,i){function BuildStatusListInstance(t){return BuildStatusListInstance.get(t)}BuildStatusListInstance._version=t;BuildStatusListInstance._solution={serviceSid:e,sid:i};BuildStatusListInstance.get=function get(){return new f(this._version,this._solution.serviceSid,this._solution.sid)};BuildStatusListInstance.toJSON=function toJSON(){return this._solution};BuildStatusListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BuildStatusListInstance};u=function BuildStatusPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.serviceSid,this._solution.sid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function BuildStatusInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.status=e.status;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function BuildStatusContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Builds/${i}/Status`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BuildStatusList:a,BuildStatusPage:u,BuildStatusInstance:h,BuildStatusContext:f}},83150:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(31897).DeploymentList;var c=i(64772).LogList;var a=i(60938);var u=i(6554).VariableList;var h=i(80513);var f=i(72142);var p;var d;var l;var v;p=function EnvironmentList(t,e){function EnvironmentListInstance(t){return EnvironmentListInstance.get(t)}EnvironmentListInstance._version=t;EnvironmentListInstance._solution={serviceSid:e};EnvironmentListInstance._uri=`/Services/${e}/Environments`;EnvironmentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EnvironmentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EnvironmentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EnvironmentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EnvironmentListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=f.of({UniqueName:o.get(t,"uniqueName"),DomainSuffix:o.get(t,"domainSuffix")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EnvironmentListInstance.get=function get(t){return new v(this._version,this._solution.serviceSid,t)};EnvironmentListInstance.toJSON=function toJSON(){return this._solution};EnvironmentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EnvironmentListInstance};d=function EnvironmentPage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,a.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.serviceSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function EnvironmentInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.buildSid=e.build_sid;this.uniqueName=e.unique_name;this.domainSuffix=e.domain_suffix;this.domainName=e.domain_name;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.variables=function variables(){return this._proxy.variables};l.prototype.deployments=function deployments(){return this._proxy.deployments};l.prototype.logs=function logs(){return this._proxy.logs};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function EnvironmentContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Environments/${i}`;this._variables=undefined;this._deployments=undefined;this._logs=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(v.prototype,"variables",{get:function(){if(!this._variables){this._variables=new u(this._version,this._solution.serviceSid,this._solution.sid)}return this._variables}});Object.defineProperty(v.prototype,"deployments",{get:function(){if(!this._deployments){this._deployments=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._deployments}});Object.defineProperty(v.prototype,"logs",{get:function(){if(!this._logs){this._logs=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._logs}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EnvironmentList:p,EnvironmentPage:d,EnvironmentInstance:l,EnvironmentContext:v}},31897:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function DeploymentList(t,e,i){function DeploymentListInstance(t){return DeploymentListInstance.get(t)}DeploymentListInstance._version=t;DeploymentListInstance._solution={serviceSid:e,environmentSid:i};DeploymentListInstance._uri=`/Services/${e}/Environments/${i}/Deployments`;DeploymentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DeploymentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DeploymentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({BuildSid:o.get(t,"buildSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DeploymentListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.environmentSid,t)};DeploymentListInstance.toJSON=function toJSON(){return this._solution};DeploymentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DeploymentListInstance};h=function DeploymentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DeploymentInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.environmentSid=e.environment_sid;this.buildSid=e.build_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,environmentSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DeploymentContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,environmentSid:i,sid:n};this._uri=`/Services/${e}/Environments/${i}/Deployments/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DeploymentList:u,DeploymentPage:h,DeploymentInstance:f,DeploymentContext:p}},64772:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function LogList(t,e,i){function LogListInstance(t){return LogListInstance.get(t)}LogListInstance._version=t;LogListInstance._solution={serviceSid:e,environmentSid:i};LogListInstance._uri=`/Services/${e}/Environments/${i}/Logs`;LogListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};LogListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};LogListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FunctionSid:o.get(t,"functionSid"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),EndDate:a.iso8601DateTime(o.get(t,"endDate")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LogListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};LogListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.environmentSid,t)};LogListInstance.toJSON=function toJSON(){return this._solution};LogListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return LogListInstance};f=function LogPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.environmentSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function LogInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.environmentSid=e.environment_sid;this.buildSid=e.build_sid;this.deploymentSid=e.deployment_sid;this.functionSid=e.function_sid;this.requestSid=e.request_sid;this.level=e.level;this.message=e.message;this.dateCreated=c.iso8601DateTime(e.date_created);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,environmentSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function LogContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,environmentSid:i,sid:n};this._uri=`/Services/${e}/Environments/${i}/Logs/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={LogList:h,LogPage:f,LogInstance:p,LogContext:d}},6554:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function VariableList(t,e,i){function VariableListInstance(t){return VariableListInstance.get(t)}VariableListInstance._version=t;VariableListInstance._solution={serviceSid:e,environmentSid:i};VariableListInstance._uri=`/Services/${e}/Environments/${i}/Variables`;VariableListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};VariableListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};VariableListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VariableListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VariableListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.key)){throw new Error('Required parameter "opts.key" missing.')}if(o.isUndefined(t.value)){throw new Error('Required parameter "opts.value" missing.')}var i=n.defer();var s=a.of({Key:o.get(t,"key"),Value:o.get(t,"value")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VariableListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.environmentSid,t)};VariableListInstance.toJSON=function toJSON(){return this._solution};VariableListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return VariableListInstance};h=function VariablePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function VariableInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.environmentSid=e.environment_sid;this.key=e.key;this.value=e.value;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,environmentSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function VariableContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,environmentSid:i,sid:n};this._uri=`/Services/${e}/Environments/${i}/Variables/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Key:o.get(t,"key"),Value:o.get(t,"value")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.environmentSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={VariableList:u,VariablePage:h,VariableInstance:f,VariableContext:p}},12904:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(19215).FunctionVersionList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function FunctionList(t,e){function FunctionListInstance(t){return FunctionListInstance.get(t)}FunctionListInstance._version=t;FunctionListInstance._solution={serviceSid:e};FunctionListInstance._uri=`/Services/${e}/Functions`;FunctionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FunctionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FunctionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FunctionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FunctionListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FunctionListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};FunctionListInstance.toJSON=function toJSON(){return this._solution};FunctionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FunctionListInstance};f=function FunctionPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FunctionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.friendlyName=e.friendly_name;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.functionVersions=function functionVersions(){return this._proxy.functionVersions};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FunctionContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Functions/${i}`;this._functionVersions=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"functionVersions",{get:function(){if(!this._functionVersions){this._functionVersions=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._functionVersions}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FunctionList:h,FunctionPage:f,FunctionInstance:p,FunctionContext:d}},19215:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(42926).FunctionVersionContentList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function FunctionVersionList(t,e,i){function FunctionVersionListInstance(t){return FunctionVersionListInstance.get(t)}FunctionVersionListInstance._version=t;FunctionVersionListInstance._solution={serviceSid:e,functionSid:i};FunctionVersionListInstance._uri=`/Services/${e}/Functions/${i}/Versions`;FunctionVersionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FunctionVersionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FunctionVersionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FunctionVersionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FunctionVersionListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.functionSid,t)};FunctionVersionListInstance.toJSON=function toJSON(){return this._solution};FunctionVersionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FunctionVersionListInstance};f=function FunctionVersionPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.functionSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FunctionVersionInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.functionSid=e.function_sid;this.path=e.path;this.visibility=e.visibility;this.dateCreated=a.iso8601DateTime(e.date_created);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,functionSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.functionSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.functionVersionContent=function functionVersionContent(){return this._proxy.functionVersionContent};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FunctionVersionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,functionSid:i,sid:n};this._uri=`/Services/${e}/Functions/${i}/Versions/${n}`;this._functionVersionContent=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.functionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"functionVersionContent",{get:function(){if(!this._functionVersionContent){this._functionVersionContent=new r(this._version,this._solution.serviceSid,this._solution.functionSid,this._solution.sid)}return this._functionVersionContent}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FunctionVersionList:h,FunctionVersionPage:f,FunctionVersionInstance:p,FunctionVersionContext:d}},42926:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function FunctionVersionContentList(t,e,i,n){function FunctionVersionContentListInstance(t){return FunctionVersionContentListInstance.get(t)}FunctionVersionContentListInstance._version=t;FunctionVersionContentListInstance._solution={serviceSid:e,functionSid:i,sid:n};FunctionVersionContentListInstance.get=function get(){return new f(this._version,this._solution.serviceSid,this._solution.functionSid,this._solution.sid)};FunctionVersionContentListInstance.toJSON=function toJSON(){return this._solution};FunctionVersionContentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FunctionVersionContentListInstance};u=function FunctionVersionContentPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.serviceSid,this._solution.functionSid,this._solution.sid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function FunctionVersionContentInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.functionSid=e.function_sid;this.content=e.content;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,functionSid:n,sid:o}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.serviceSid,this._solution.functionSid,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FunctionVersionContentContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,functionSid:i,sid:n};this._uri=`/Services/${e}/Functions/${i}/Versions/${n}/Content`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.serviceSid,this._solution.functionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FunctionVersionContentList:a,FunctionVersionContentPage:u,FunctionVersionContentInstance:h,FunctionVersionContentContext:f}},67727:(t,e,i)=>{"use strict";var n=i(90250);var o=i(29549).FlowList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._flows=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"flows",{get:function(){this._flows=this._flows||new o(this);return this._flows}});t.exports=V1},81292:(t,e,i)=>{"use strict";var n=i(90250);var o=i(73635).FlowList;var s=i(75398).FlowValidateList;var r=i(64351);function V2(t){r.prototype.constructor.call(this,t,"v2");this._flows=undefined;this._flowValidate=undefined}n.extend(V2.prototype,r.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"flows",{get:function(){this._flows=this._flows||new o(this);return this._flows}});Object.defineProperty(V2.prototype,"flowValidate",{get:function(){this._flowValidate=this._flowValidate||new s(this);return this._flowValidate}});t.exports=V2},29549:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(21790).EngagementList;var c=i(42890).ExecutionList;var a=i(60938);var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function FlowList(t){function FlowListInstance(t){return FlowListInstance.get(t)}FlowListInstance._version=t;FlowListInstance._solution={};FlowListInstance._uri=`/Flows`;FlowListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FlowListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FlowListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowListInstance.get=function get(t){return new l(this._version,t)};FlowListInstance.toJSON=function toJSON(){return this._solution};FlowListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlowListInstance};p=function FlowPage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,a.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FlowInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.status=e.status;this.version=u.integer(e.version);this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.engagements=function engagements(){return this._proxy.engagements};d.prototype.executions=function executions(){return this._proxy.executions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function FlowContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Flows/${e}`;this._engagements=undefined;this._executions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"engagements",{get:function(){if(!this._engagements){this._engagements=new r(this._version,this._solution.sid)}return this._engagements}});Object.defineProperty(l.prototype,"executions",{get:function(){if(!this._executions){this._executions=new c(this._version,this._solution.sid)}return this._executions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlowList:f,FlowPage:p,FlowInstance:d,FlowContext:l}},21790:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(83312).EngagementContextList;var c=i(60938);var a=i(59167).StepList;var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function EngagementList(t,e){function EngagementListInstance(t){return EngagementListInstance.get(t)}EngagementListInstance._version=t;EngagementListInstance._solution={flowSid:e};EngagementListInstance._uri=`/Flows/${e}/Engagements`;EngagementListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EngagementListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EngagementListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EngagementListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EngagementListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.from)){throw new Error('Required parameter "opts.from" missing.')}var i=n.defer();var s=f.of({To:o.get(t,"to"),From:o.get(t,"from"),Parameters:h.object(o.get(t,"parameters"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EngagementListInstance.get=function get(t){return new v(this._version,this._solution.flowSid,t)};EngagementListInstance.toJSON=function toJSON(){return this._solution};EngagementListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EngagementListInstance};d=function EngagementPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,c.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.flowSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function EngagementInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.contactSid=e.contact_sid;this.contactChannelAddress=e.contact_channel_address;this.context=e.context;this.status=e.status;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.flowSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.steps=function steps(){return this._proxy.steps};l.prototype.engagementContext=function engagementContext(){return this._proxy.engagementContext};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function EngagementContext(t,e,i){this._version=t;this._solution={flowSid:e,sid:i};this._uri=`/Flows/${e}/Engagements/${i}`;this._steps=undefined;this._engagementContext=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(v.prototype,"steps",{get:function(){if(!this._steps){this._steps=new a(this._version,this._solution.flowSid,this._solution.sid)}return this._steps}});Object.defineProperty(v.prototype,"engagementContext",{get:function(){if(!this._engagementContext){this._engagementContext=new r(this._version,this._solution.flowSid,this._solution.sid)}return this._engagementContext}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EngagementList:p,EngagementPage:d,EngagementInstance:l,EngagementContext:v}},83312:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function EngagementContextList(t,e,i){function EngagementContextListInstance(t){return EngagementContextListInstance.get(t)}EngagementContextListInstance._version=t;EngagementContextListInstance._solution={flowSid:e,engagementSid:i};EngagementContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.engagementSid)};EngagementContextListInstance.toJSON=function toJSON(){return this._solution};EngagementContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EngagementContextListInstance};u=function EngagementContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.engagementSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function EngagementContextInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.engagementSid=e.engagement_sid;this.flowSid=e.flow_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,engagementSid:n}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.engagementSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function EngagementContextContext(t,e,i){this._version=t;this._solution={flowSid:e,engagementSid:i};this._uri=`/Flows/${e}/Engagements/${i}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.engagementSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EngagementContextList:a,EngagementContextPage:u,EngagementContextInstance:h,EngagementContextContext:f}},59167:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(40056).StepContextList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function StepList(t,e,i){function StepListInstance(t){return StepListInstance.get(t)}StepListInstance._version=t;StepListInstance._solution={flowSid:e,engagementSid:i};StepListInstance._uri=`/Flows/${e}/Engagements/${i}/Steps`;StepListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};StepListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};StepListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};StepListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};StepListInstance.get=function get(t){return new d(this._version,this._solution.flowSid,this._solution.engagementSid,t)};StepListInstance.toJSON=function toJSON(){return this._solution};StepListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return StepListInstance};f=function StepPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.flowSid,this._solution.engagementSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function StepInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.engagementSid=e.engagement_sid;this.name=e.name;this.context=e.context;this.transitionedFrom=e.transitioned_from;this.transitionedTo=e.transitioned_to;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,engagementSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.flowSid,this._solution.engagementSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.stepContext=function stepContext(){return this._proxy.stepContext};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function StepContext(t,e,i,n){this._version=t;this._solution={flowSid:e,engagementSid:i,sid:n};this._uri=`/Flows/${e}/Engagements/${i}/Steps/${n}`;this._stepContext=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.flowSid,this._solution.engagementSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"stepContext",{get:function(){if(!this._stepContext){this._stepContext=new c(this._version,this._solution.flowSid,this._solution.engagementSid,this._solution.sid)}return this._stepContext}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={StepList:h,StepPage:f,StepInstance:p,StepContext:d}},40056:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function StepContextList(t,e,i,n){function StepContextListInstance(t){return StepContextListInstance.get(t)}StepContextListInstance._version=t;StepContextListInstance._solution={flowSid:e,engagementSid:i,stepSid:n};StepContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.engagementSid,this._solution.stepSid)};StepContextListInstance.toJSON=function toJSON(){return this._solution};StepContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return StepContextListInstance};u=function StepContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.engagementSid,this._solution.stepSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function StepContextInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.engagementSid=e.engagement_sid;this.flowSid=e.flow_sid;this.stepSid=e.step_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,engagementSid:n,stepSid:o}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.engagementSid,this._solution.stepSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function StepContextContext(t,e,i,n){this._version=t;this._solution={flowSid:e,engagementSid:i,stepSid:n};this._uri=`/Flows/${e}/Engagements/${i}/Steps/${n}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.engagementSid,this._solution.stepSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={StepContextList:a,StepContextPage:u,StepContextInstance:h,StepContextContext:f}},42890:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(77572).ExecutionContextList;var c=i(99857).ExecutionStepList;var a=i(60938);var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function ExecutionList(t,e){function ExecutionListInstance(t){return ExecutionListInstance.get(t)}ExecutionListInstance._version=t;ExecutionListInstance._solution={flowSid:e};ExecutionListInstance._uri=`/Flows/${e}/Executions`;ExecutionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExecutionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExecutionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({DateCreatedFrom:h.iso8601DateTime(o.get(t,"dateCreatedFrom")),DateCreatedTo:h.iso8601DateTime(o.get(t,"dateCreatedTo")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.from)){throw new Error('Required parameter "opts.from" missing.')}var i=n.defer();var s=f.of({To:o.get(t,"to"),From:o.get(t,"from"),Parameters:h.object(o.get(t,"parameters"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.get=function get(t){return new v(this._version,this._solution.flowSid,t)};ExecutionListInstance.toJSON=function toJSON(){return this._solution};ExecutionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionListInstance};d=function ExecutionPage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,a.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.flowSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ExecutionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.contactSid=e.contact_sid;this.contactChannelAddress=e.contact_channel_address;this.context=e.context;this.status=e.status;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.flowSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.steps=function steps(){return this._proxy.steps};l.prototype.executionContext=function executionContext(){return this._proxy.executionContext};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ExecutionContext(t,e,i){this._version=t;this._solution={flowSid:e,sid:i};this._uri=`/Flows/${e}/Executions/${i}`;this._steps=undefined;this._executionContext=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=f.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"steps",{get:function(){if(!this._steps){this._steps=new c(this._version,this._solution.flowSid,this._solution.sid)}return this._steps}});Object.defineProperty(v.prototype,"executionContext",{get:function(){if(!this._executionContext){this._executionContext=new r(this._version,this._solution.flowSid,this._solution.sid)}return this._executionContext}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionList:p,ExecutionPage:d,ExecutionInstance:l,ExecutionContext:v}},77572:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function ExecutionContextList(t,e,i){function ExecutionContextListInstance(t){return ExecutionContextListInstance.get(t)}ExecutionContextListInstance._version=t;ExecutionContextListInstance._solution={flowSid:e,executionSid:i};ExecutionContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.executionSid)};ExecutionContextListInstance.toJSON=function toJSON(){return this._solution};ExecutionContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionContextListInstance};u=function ExecutionContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.executionSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExecutionContextInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.flowSid=e.flow_sid;this.executionSid=e.execution_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,executionSid:n}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.executionSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExecutionContextContext(t,e,i){this._version=t;this._solution={flowSid:e,executionSid:i};this._uri=`/Flows/${e}/Executions/${i}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.executionSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionContextList:a,ExecutionContextPage:u,ExecutionContextInstance:h,ExecutionContextContext:f}},99857:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(5436).ExecutionStepContextList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function ExecutionStepList(t,e,i){function ExecutionStepListInstance(t){return ExecutionStepListInstance.get(t)}ExecutionStepListInstance._version=t;ExecutionStepListInstance._solution={flowSid:e,executionSid:i};ExecutionStepListInstance._uri=`/Flows/${e}/Executions/${i}/Steps`;ExecutionStepListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExecutionStepListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExecutionStepListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionStepListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionStepListInstance.get=function get(t){return new d(this._version,this._solution.flowSid,this._solution.executionSid,t)};ExecutionStepListInstance.toJSON=function toJSON(){return this._solution};ExecutionStepListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionStepListInstance};f=function ExecutionStepPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.flowSid,this._solution.executionSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ExecutionStepInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.executionSid=e.execution_sid;this.name=e.name;this.context=e.context;this.transitionedFrom=e.transitioned_from;this.transitionedTo=e.transitioned_to;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,executionSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.stepContext=function stepContext(){return this._proxy.stepContext};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ExecutionStepContext(t,e,i,n){this._version=t;this._solution={flowSid:e,executionSid:i,sid:n};this._uri=`/Flows/${e}/Executions/${i}/Steps/${n}`;this._stepContext=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"stepContext",{get:function(){if(!this._stepContext){this._stepContext=new r(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.sid)}return this._stepContext}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionStepList:h,ExecutionStepPage:f,ExecutionStepInstance:p,ExecutionStepContext:d}},5436:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function ExecutionStepContextList(t,e,i,n){function ExecutionStepContextListInstance(t){return ExecutionStepContextListInstance.get(t)}ExecutionStepContextListInstance._version=t;ExecutionStepContextListInstance._solution={flowSid:e,executionSid:i,stepSid:n};ExecutionStepContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)};ExecutionStepContextListInstance.toJSON=function toJSON(){return this._solution};ExecutionStepContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionStepContextListInstance};u=function ExecutionStepContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExecutionStepContextInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.executionSid=e.execution_sid;this.flowSid=e.flow_sid;this.stepSid=e.step_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,executionSid:n,stepSid:o}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExecutionStepContextContext(t,e,i,n){this._version=t;this._solution={flowSid:e,executionSid:i,stepSid:n};this._uri=`/Flows/${e}/Executions/${i}/Steps/${n}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionStepContextList:a,ExecutionStepContextPage:u,ExecutionStepContextInstance:h,ExecutionStepContextContext:f}},73635:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(38271).ExecutionList;var c=i(48384).FlowRevisionList;var a=i(83958).FlowTestUserList;var u=i(60938);var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function FlowList(t){function FlowListInstance(t){return FlowListInstance.get(t)}FlowListInstance._version=t;FlowListInstance._solution={};FlowListInstance._uri=`/Flows`;FlowListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}if(o.isUndefined(t.definition)){throw new Error('Required parameter "opts.definition" missing.')}var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),Status:o.get(t,"status"),Definition:f.object(o.get(t,"definition")),CommitMessage:o.get(t,"commitMessage")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FlowListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FlowListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowListInstance.get=function get(t){return new m(this._version,t)};FlowListInstance.toJSON=function toJSON(){return this._solution};FlowListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlowListInstance};l=function FlowPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,u.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function FlowInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.definition=e.definition;this.status=e.status;this.revision=h.integer(e.revision);this.commitMessage=e.commit_message;this.valid=e.valid;this.errors=e.errors;this.warnings=e.warnings;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.webhookUrl=e.webhook_url;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.revisions=function revisions(){return this._proxy.revisions};v.prototype.testUsers=function testUsers(){return this._proxy.testUsers};v.prototype.executions=function executions(){return this._proxy.executions};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function FlowContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Flows/${e}`;this._revisions=undefined;this._testUsers=undefined;this._executions=undefined};m.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=p.of({Status:o.get(t,"status"),FriendlyName:o.get(t,"friendlyName"),Definition:f.object(o.get(t,"definition")),CommitMessage:o.get(t,"commitMessage")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"revisions",{get:function(){if(!this._revisions){this._revisions=new c(this._version,this._solution.sid)}return this._revisions}});Object.defineProperty(m.prototype,"testUsers",{get:function(){if(!this._testUsers){this._testUsers=new a(this._version,this._solution.sid)}return this._testUsers}});Object.defineProperty(m.prototype,"executions",{get:function(){if(!this._executions){this._executions=new r(this._version,this._solution.sid)}return this._executions}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlowList:d,FlowPage:l,FlowInstance:v,FlowContext:m}},38271:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(69434).ExecutionContextList;var c=i(17198).ExecutionStepList;var a=i(60938);var u=i(80513);var h=i(6372);var f=i(72142);var p;var d;var l;var v;p=function ExecutionList(t,e){function ExecutionListInstance(t){return ExecutionListInstance.get(t)}ExecutionListInstance._version=t;ExecutionListInstance._solution={flowSid:e};ExecutionListInstance._uri=`/Flows/${e}/Executions`;ExecutionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExecutionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExecutionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({DateCreatedFrom:h.iso8601DateTime(o.get(t,"dateCreatedFrom")),DateCreatedTo:h.iso8601DateTime(o.get(t,"dateCreatedTo")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.from)){throw new Error('Required parameter "opts.from" missing.')}var i=n.defer();var s=f.of({To:o.get(t,"to"),From:o.get(t,"from"),Parameters:h.object(o.get(t,"parameters"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionListInstance.get=function get(t){return new v(this._version,this._solution.flowSid,t)};ExecutionListInstance.toJSON=function toJSON(){return this._solution};ExecutionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionListInstance};d=function ExecutionPage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,a.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.flowSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function ExecutionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.contactChannelAddress=e.contact_channel_address;this.context=e.context;this.status=e.status;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.flowSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.steps=function steps(){return this._proxy.steps};l.prototype.executionContext=function executionContext(){return this._proxy.executionContext};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ExecutionContext(t,e,i){this._version=t;this._solution={flowSid:e,sid:i};this._uri=`/Flows/${e}/Executions/${i}`;this._steps=undefined;this._executionContext=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=f.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.flowSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(v.prototype,"steps",{get:function(){if(!this._steps){this._steps=new c(this._version,this._solution.flowSid,this._solution.sid)}return this._steps}});Object.defineProperty(v.prototype,"executionContext",{get:function(){if(!this._executionContext){this._executionContext=new r(this._version,this._solution.flowSid,this._solution.sid)}return this._executionContext}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionList:p,ExecutionPage:d,ExecutionInstance:l,ExecutionContext:v}},69434:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function ExecutionContextList(t,e,i){function ExecutionContextListInstance(t){return ExecutionContextListInstance.get(t)}ExecutionContextListInstance._version=t;ExecutionContextListInstance._solution={flowSid:e,executionSid:i};ExecutionContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.executionSid)};ExecutionContextListInstance.toJSON=function toJSON(){return this._solution};ExecutionContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionContextListInstance};u=function ExecutionContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.executionSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExecutionContextInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.flowSid=e.flow_sid;this.executionSid=e.execution_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,executionSid:n}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.executionSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExecutionContextContext(t,e,i){this._version=t;this._solution={flowSid:e,executionSid:i};this._uri=`/Flows/${e}/Executions/${i}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.executionSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionContextList:a,ExecutionContextPage:u,ExecutionContextInstance:h,ExecutionContextContext:f}},17198:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(2223).ExecutionStepContextList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function ExecutionStepList(t,e,i){function ExecutionStepListInstance(t){return ExecutionStepListInstance.get(t)}ExecutionStepListInstance._version=t;ExecutionStepListInstance._solution={flowSid:e,executionSid:i};ExecutionStepListInstance._uri=`/Flows/${e}/Executions/${i}/Steps`;ExecutionStepListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ExecutionStepListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ExecutionStepListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionStepListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ExecutionStepListInstance.get=function get(t){return new d(this._version,this._solution.flowSid,this._solution.executionSid,t)};ExecutionStepListInstance.toJSON=function toJSON(){return this._solution};ExecutionStepListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionStepListInstance};f=function ExecutionStepPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.flowSid,this._solution.executionSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ExecutionStepInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.flowSid=e.flow_sid;this.executionSid=e.execution_sid;this.name=e.name;this.context=e.context;this.transitionedFrom=e.transitioned_from;this.transitionedTo=e.transitioned_to;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={flowSid:i,executionSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.stepContext=function stepContext(){return this._proxy.stepContext};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ExecutionStepContext(t,e,i,n){this._version=t;this._solution={flowSid:e,executionSid:i,sid:n};this._uri=`/Flows/${e}/Executions/${i}/Steps/${n}`;this._stepContext=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"stepContext",{get:function(){if(!this._stepContext){this._stepContext=new r(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.sid)}return this._stepContext}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionStepList:h,ExecutionStepPage:f,ExecutionStepInstance:p,ExecutionStepContext:d}},2223:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function ExecutionStepContextList(t,e,i,n){function ExecutionStepContextListInstance(t){return ExecutionStepContextListInstance.get(t)}ExecutionStepContextListInstance._version=t;ExecutionStepContextListInstance._solution={flowSid:e,executionSid:i,stepSid:n};ExecutionStepContextListInstance.get=function get(){return new f(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)};ExecutionStepContextListInstance.toJSON=function toJSON(){return this._solution};ExecutionStepContextListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ExecutionStepContextListInstance};u=function ExecutionStepContextPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function ExecutionStepContextInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.context=e.context;this.executionSid=e.execution_sid;this.flowSid=e.flow_sid;this.stepSid=e.step_sid;this.url=e.url;this._context=undefined;this._solution={flowSid:i,executionSid:n,stepSid:o}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function ExecutionStepContextContext(t,e,i,n){this._version=t;this._solution={flowSid:e,executionSid:i,stepSid:n};this._uri=`/Flows/${e}/Executions/${i}/Steps/${n}/Context`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.flowSid,this._solution.executionSid,this._solution.stepSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ExecutionStepContextList:a,ExecutionStepContextPage:u,ExecutionStepContextInstance:h,ExecutionStepContextContext:f}},48384:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FlowRevisionList(t,e){function FlowRevisionListInstance(t){return FlowRevisionListInstance.get(t)}FlowRevisionListInstance._version=t;FlowRevisionListInstance._solution={sid:e};FlowRevisionListInstance._uri=`/Flows/${e}/Revisions`;FlowRevisionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FlowRevisionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FlowRevisionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowRevisionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowRevisionListInstance.get=function get(t){return new p(this._version,this._solution.sid,t)};FlowRevisionListInstance.toJSON=function toJSON(){return this._solution};FlowRevisionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlowRevisionListInstance};h=function FlowRevisionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.sid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FlowRevisionInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.definition=e.definition;this.status=e.status;this.revision=c.integer(e.revision);this.commitMessage=e.commit_message;this.valid=e.valid;this.errors=e.errors;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i,revision:n||this.revision}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid,this._solution.revision)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FlowRevisionContext(t,e,i){this._version=t;this._solution={sid:e,revision:i};this._uri=`/Flows/${e}/Revisions/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid,this._solution.revision))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlowRevisionList:u,FlowRevisionPage:h,FlowRevisionInstance:f,FlowRevisionContext:p}},83958:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function FlowTestUserList(t,e){function FlowTestUserListInstance(t){return FlowTestUserListInstance.get(t)}FlowTestUserListInstance._version=t;FlowTestUserListInstance._solution={sid:e};FlowTestUserListInstance.get=function get(){return new p(this._version,this._solution.sid)};FlowTestUserListInstance.toJSON=function toJSON(){return this._solution};FlowTestUserListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlowTestUserListInstance};h=function FlowTestUserPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.sid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FlowTestUserInstance(t,e,i){this._version=t;this.sid=e.sid;this.testUsers=e.test_users;this.url=e.url;this._context=undefined;this._solution={sid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FlowTestUserContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Flows/${e}/TestUsers`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.testUsers)){throw new Error('Required parameter "opts.testUsers" missing.')}var i=n.defer();var s=a.of({TestUsers:c.map(o.get(t,"testUsers"),function(t){return t})});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlowTestUserList:u,FlowTestUserPage:h,FlowTestUserInstance:f,FlowTestUserContext:p}},75398:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;u=function FlowValidateList(t){function FlowValidateListInstance(t){return FlowValidateListInstance.get(t)}FlowValidateListInstance._version=t;FlowValidateListInstance._solution={};FlowValidateListInstance._uri=`/Flows/Validate`;FlowValidateListInstance.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}if(o.isUndefined(t.definition)){throw new Error('Required parameter "opts.definition" missing.')}var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),Status:o.get(t,"status"),Definition:c.object(o.get(t,"definition")),CommitMessage:o.get(t,"commitMessage")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FlowValidateListInstance.toJSON=function toJSON(){return this._solution};FlowValidateListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FlowValidateListInstance};h=function FlowValidatePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FlowValidateInstance(t,e){this._version=t;this.valid=e.valid;this._context=undefined;this._solution={}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FlowValidateList:u,FlowValidatePage:h,FlowValidateInstance:f}},16029:(t,e,i)=>{"use strict";var n=i(90250);var o=i(40190).CommandList;var s=i(27330).FleetList;var r=i(55656).NetworkAccessProfileList;var c=i(99419).NetworkList;var a=i(30929).SimList;var u=i(6916).UsageRecordList;var h=i(64351);function V1(t){h.prototype.constructor.call(this,t,"v1");this._commands=undefined;this._fleets=undefined;this._networks=undefined;this._networkAccessProfiles=undefined;this._sims=undefined;this._usageRecords=undefined}n.extend(V1.prototype,h.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"commands",{get:function(){this._commands=this._commands||new o(this);return this._commands}});Object.defineProperty(V1.prototype,"fleets",{get:function(){this._fleets=this._fleets||new s(this);return this._fleets}});Object.defineProperty(V1.prototype,"networks",{get:function(){this._networks=this._networks||new c(this);return this._networks}});Object.defineProperty(V1.prototype,"networkAccessProfiles",{get:function(){this._networkAccessProfiles=this._networkAccessProfiles||new r(this);return this._networkAccessProfiles}});Object.defineProperty(V1.prototype,"sims",{get:function(){this._sims=this._sims||new a(this);return this._sims}});Object.defineProperty(V1.prototype,"usageRecords",{get:function(){this._usageRecords=this._usageRecords||new u(this);return this._usageRecords}});t.exports=V1},40190:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CommandList(t){function CommandListInstance(t){return CommandListInstance.get(t)}CommandListInstance._version=t;CommandListInstance._solution={};CommandListInstance._uri=`/Commands`;CommandListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.sim)){throw new Error('Required parameter "opts.sim" missing.')}if(o.isUndefined(t.command)){throw new Error('Required parameter "opts.command" missing.')}var i=n.defer();var s=a.of({Sim:o.get(t,"sim"),Command:o.get(t,"command"),CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CommandListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CommandListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Sim:o.get(t,"sim"),Status:o.get(t,"status"),Direction:o.get(t,"direction"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.get=function get(t){return new p(this._version,t)};CommandListInstance.toJSON=function toJSON(){return this._solution};CommandListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CommandListInstance};h=function CommandPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CommandInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.simSid=e.sim_sid;this.command=e.command;this.status=e.status;this.direction=e.direction;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CommandContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Commands/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CommandList:u,CommandPage:h,CommandInstance:f,CommandContext:p}},27330:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function FleetList(t){function FleetListInstance(t){return FleetListInstance.get(t)}FleetListInstance._version=t;FleetListInstance._solution={};FleetListInstance._uri=`/Fleets`;FleetListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.networkAccessProfile)){throw new Error('Required parameter "opts.networkAccessProfile" missing.')}var i=n.defer();var s=u.of({NetworkAccessProfile:o.get(t,"networkAccessProfile"),UniqueName:o.get(t,"uniqueName"),DataEnabled:a.bool(o.get(t,"dataEnabled")),DataLimit:o.get(t,"dataLimit"),CommandsEnabled:a.bool(o.get(t,"commandsEnabled")),CommandsUrl:o.get(t,"commandsUrl"),CommandsMethod:o.get(t,"commandsMethod")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FleetListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FleetListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({NetworkAccessProfile:o.get(t,"networkAccessProfile"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FleetListInstance.get=function get(t){return new d(this._version,t)};FleetListInstance.toJSON=function toJSON(){return this._solution};FleetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FleetListInstance};f=function FleetPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FleetInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.uniqueName=e.unique_name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this.dataEnabled=e.data_enabled;this.dataLimit=c.integer(e.data_limit);this.dataMetering=e.data_metering;this.commandsEnabled=e.commands_enabled;this.commandsUrl=e.commands_url;this.commandsMethod=e.commands_method;this.networkAccessProfileSid=e.network_access_profile_sid;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function FleetContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Fleets/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),NetworkAccessProfile:o.get(t,"networkAccessProfile")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FleetList:h,FleetPage:f,FleetInstance:p,FleetContext:d}},99419:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function NetworkList(t){function NetworkListInstance(t){return NetworkListInstance.get(t)}NetworkListInstance._version=t;NetworkListInstance._solution={};NetworkListInstance._uri=`/Networks`;NetworkListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NetworkListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NetworkListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({IsoCountry:o.get(t,"isoCountry"),Mcc:o.get(t,"mcc"),Mnc:o.get(t,"mnc"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkListInstance.get=function get(t){return new f(this._version,t)};NetworkListInstance.toJSON=function toJSON(){return this._solution};NetworkListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NetworkListInstance};u=function NetworkPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function NetworkInstance(t,e,i){this._version=t;this.sid=e.sid;this.friendlyName=e.friendly_name;this.url=e.url;this.isoCountry=e.iso_country;this.identifiers=e.identifiers;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.sid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NetworkContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Networks/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NetworkList:a,NetworkPage:u,NetworkInstance:h,NetworkContext:f}},55656:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(26489).NetworkAccessProfileNetworkList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function NetworkAccessProfileList(t){function NetworkAccessProfileListInstance(t){return NetworkAccessProfileListInstance.get(t)}NetworkAccessProfileListInstance._version=t;NetworkAccessProfileListInstance._solution={};NetworkAccessProfileListInstance._uri=`/NetworkAccessProfiles`;NetworkAccessProfileListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),Networks:u.map(o.get(t,"networks"),function(t){return t})});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NetworkAccessProfileListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NetworkAccessProfileListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileListInstance.get=function get(t){return new l(this._version,t)};NetworkAccessProfileListInstance.toJSON=function toJSON(){return this._solution};NetworkAccessProfileListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NetworkAccessProfileListInstance};p=function NetworkAccessProfilePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function NetworkAccessProfileInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.networks=function networks(){return this._proxy.networks};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function NetworkAccessProfileContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/NetworkAccessProfiles/${e}`;this._networks=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"networks",{get:function(){if(!this._networks){this._networks=new r(this._version,this._solution.sid)}return this._networks}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NetworkAccessProfileList:f,NetworkAccessProfilePage:p,NetworkAccessProfileInstance:d,NetworkAccessProfileContext:l}},26489:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function NetworkAccessProfileNetworkList(t,e){function NetworkAccessProfileNetworkListInstance(t){return NetworkAccessProfileNetworkListInstance.get(t)}NetworkAccessProfileNetworkListInstance._version=t;NetworkAccessProfileNetworkListInstance._solution={networkAccessProfileSid:e};NetworkAccessProfileNetworkListInstance._uri=`/NetworkAccessProfiles/${e}/Networks`;NetworkAccessProfileNetworkListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};NetworkAccessProfileNetworkListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};NetworkAccessProfileNetworkListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileNetworkListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileNetworkListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.network)){throw new Error('Required parameter "opts.network" missing.')}var i=n.defer();var s=c.of({Network:o.get(t,"network")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution.networkAccessProfileSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};NetworkAccessProfileNetworkListInstance.get=function get(t){return new f(this._version,this._solution.networkAccessProfileSid,t)};NetworkAccessProfileNetworkListInstance.toJSON=function toJSON(){return this._solution};NetworkAccessProfileNetworkListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return NetworkAccessProfileNetworkListInstance};u=function NetworkAccessProfileNetworkPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.networkAccessProfileSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function NetworkAccessProfileNetworkInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.networkAccessProfileSid=e.network_access_profile_sid;this.friendlyName=e.friendly_name;this.isoCountry=e.iso_country;this.identifiers=e.identifiers;this.url=e.url;this._context=undefined;this._solution={networkAccessProfileSid:i,sid:n||this.sid}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.networkAccessProfileSid,this._solution.sid)}return this._context}});h.prototype.remove=function remove(t){return this._proxy.remove(t)};h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function NetworkAccessProfileNetworkContext(t,e,i){this._version=t;this._solution={networkAccessProfileSid:e,sid:i};this._uri=`/NetworkAccessProfiles/${e}/Networks/${i}`};f.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.networkAccessProfileSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={NetworkAccessProfileNetworkList:a,NetworkAccessProfileNetworkPage:u,NetworkAccessProfileNetworkInstance:h,NetworkAccessProfileNetworkContext:f}},30929:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SimList(t){function SimListInstance(t){return SimListInstance.get(t)}SimListInstance._version=t;SimListInstance._solution={};SimListInstance._uri=`/Sims`;SimListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SimListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SimListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Status:o.get(t,"status"),Fleet:o.get(t,"fleet"),Iccid:o.get(t,"iccid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.get=function get(t){return new p(this._version,t)};SimListInstance.toJSON=function toJSON(){return this._solution};SimListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SimListInstance};h=function SimPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SimInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.iccid=e.iccid;this.status=e.status;this.fleetSid=e.fleet_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SimContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Sims/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({UniqueName:o.get(t,"uniqueName"),Status:o.get(t,"status"),Fleet:o.get(t,"fleet"),CallbackUrl:o.get(t,"callbackUrl"),CallbackMethod:o.get(t,"callbackMethod"),AccountSid:o.get(t,"accountSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SimList:u,SimPage:h,SimInstance:f,SimContext:p}},6916:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function UsageRecordList(t){function UsageRecordListInstance(t){return UsageRecordListInstance.get(t)}UsageRecordListInstance._version=t;UsageRecordListInstance._solution={};UsageRecordListInstance._uri=`/UsageRecords`;UsageRecordListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UsageRecordListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UsageRecordListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Sim:o.get(t,"sim"),Fleet:o.get(t,"fleet"),Network:o.get(t,"network"),IsoCountry:o.get(t,"isoCountry"),Group:o.get(t,"group"),Granularity:o.get(t,"granularity"),StartTime:a.iso8601DateTime(o.get(t,"startTime")),EndTime:a.iso8601DateTime(o.get(t,"endTime")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.toJSON=function toJSON(){return this._solution};UsageRecordListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UsageRecordListInstance};f=function UsageRecordPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function UsageRecordInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.simSid=e.sim_sid;this.networkSid=e.network_sid;this.fleetSid=e.fleet_sid;this.isoCountry=e.iso_country;this.period=e.period;this.dataUpload=c.integer(e.data_upload);this.dataDownload=c.integer(e.data_download);this.dataTotal=c.integer(e.data_total);this._context=undefined;this._solution={}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UsageRecordList:h,UsageRecordPage:f,UsageRecordInstance:p}},34949:(t,e,i)=>{"use strict";var n=i(90250);var o=i(63190).ServiceList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._services=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"services",{get:function(){this._services=this._services||new o(this);return this._services}});t.exports=V1},63190:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(81088).DocumentList;var c=i(60938);var a=i(4845).SyncListList;var u=i(81014).SyncMapList;var h=i(20786).SyncStreamList;var f=i(80513);var p=i(6372);var d=i(72142);var l;var v;var m;var _;l=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({FriendlyName:o.get(t,"friendlyName"),WebhookUrl:o.get(t,"webhookUrl"),ReachabilityWebhooksEnabled:p.bool(o.get(t,"reachabilityWebhooksEnabled")),AclEnabled:p.bool(o.get(t,"aclEnabled")),ReachabilityDebouncingEnabled:p.bool(o.get(t,"reachabilityDebouncingEnabled")),ReachabilityDebouncingWindow:o.get(t,"reachabilityDebouncingWindow"),WebhooksFromRestEnabled:p.bool(o.get(t,"webhooksFromRestEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new v(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new _(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};v=function ServicePage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(v.prototype,c.prototype);v.prototype.constructor=v;v.prototype.getInstance=function getInstance(t){return new m(this._version,t)};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.url=e.url;this.webhookUrl=e.webhook_url;this.webhooksFromRestEnabled=e.webhooks_from_rest_enabled;this.reachabilityWebhooksEnabled=e.reachability_webhooks_enabled;this.aclEnabled=e.acl_enabled;this.reachabilityDebouncingEnabled=e.reachability_debouncing_enabled;this.reachabilityDebouncingWindow=f.integer(e.reachability_debouncing_window);this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(m.prototype,"_proxy",{get:function(){if(!this._context){this._context=new _(this._version,this._solution.sid)}return this._context}});m.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};m.prototype.remove=function remove(t){return this._proxy.remove(t)};m.prototype.update=function update(t,e){return this._proxy.update(t,e)};m.prototype.documents=function documents(){return this._proxy.documents};m.prototype.syncLists=function syncLists(){return this._proxy.syncLists};m.prototype.syncMaps=function syncMaps(){return this._proxy.syncMaps};m.prototype.syncStreams=function syncStreams(){return this._proxy.syncStreams};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._documents=undefined;this._syncLists=undefined;this._syncMaps=undefined;this._syncStreams=undefined};_.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new m(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};_.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=d.of({WebhookUrl:o.get(t,"webhookUrl"),FriendlyName:o.get(t,"friendlyName"),ReachabilityWebhooksEnabled:p.bool(o.get(t,"reachabilityWebhooksEnabled")),AclEnabled:p.bool(o.get(t,"aclEnabled")),ReachabilityDebouncingEnabled:p.bool(o.get(t,"reachabilityDebouncingEnabled")),ReachabilityDebouncingWindow:o.get(t,"reachabilityDebouncingWindow"),WebhooksFromRestEnabled:p.bool(o.get(t,"webhooksFromRestEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(_.prototype,"documents",{get:function(){if(!this._documents){this._documents=new r(this._version,this._solution.sid)}return this._documents}});Object.defineProperty(_.prototype,"syncLists",{get:function(){if(!this._syncLists){this._syncLists=new a(this._version,this._solution.sid)}return this._syncLists}});Object.defineProperty(_.prototype,"syncMaps",{get:function(){if(!this._syncMaps){this._syncMaps=new u(this._version,this._solution.sid)}return this._syncMaps}});Object.defineProperty(_.prototype,"syncStreams",{get:function(){if(!this._syncStreams){this._syncStreams=new h(this._version,this._solution.sid)}return this._syncStreams}});_.prototype.toJSON=function toJSON(){return this._solution};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:l,ServicePage:v,ServiceInstance:m,ServiceContext:_}},81088:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(24808).DocumentPermissionList;var c=i(60938);var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function DocumentList(t,e){function DocumentListInstance(t){return DocumentListInstance.get(t)}DocumentListInstance._version=t;DocumentListInstance._solution={serviceSid:e};DocumentListInstance._uri=`/Services/${e}/Documents`;DocumentListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),Data:u.object(o.get(t,"data")),Ttl:o.get(t,"ttl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DocumentListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DocumentListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};DocumentListInstance.toJSON=function toJSON(){return this._solution};DocumentListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DocumentListInstance};p=function DocumentPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function DocumentInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.data=e.data;this.dateExpires=a.iso8601DateTime(e.date_expires);this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.documentPermissions=function documentPermissions(){return this._proxy.documentPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function DocumentContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Documents/${i}`;this._documentPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Data:u.object(o.get(t,"data")),Ttl:o.get(t,"ttl")});var r=h.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"documentPermissions",{get:function(){if(!this._documentPermissions){this._documentPermissions=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._documentPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DocumentList:f,DocumentPage:p,DocumentInstance:d,DocumentContext:l}},24808:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function DocumentPermissionList(t,e,i){function DocumentPermissionListInstance(t){return DocumentPermissionListInstance.get(t)}DocumentPermissionListInstance._version=t;DocumentPermissionListInstance._solution={serviceSid:e,documentSid:i};DocumentPermissionListInstance._uri=`/Services/${e}/Documents/${i}/Permissions`;DocumentPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DocumentPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DocumentPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DocumentPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.documentSid,t)};DocumentPermissionListInstance.toJSON=function toJSON(){return this._solution};DocumentPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DocumentPermissionListInstance};h=function DocumentPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.documentSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DocumentPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.documentSid=e.document_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,documentSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.documentSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function DocumentPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,documentSid:i,identity:n};this._uri=`/Services/${e}/Documents/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.documentSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.documentSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DocumentPermissionList:u,DocumentPermissionPage:h,DocumentPermissionInstance:f,DocumentPermissionContext:p}},4845:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6456).SyncListItemList;var a=i(19760).SyncListPermissionList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function SyncListList(t,e){function SyncListListInstance(t){return SyncListListInstance.get(t)}SyncListListInstance._version=t;SyncListListInstance._solution={serviceSid:e};SyncListListInstance._uri=`/Services/${e}/Lists`;SyncListListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),Ttl:o.get(t,"ttl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};SyncListListInstance.toJSON=function toJSON(){return this._solution};SyncListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListListInstance};p=function SyncListPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncListInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.dateExpires=u.iso8601DateTime(e.date_expires);this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.syncListItems=function syncListItems(){return this._proxy.syncListItems};d.prototype.syncListPermissions=function syncListPermissions(){return this._proxy.syncListPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SyncListContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Lists/${i}`;this._syncListItems=undefined;this._syncListPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Ttl:o.get(t,"ttl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"syncListItems",{get:function(){if(!this._syncListItems){this._syncListItems=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncListItems}});Object.defineProperty(l.prototype,"syncListPermissions",{get:function(){if(!this._syncListPermissions){this._syncListPermissions=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncListPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListList:f,SyncListPage:p,SyncListInstance:d,SyncListContext:l}},6456:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function SyncListItemList(t,e,i){function SyncListItemListInstance(t){return SyncListItemListInstance.get(t)}SyncListItemListInstance._version=t;SyncListItemListInstance._solution={serviceSid:e,listSid:i};SyncListItemListInstance._uri=`/Services/${e}/Lists/${i}/Items`;SyncListItemListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data")),Ttl:o.get(t,"ttl"),ItemTtl:o.get(t,"itemTtl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListItemListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListItemListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),From:o.get(t,"from"),Bounds:o.get(t,"bounds"),HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListItemListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.listSid,t)};SyncListItemListInstance.toJSON=function toJSON(){return this._solution};SyncListItemListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListItemListInstance};f=function SyncListItemPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.listSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncListItemInstance(t,e,i,n,o){this._version=t;this.index=c.integer(e.index);this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.listSid=e.list_sid;this.url=e.url;this.revision=e.revision;this.data=e.data;this.dateExpires=c.iso8601DateTime(e.date_expires);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,listSid:n,index:o||this.index}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.listSid,this._solution.index)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncListItemContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,listSid:i,index:n};this._uri=`/Services/${e}/Lists/${i}/Items/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data")),Ttl:o.get(t,"ttl"),ItemTtl:o.get(t,"itemTtl"),CollectionTtl:o.get(t,"collectionTtl")});var r=u.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.index))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListItemList:h,SyncListItemPage:f,SyncListItemInstance:p,SyncListItemContext:d}},19760:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function SyncListPermissionList(t,e,i){function SyncListPermissionListInstance(t){return SyncListPermissionListInstance.get(t)}SyncListPermissionListInstance._version=t;SyncListPermissionListInstance._solution={serviceSid:e,listSid:i};SyncListPermissionListInstance._uri=`/Services/${e}/Lists/${i}/Permissions`;SyncListPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncListPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncListPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncListPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.listSid,t)};SyncListPermissionListInstance.toJSON=function toJSON(){return this._solution};SyncListPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncListPermissionListInstance};h=function SyncListPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.listSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SyncListPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.listSid=e.list_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,listSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.listSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncListPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,listSid:i,identity:n};this._uri=`/Services/${e}/Lists/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.listSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncListPermissionList:u,SyncListPermissionPage:h,SyncListPermissionInstance:f,SyncListPermissionContext:p}},81014:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(64825).SyncMapItemList;var a=i(89269).SyncMapPermissionList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function SyncMapList(t,e){function SyncMapListInstance(t){return SyncMapListInstance.get(t)}SyncMapListInstance._version=t;SyncMapListInstance._solution={serviceSid:e};SyncMapListInstance._uri=`/Services/${e}/Maps`;SyncMapListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),Ttl:o.get(t,"ttl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};SyncMapListInstance.toJSON=function toJSON(){return this._solution};SyncMapListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapListInstance};p=function SyncMapPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncMapInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.revision=e.revision;this.dateExpires=u.iso8601DateTime(e.date_expires);this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.syncMapItems=function syncMapItems(){return this._proxy.syncMapItems};d.prototype.syncMapPermissions=function syncMapPermissions(){return this._proxy.syncMapPermissions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SyncMapContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Maps/${i}`;this._syncMapItems=undefined;this._syncMapPermissions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Ttl:o.get(t,"ttl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(l.prototype,"syncMapItems",{get:function(){if(!this._syncMapItems){this._syncMapItems=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncMapItems}});Object.defineProperty(l.prototype,"syncMapPermissions",{get:function(){if(!this._syncMapPermissions){this._syncMapPermissions=new a(this._version,this._solution.serviceSid,this._solution.sid)}return this._syncMapPermissions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapList:f,SyncMapPage:p,SyncMapInstance:d,SyncMapContext:l}},64825:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function SyncMapItemList(t,e,i){function SyncMapItemListInstance(t){return SyncMapItemListInstance.get(t)}SyncMapItemListInstance._version=t;SyncMapItemListInstance._solution={serviceSid:e,mapSid:i};SyncMapItemListInstance._uri=`/Services/${e}/Maps/${i}/Items`;SyncMapItemListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.key)){throw new Error('Required parameter "opts.key" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=u.of({Key:o.get(t,"key"),Data:a.object(o.get(t,"data")),Ttl:o.get(t,"ttl"),ItemTtl:o.get(t,"itemTtl"),CollectionTtl:o.get(t,"collectionTtl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapItemListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapItemListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Order:o.get(t,"order"),From:o.get(t,"from"),Bounds:o.get(t,"bounds"),HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapItemListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.mapSid,t)};SyncMapItemListInstance.toJSON=function toJSON(){return this._solution};SyncMapItemListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapItemListInstance};f=function SyncMapItemPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.mapSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncMapItemInstance(t,e,i,n,o){this._version=t;this.key=e.key;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.mapSid=e.map_sid;this.url=e.url;this.revision=e.revision;this.data=e.data;this.dateExpires=c.iso8601DateTime(e.date_expires);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,mapSid:n,key:o||this.key}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.mapSid,this._solution.key)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t,e){return this._proxy.remove(t,e)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncMapItemContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,mapSid:i,key:n};this._uri=`/Services/${e}/Maps/${i}/Items/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({"If-Match":o.get(t,"ifMatch")});var r=this._version.remove({uri:this._uri,method:"DELETE",headers:s});r=r.then(function(t){i.resolve(t)}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Data:a.object(o.get(t,"data")),Ttl:o.get(t,"ttl"),ItemTtl:o.get(t,"itemTtl"),CollectionTtl:o.get(t,"collectionTtl")});var r=u.of({"If-Match":o.get(t,"ifMatch")});var c=this._version.update({uri:this._uri,method:"POST",data:s,headers:r});c=c.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.key))}.bind(this));c.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapItemList:h,SyncMapItemPage:f,SyncMapItemInstance:p,SyncMapItemContext:d}},89269:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function SyncMapPermissionList(t,e,i){function SyncMapPermissionListInstance(t){return SyncMapPermissionListInstance.get(t)}SyncMapPermissionListInstance._version=t;SyncMapPermissionListInstance._solution={serviceSid:e,mapSid:i};SyncMapPermissionListInstance._uri=`/Services/${e}/Maps/${i}/Permissions`;SyncMapPermissionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncMapPermissionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncMapPermissionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapPermissionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncMapPermissionListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.mapSid,t)};SyncMapPermissionListInstance.toJSON=function toJSON(){return this._solution};SyncMapPermissionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncMapPermissionListInstance};h=function SyncMapPermissionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.mapSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SyncMapPermissionInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.mapSid=e.map_sid;this.identity=e.identity;this.read=e.read;this.write=e.write;this.manage=e.manage;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,mapSid:n,identity:o||this.identity}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.mapSid,this._solution.identity)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncMapPermissionContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,mapSid:i,identity:n};this._uri=`/Services/${e}/Maps/${i}/Permissions/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.read)){throw new Error('Required parameter "opts.read" missing.')}if(o.isUndefined(t.write)){throw new Error('Required parameter "opts.write" missing.')}if(o.isUndefined(t.manage)){throw new Error('Required parameter "opts.manage" missing.')}var i=n.defer();var s=a.of({Read:c.bool(o.get(t,"read")),Write:c.bool(o.get(t,"write")),Manage:c.bool(o.get(t,"manage"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.mapSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncMapPermissionList:u,SyncMapPermissionPage:h,SyncMapPermissionInstance:f,SyncMapPermissionContext:p}},20786:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(12019).StreamMessageList;var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function SyncStreamList(t,e){function SyncStreamListInstance(t){return SyncStreamListInstance.get(t)}SyncStreamListInstance._version=t;SyncStreamListInstance._solution={serviceSid:e};SyncStreamListInstance._uri=`/Services/${e}/Streams`;SyncStreamListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),Ttl:o.get(t,"ttl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncStreamListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SyncStreamListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SyncStreamListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({HideExpired:o.get(t,"hideExpired"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncStreamListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SyncStreamListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};SyncStreamListInstance.toJSON=function toJSON(){return this._solution};SyncStreamListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SyncStreamListInstance};f=function SyncStreamPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SyncStreamInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.url=e.url;this.links=e.links;this.dateExpires=a.iso8601DateTime(e.date_expires);this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.createdBy=e.created_by;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.streamMessages=function streamMessages(){return this._proxy.streamMessages};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SyncStreamContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Streams/${i}`;this._streamMessages=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Ttl:o.get(t,"ttl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(d.prototype,"streamMessages",{get:function(){if(!this._streamMessages){this._streamMessages=new c(this._version,this._solution.serviceSid,this._solution.sid)}return this._streamMessages}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SyncStreamList:h,SyncStreamPage:f,SyncStreamInstance:p,SyncStreamContext:d}},12019:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;u=function StreamMessageList(t,e,i){function StreamMessageListInstance(t){return StreamMessageListInstance.get(t)}StreamMessageListInstance._version=t;StreamMessageListInstance._solution={serviceSid:e,streamSid:i};StreamMessageListInstance._uri=`/Services/${e}/Streams/${i}/Messages`;StreamMessageListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.data)){throw new Error('Required parameter "opts.data" missing.')}var i=n.defer();var s=a.of({Data:c.object(o.get(t,"data"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};StreamMessageListInstance.toJSON=function toJSON(){return this._solution};StreamMessageListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return StreamMessageListInstance};h=function StreamMessagePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.streamSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function StreamMessageInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.data=e.data;this._context=undefined;this._solution={serviceSid:i,streamSid:n}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={StreamMessageList:u,StreamMessagePage:h,StreamMessageInstance:f}},28079:(t,e,i)=>{"use strict";var n=i(90250);var o=i(64351);var s=i(86558).WorkspaceList;function V1(t){o.prototype.constructor.call(this,t,"v1");this._workspaces=undefined}n.extend(V1.prototype,o.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"workspaces",{get:function(){this._workspaces=this._workspaces||new s(this);return this._workspaces}});t.exports=V1},86558:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(97497).ActivityList;var c=i(23057).EventList;var a=i(60938);var u=i(13250).TaskChannelList;var h=i(57360).TaskList;var f=i(22444).TaskQueueList;var p=i(12752).WorkerList;var d=i(66765).WorkflowList;var l=i(47678).WorkspaceCumulativeStatisticsList;var v=i(5751).WorkspaceRealTimeStatisticsList;var m=i(52593).WorkspaceStatisticsList;var _=i(80513);var g=i(6372);var y=i(72142);var S;var b;var w;var L;S=function WorkspaceList(t){function WorkspaceListInstance(t){return WorkspaceListInstance.get(t)}WorkspaceListInstance._version=t;WorkspaceListInstance._solution={};WorkspaceListInstance._uri=`/Workspaces`;WorkspaceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WorkspaceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WorkspaceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=y.of({FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new b(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkspaceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new b(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkspaceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=y.of({FriendlyName:o.get(t,"friendlyName"),EventCallbackUrl:o.get(t,"eventCallbackUrl"),EventsFilter:o.get(t,"eventsFilter"),MultiTaskEnabled:g.bool(o.get(t,"multiTaskEnabled")),Template:o.get(t,"template"),PrioritizeQueueOrder:o.get(t,"prioritizeQueueOrder")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new w(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkspaceListInstance.get=function get(t){return new L(this._version,t)};WorkspaceListInstance.toJSON=function toJSON(){return this._solution};WorkspaceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkspaceListInstance};b=function WorkspacePage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(b.prototype,a.prototype);b.prototype.constructor=b;b.prototype.getInstance=function getInstance(t){return new w(this._version,t)};b.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};b.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};w=function WorkspaceInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.dateCreated=_.iso8601DateTime(e.date_created);this.dateUpdated=_.iso8601DateTime(e.date_updated);this.defaultActivityName=e.default_activity_name;this.defaultActivitySid=e.default_activity_sid;this.eventCallbackUrl=e.event_callback_url;this.eventsFilter=e.events_filter;this.friendlyName=e.friendly_name;this.multiTaskEnabled=e.multi_task_enabled;this.sid=e.sid;this.timeoutActivityName=e.timeout_activity_name;this.timeoutActivitySid=e.timeout_activity_sid;this.prioritizeQueueOrder=e.prioritize_queue_order;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(w.prototype,"_proxy",{get:function(){if(!this._context){this._context=new L(this._version,this._solution.sid)}return this._context}});w.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};w.prototype.update=function update(t,e){return this._proxy.update(t,e)};w.prototype.remove=function remove(t){return this._proxy.remove(t)};w.prototype.activities=function activities(){return this._proxy.activities};w.prototype.events=function events(){return this._proxy.events};w.prototype.tasks=function tasks(){return this._proxy.tasks};w.prototype.taskQueues=function taskQueues(){return this._proxy.taskQueues};w.prototype.workers=function workers(){return this._proxy.workers};w.prototype.workflows=function workflows(){return this._proxy.workflows};w.prototype.statistics=function statistics(){return this._proxy.statistics};w.prototype.realTimeStatistics=function realTimeStatistics(){return this._proxy.realTimeStatistics};w.prototype.cumulativeStatistics=function cumulativeStatistics(){return this._proxy.cumulativeStatistics};w.prototype.taskChannels=function taskChannels(){return this._proxy.taskChannels};w.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};w.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};L=function WorkspaceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Workspaces/${e}`;this._activities=undefined;this._events=undefined;this._tasks=undefined;this._taskQueues=undefined;this._workers=undefined;this._workflows=undefined;this._statistics=undefined;this._realTimeStatistics=undefined;this._cumulativeStatistics=undefined;this._taskChannels=undefined};L.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new w(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};L.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=y.of({DefaultActivitySid:o.get(t,"defaultActivitySid"),EventCallbackUrl:o.get(t,"eventCallbackUrl"),EventsFilter:o.get(t,"eventsFilter"),FriendlyName:o.get(t,"friendlyName"),MultiTaskEnabled:g.bool(o.get(t,"multiTaskEnabled")),TimeoutActivitySid:o.get(t,"timeoutActivitySid"),PrioritizeQueueOrder:o.get(t,"prioritizeQueueOrder")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new w(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};L.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(L.prototype,"activities",{get:function(){if(!this._activities){this._activities=new r(this._version,this._solution.sid)}return this._activities}});Object.defineProperty(L.prototype,"events",{get:function(){if(!this._events){this._events=new c(this._version,this._solution.sid)}return this._events}});Object.defineProperty(L.prototype,"tasks",{get:function(){if(!this._tasks){this._tasks=new h(this._version,this._solution.sid)}return this._tasks}});Object.defineProperty(L.prototype,"taskQueues",{get:function(){if(!this._taskQueues){this._taskQueues=new f(this._version,this._solution.sid)}return this._taskQueues}});Object.defineProperty(L.prototype,"workers",{get:function(){if(!this._workers){this._workers=new p(this._version,this._solution.sid)}return this._workers}});Object.defineProperty(L.prototype,"workflows",{get:function(){if(!this._workflows){this._workflows=new d(this._version,this._solution.sid)}return this._workflows}});Object.defineProperty(L.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new m(this._version,this._solution.sid)}return this._statistics}});Object.defineProperty(L.prototype,"realTimeStatistics",{get:function(){if(!this._realTimeStatistics){this._realTimeStatistics=new v(this._version,this._solution.sid)}return this._realTimeStatistics}});Object.defineProperty(L.prototype,"cumulativeStatistics",{get:function(){if(!this._cumulativeStatistics){this._cumulativeStatistics=new l(this._version,this._solution.sid)}return this._cumulativeStatistics}});Object.defineProperty(L.prototype,"taskChannels",{get:function(){if(!this._taskChannels){this._taskChannels=new u(this._version,this._solution.sid)}return this._taskChannels}});L.prototype.toJSON=function toJSON(){return this._solution};L.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkspaceList:S,WorkspacePage:b,WorkspaceInstance:w,WorkspaceContext:L}},97497:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ActivityList(t,e){function ActivityListInstance(t){return ActivityListInstance.get(t)}ActivityListInstance._version=t;ActivityListInstance._solution={workspaceSid:e};ActivityListInstance._uri=`/Workspaces/${e}/Activities`;ActivityListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ActivityListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ActivityListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Available:o.get(t,"available"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ActivityListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ActivityListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Available:a.bool(o.get(t,"available"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ActivityListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,t)};ActivityListInstance.toJSON=function toJSON(){return this._solution};ActivityListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ActivityListInstance};f=function ActivityPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ActivityInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.available=e.available;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ActivityContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/Activities/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ActivityList:h,ActivityPage:f,ActivityInstance:p,ActivityContext:d}},23057:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function EventList(t,e){function EventListInstance(t){return EventListInstance.get(t)}EventListInstance._version=t;EventListInstance._solution={workspaceSid:e};EventListInstance._uri=`/Workspaces/${e}/Events`;EventListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EventListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EventListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({EndDate:a.iso8601DateTime(o.get(t,"endDate")),EventType:o.get(t,"eventType"),Minutes:o.get(t,"minutes"),ReservationSid:o.get(t,"reservationSid"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),TaskQueueSid:o.get(t,"taskQueueSid"),TaskSid:o.get(t,"taskSid"),WorkerSid:o.get(t,"workerSid"),WorkflowSid:o.get(t,"workflowSid"),TaskChannel:o.get(t,"taskChannel"),Sid:o.get(t,"sid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EventListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,t)};EventListInstance.toJSON=function toJSON(){return this._solution};EventListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EventListInstance};f=function EventPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function EventInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.actorSid=e.actor_sid;this.actorType=e.actor_type;this.actorUrl=e.actor_url;this.description=e.description;this.eventData=e.event_data;this.eventDate=c.iso8601DateTime(e.event_date);this.eventDateMs=c.integer(e.event_date_ms);this.eventType=e.event_type;this.resourceSid=e.resource_sid;this.resourceType=e.resource_type;this.resourceUrl=e.resource_url;this.sid=e.sid;this.source=e.source;this.sourceIpAddress=e.source_ip_address;this.url=e.url;this.workspaceSid=e.workspace_sid;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function EventContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/Events/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EventList:h,EventPage:f,EventInstance:p,EventContext:d}},57360:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(11600).ReservationList;var a=i(80513);var u=i(6372);var h=i(72142);var f;var p;var d;var l;f=function TaskList(t,e){function TaskListInstance(t){return TaskListInstance.get(t)}TaskListInstance._version=t;TaskListInstance._solution={workspaceSid:e};TaskListInstance._uri=`/Workspaces/${e}/Tasks`;TaskListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Priority:o.get(t,"priority"),AssignmentStatus:u.map(o.get(t,"assignmentStatus"),function(t){return t}),WorkflowSid:o.get(t,"workflowSid"),WorkflowName:o.get(t,"workflowName"),TaskQueueSid:o.get(t,"taskQueueSid"),TaskQueueName:o.get(t,"taskQueueName"),EvaluateTaskAttributes:o.get(t,"evaluateTaskAttributes"),Ordering:o.get(t,"ordering"),HasAddons:u.bool(o.get(t,"hasAddons")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Timeout:o.get(t,"timeout"),Priority:o.get(t,"priority"),TaskChannel:o.get(t,"taskChannel"),WorkflowSid:o.get(t,"workflowSid"),Attributes:o.get(t,"attributes")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskListInstance.get=function get(t){return new l(this._version,this._solution.workspaceSid,t)};TaskListInstance.toJSON=function toJSON(){return this._solution};TaskListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskListInstance};p=function TaskPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,r.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.workspaceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function TaskInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.age=a.integer(e.age);this.assignmentStatus=e.assignment_status;this.attributes=e.attributes;this.addons=e.addons;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.taskQueueEnteredDate=a.iso8601DateTime(e.task_queue_entered_date);this.priority=a.integer(e.priority);this.reason=e.reason;this.sid=e.sid;this.taskQueueSid=e.task_queue_sid;this.taskQueueFriendlyName=e.task_queue_friendly_name;this.taskChannelSid=e.task_channel_sid;this.taskChannelUniqueName=e.task_channel_unique_name;this.timeout=a.integer(e.timeout);this.workflowSid=e.workflow_sid;this.workflowFriendlyName=e.workflow_friendly_name;this.workspaceSid=e.workspace_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.reservations=function reservations(){return this._proxy.reservations};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function TaskContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/Tasks/${i}`;this._reservations=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Attributes:o.get(t,"attributes"),AssignmentStatus:o.get(t,"assignmentStatus"),Reason:o.get(t,"reason"),Priority:o.get(t,"priority"),TaskChannel:o.get(t,"taskChannel")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"reservations",{get:function(){if(!this._reservations){this._reservations=new c(this._version,this._solution.workspaceSid,this._solution.sid)}return this._reservations}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskList:f,TaskPage:p,TaskInstance:d,TaskContext:l}},11600:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ReservationList(t,e,i){function ReservationListInstance(t){return ReservationListInstance.get(t)}ReservationListInstance._version=t;ReservationListInstance._solution={workspaceSid:e,taskSid:i};ReservationListInstance._uri=`/Workspaces/${e}/Tasks/${i}/Reservations`;ReservationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ReservationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ReservationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ReservationStatus:o.get(t,"reservationStatus"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ReservationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ReservationListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,this._solution.taskSid,t)};ReservationListInstance.toJSON=function toJSON(){return this._solution};ReservationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ReservationListInstance};f=function ReservationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid,this._solution.taskSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ReservationInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.reservationStatus=e.reservation_status;this.sid=e.sid;this.taskSid=e.task_sid;this.workerName=e.worker_name;this.workerSid=e.worker_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,taskSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.taskSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ReservationContext(t,e,i,n){this._version=t;this._solution={workspaceSid:e,taskSid:i,sid:n};this._uri=`/Workspaces/${e}/Tasks/${i}/Reservations/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.taskSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ReservationStatus:o.get(t,"reservationStatus"),WorkerActivitySid:o.get(t,"workerActivitySid"),Instruction:o.get(t,"instruction"),DequeuePostWorkActivitySid:o.get(t,"dequeuePostWorkActivitySid"),DequeueFrom:o.get(t,"dequeueFrom"),DequeueRecord:o.get(t,"dequeueRecord"),DequeueTimeout:o.get(t,"dequeueTimeout"),DequeueTo:o.get(t,"dequeueTo"),DequeueStatusCallbackUrl:o.get(t,"dequeueStatusCallbackUrl"),CallFrom:o.get(t,"callFrom"),CallRecord:o.get(t,"callRecord"),CallTimeout:o.get(t,"callTimeout"),CallTo:o.get(t,"callTo"),CallUrl:o.get(t,"callUrl"),CallStatusCallbackUrl:o.get(t,"callStatusCallbackUrl"),CallAccept:a.bool(o.get(t,"callAccept")),RedirectCallSid:o.get(t,"redirectCallSid"),RedirectAccept:a.bool(o.get(t,"redirectAccept")),RedirectUrl:o.get(t,"redirectUrl"),To:o.get(t,"to"),From:o.get(t,"from"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),StatusCallbackEvent:a.map(o.get(t,"statusCallbackEvent"),function(t){return t}),Timeout:o.get(t,"timeout"),Record:a.bool(o.get(t,"record")),Muted:a.bool(o.get(t,"muted")),Beep:o.get(t,"beep"),StartConferenceOnEnter:a.bool(o.get(t,"startConferenceOnEnter")),EndConferenceOnExit:a.bool(o.get(t,"endConferenceOnExit")),WaitUrl:o.get(t,"waitUrl"),WaitMethod:o.get(t,"waitMethod"),EarlyMedia:a.bool(o.get(t,"earlyMedia")),MaxParticipants:o.get(t,"maxParticipants"),ConferenceStatusCallback:o.get(t,"conferenceStatusCallback"),ConferenceStatusCallbackMethod:o.get(t,"conferenceStatusCallbackMethod"),ConferenceStatusCallbackEvent:a.map(o.get(t,"conferenceStatusCallbackEvent"),function(t){return t}),ConferenceRecord:o.get(t,"conferenceRecord"),ConferenceTrim:o.get(t,"conferenceTrim"),RecordingChannels:o.get(t,"recordingChannels"),RecordingStatusCallback:o.get(t,"recordingStatusCallback"),RecordingStatusCallbackMethod:o.get(t,"recordingStatusCallbackMethod"),ConferenceRecordingStatusCallback:o.get(t,"conferenceRecordingStatusCallback"),ConferenceRecordingStatusCallbackMethod:o.get(t,"conferenceRecordingStatusCallbackMethod"),Region:o.get(t,"region"),SipAuthUsername:o.get(t,"sipAuthUsername"),SipAuthPassword:o.get(t,"sipAuthPassword"),DequeueStatusCallbackEvent:a.map(o.get(t,"dequeueStatusCallbackEvent"),function(t){return t}),PostWorkActivitySid:o.get(t,"postWorkActivitySid"),SupervisorMode:o.get(t,"supervisorMode"),Supervisor:o.get(t,"supervisor"),EndConferenceOnCustomerExit:a.bool(o.get(t,"endConferenceOnCustomerExit")),BeepOnCustomerEntrance:a.bool(o.get(t,"beepOnCustomerEntrance"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.taskSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ReservationList:h,ReservationPage:f,ReservationInstance:p,ReservationContext:d}},13250:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function TaskChannelList(t,e){function TaskChannelListInstance(t){return TaskChannelListInstance.get(t)}TaskChannelListInstance._version=t;TaskChannelListInstance._solution={workspaceSid:e};TaskChannelListInstance._uri=`/Workspaces/${e}/TaskChannels`;TaskChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskChannelListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),UniqueName:o.get(t,"uniqueName"),ChannelOptimizedRouting:a.bool(o.get(t,"channelOptimizedRouting"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskChannelListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,t)};TaskChannelListInstance.toJSON=function toJSON(){return this._solution};TaskChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskChannelListInstance};f=function TaskChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskChannelInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.uniqueName=e.unique_name;this.workspaceSid=e.workspace_sid;this.channelOptimizedRouting=e.channel_optimized_routing;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function TaskChannelContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/TaskChannels/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),ChannelOptimizedRouting:a.bool(o.get(t,"channelOptimizedRouting"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskChannelList:h,TaskChannelPage:f,TaskChannelInstance:p,TaskChannelContext:d}},22444:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(53498).TaskQueueCumulativeStatisticsList;var a=i(12822).TaskQueueRealTimeStatisticsList;var u=i(28266).TaskQueueStatisticsList;var h=i(87382).TaskQueuesStatisticsList;var f=i(80513);var p=i(72142);var d;var l;var v;var m;d=function TaskQueueList(t,e){function TaskQueueListInstance(t){return TaskQueueListInstance.get(t)}TaskQueueListInstance._version=t;TaskQueueListInstance._solution={workspaceSid:e};TaskQueueListInstance._uri=`/Workspaces/${e}/TaskQueues`;TaskQueueListInstance._statistics=undefined;TaskQueueListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskQueueListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskQueueListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),EvaluateWorkerAttributes:o.get(t,"evaluateWorkerAttributes"),WorkerSid:o.get(t,"workerSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskQueueListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskQueueListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),TargetWorkers:o.get(t,"targetWorkers"),MaxReservedWorkers:o.get(t,"maxReservedWorkers"),TaskOrder:o.get(t,"taskOrder"),ReservationActivitySid:o.get(t,"reservationActivitySid"),AssignmentActivitySid:o.get(t,"assignmentActivitySid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskQueueListInstance.get=function get(t){return new m(this._version,this._solution.workspaceSid,t)};Object.defineProperty(TaskQueueListInstance,"statistics",{get:function statistics(){if(!this._statistics){this._statistics=new h(this._version,this._solution.workspaceSid)}return this._statistics}});TaskQueueListInstance.toJSON=function toJSON(){return this._solution};TaskQueueListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskQueueListInstance};l=function TaskQueuePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,r.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.workspaceSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function TaskQueueInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assignmentActivitySid=e.assignment_activity_sid;this.assignmentActivityName=e.assignment_activity_name;this.dateCreated=f.iso8601DateTime(e.date_created);this.dateUpdated=f.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.maxReservedWorkers=f.integer(e.max_reserved_workers);this.reservationActivitySid=e.reservation_activity_sid;this.reservationActivityName=e.reservation_activity_name;this.sid=e.sid;this.targetWorkers=e.target_workers;this.taskOrder=e.task_order;this.url=e.url;this.workspaceSid=e.workspace_sid;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.remove=function remove(t){return this._proxy.remove(t)};v.prototype.statistics=function statistics(){return this._proxy.statistics};v.prototype.realTimeStatistics=function realTimeStatistics(){return this._proxy.realTimeStatistics};v.prototype.cumulativeStatistics=function cumulativeStatistics(){return this._proxy.cumulativeStatistics};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function TaskQueueContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/TaskQueues/${i}`;this._statistics=undefined;this._realTimeStatistics=undefined;this._cumulativeStatistics=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({FriendlyName:o.get(t,"friendlyName"),TargetWorkers:o.get(t,"targetWorkers"),ReservationActivitySid:o.get(t,"reservationActivitySid"),AssignmentActivitySid:o.get(t,"assignmentActivitySid"),MaxReservedWorkers:o.get(t,"maxReservedWorkers"),TaskOrder:o.get(t,"taskOrder")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};m.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(m.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new u(this._version,this._solution.workspaceSid,this._solution.sid)}return this._statistics}});Object.defineProperty(m.prototype,"realTimeStatistics",{get:function(){if(!this._realTimeStatistics){this._realTimeStatistics=new a(this._version,this._solution.workspaceSid,this._solution.sid)}return this._realTimeStatistics}});Object.defineProperty(m.prototype,"cumulativeStatistics",{get:function(){if(!this._cumulativeStatistics){this._cumulativeStatistics=new c(this._version,this._solution.workspaceSid,this._solution.sid)}return this._cumulativeStatistics}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskQueueList:d,TaskQueuePage:l,TaskQueueInstance:v,TaskQueueContext:m}},53498:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function TaskQueueCumulativeStatisticsList(t,e,i){function TaskQueueCumulativeStatisticsListInstance(t){return TaskQueueCumulativeStatisticsListInstance.get(t)}TaskQueueCumulativeStatisticsListInstance._version=t;TaskQueueCumulativeStatisticsListInstance._solution={workspaceSid:e,taskQueueSid:i};TaskQueueCumulativeStatisticsListInstance.get=function get(){return new d(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)};TaskQueueCumulativeStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskQueueCumulativeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskQueueCumulativeStatisticsListInstance};f=function TaskQueueCumulativeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskQueueCumulativeStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.avgTaskAcceptanceTime=c.integer(e.avg_task_acceptance_time);this.startTime=c.iso8601DateTime(e.start_time);this.endTime=c.iso8601DateTime(e.end_time);this.reservationsCreated=c.integer(e.reservations_created);this.reservationsAccepted=c.integer(e.reservations_accepted);this.reservationsRejected=c.integer(e.reservations_rejected);this.reservationsTimedOut=c.integer(e.reservations_timed_out);this.reservationsCanceled=c.integer(e.reservations_canceled);this.reservationsRescinded=c.integer(e.reservations_rescinded);this.splitByWaitTime=e.split_by_wait_time;this.taskQueueSid=e.task_queue_sid;this.waitDurationUntilAccepted=e.wait_duration_until_accepted;this.waitDurationUntilCanceled=e.wait_duration_until_canceled;this.waitDurationInQueueUntilAccepted=e.wait_duration_in_queue_until_accepted;this.tasksCanceled=c.integer(e.tasks_canceled);this.tasksCompleted=c.integer(e.tasks_completed);this.tasksDeleted=c.integer(e.tasks_deleted);this.tasksEntered=c.integer(e.tasks_entered);this.tasksMoved=c.integer(e.tasks_moved);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,taskQueueSid:n}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)}return this._context}});p.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function TaskQueueCumulativeStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,taskQueueSid:i};this._uri=`/Workspaces/${e}/TaskQueues/${i}/CumulativeStatistics`};d.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({EndDate:a.iso8601DateTime(o.get(t,"endDate")),Minutes:o.get(t,"minutes"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskQueueCumulativeStatisticsList:h,TaskQueueCumulativeStatisticsPage:f,TaskQueueCumulativeStatisticsInstance:p,TaskQueueCumulativeStatisticsContext:d}},12822:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function TaskQueueRealTimeStatisticsList(t,e,i){function TaskQueueRealTimeStatisticsListInstance(t){return TaskQueueRealTimeStatisticsListInstance.get(t)}TaskQueueRealTimeStatisticsListInstance._version=t;TaskQueueRealTimeStatisticsListInstance._solution={workspaceSid:e,taskQueueSid:i};TaskQueueRealTimeStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)};TaskQueueRealTimeStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskQueueRealTimeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskQueueRealTimeStatisticsListInstance};h=function TaskQueueRealTimeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskQueueRealTimeStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.activityStatistics=e.activity_statistics;this.longestTaskWaitingAge=c.integer(e.longest_task_waiting_age);this.longestTaskWaitingSid=e.longest_task_waiting_sid;this.longestRelativeTaskAgeInQueue=c.integer(e.longest_relative_task_age_in_queue);this.longestRelativeTaskSidInQueue=e.longest_relative_task_sid_in_queue;this.taskQueueSid=e.task_queue_sid;this.tasksByPriority=e.tasks_by_priority;this.tasksByStatus=e.tasks_by_status;this.totalAvailableWorkers=c.integer(e.total_available_workers);this.totalEligibleWorkers=c.integer(e.total_eligible_workers);this.totalTasks=c.integer(e.total_tasks);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,taskQueueSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskQueueRealTimeStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,taskQueueSid:i};this._uri=`/Workspaces/${e}/TaskQueues/${i}/RealTimeStatistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskQueueRealTimeStatisticsList:u,TaskQueueRealTimeStatisticsPage:h,TaskQueueRealTimeStatisticsInstance:f,TaskQueueRealTimeStatisticsContext:p}},28266:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function TaskQueueStatisticsList(t,e,i){function TaskQueueStatisticsListInstance(t){return TaskQueueStatisticsListInstance.get(t)}TaskQueueStatisticsListInstance._version=t;TaskQueueStatisticsListInstance._solution={workspaceSid:e,taskQueueSid:i};TaskQueueStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)};TaskQueueStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskQueueStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskQueueStatisticsListInstance};h=function TaskQueueStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskQueueStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.cumulative=e.cumulative;this.realtime=e.realtime;this.taskQueueSid=e.task_queue_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,taskQueueSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid,this._solution.taskQueueSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function TaskQueueStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,taskQueueSid:i};this._uri=`/Workspaces/${e}/TaskQueues/${i}/Statistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({EndDate:c.iso8601DateTime(o.get(t,"endDate")),Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid,this._solution.taskQueueSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskQueueStatisticsList:u,TaskQueueStatisticsPage:h,TaskQueueStatisticsInstance:f,TaskQueueStatisticsContext:p}},87382:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;u=function TaskQueuesStatisticsList(t,e){function TaskQueuesStatisticsListInstance(t){return TaskQueuesStatisticsListInstance.get(t)}TaskQueuesStatisticsListInstance._version=t;TaskQueuesStatisticsListInstance._solution={workspaceSid:e};TaskQueuesStatisticsListInstance._uri=`/Workspaces/${e}/TaskQueues/Statistics`;TaskQueuesStatisticsListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TaskQueuesStatisticsListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TaskQueuesStatisticsListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({EndDate:c.iso8601DateTime(o.get(t,"endDate")),FriendlyName:o.get(t,"friendlyName"),Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskQueuesStatisticsListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TaskQueuesStatisticsListInstance.toJSON=function toJSON(){return this._solution};TaskQueuesStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TaskQueuesStatisticsListInstance};h=function TaskQueuesStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function TaskQueuesStatisticsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.cumulative=e.cumulative;this.realtime=e.realtime;this.taskQueueSid=e.task_queue_sid;this.workspaceSid=e.workspace_sid;this._context=undefined;this._solution={workspaceSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TaskQueuesStatisticsList:u,TaskQueuesStatisticsPage:h,TaskQueuesStatisticsInstance:f}},12752:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(61747).ReservationList;var a=i(30781).WorkerChannelList;var u=i(26500).WorkerStatisticsList;var h=i(62308).WorkersCumulativeStatisticsList;var f=i(98231).WorkersRealTimeStatisticsList;var p=i(2858).WorkersStatisticsList;var d=i(80513);var l=i(6372);var v=i(72142);var m;var _;var g;var y;m=function WorkerList(t,e){function WorkerListInstance(t){return WorkerListInstance.get(t)}WorkerListInstance._version=t;WorkerListInstance._solution={workspaceSid:e};WorkerListInstance._uri=`/Workspaces/${e}/Workers`;WorkerListInstance._statistics=undefined;WorkerListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WorkerListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WorkerListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=v.of({ActivityName:o.get(t,"activityName"),ActivitySid:o.get(t,"activitySid"),Available:o.get(t,"available"),FriendlyName:o.get(t,"friendlyName"),TargetWorkersExpression:o.get(t,"targetWorkersExpression"),TaskQueueName:o.get(t,"taskQueueName"),TaskQueueSid:o.get(t,"taskQueueSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new _(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkerListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new _(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkerListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=v.of({FriendlyName:o.get(t,"friendlyName"),ActivitySid:o.get(t,"activitySid"),Attributes:o.get(t,"attributes")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new g(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkerListInstance.get=function get(t){return new y(this._version,this._solution.workspaceSid,t)};Object.defineProperty(WorkerListInstance,"statistics",{get:function statistics(){if(!this._statistics){this._statistics=new p(this._version,this._solution.workspaceSid)}return this._statistics}});WorkerListInstance.toJSON=function toJSON(){return this._solution};WorkerListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkerListInstance};_=function WorkerPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(_.prototype,r.prototype);_.prototype.constructor=_;_.prototype.getInstance=function getInstance(t){return new g(this._version,t,this._solution.workspaceSid)};_.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};g=function WorkerInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.activityName=e.activity_name;this.activitySid=e.activity_sid;this.attributes=e.attributes;this.available=e.available;this.dateCreated=d.iso8601DateTime(e.date_created);this.dateStatusChanged=d.iso8601DateTime(e.date_status_changed);this.dateUpdated=d.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.sid=e.sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(g.prototype,"_proxy",{get:function(){if(!this._context){this._context=new y(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});g.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};g.prototype.update=function update(t,e){return this._proxy.update(t,e)};g.prototype.remove=function remove(t){return this._proxy.remove(t)};g.prototype.realTimeStatistics=function realTimeStatistics(){return this._proxy.realTimeStatistics};g.prototype.cumulativeStatistics=function cumulativeStatistics(){return this._proxy.cumulativeStatistics};g.prototype.statistics=function statistics(){return this._proxy.statistics};g.prototype.reservations=function reservations(){return this._proxy.reservations};g.prototype.workerChannels=function workerChannels(){return this._proxy.workerChannels};g.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};g.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};y=function WorkerContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/Workers/${i}`;this._realTimeStatistics=undefined;this._cumulativeStatistics=undefined;this._statistics=undefined;this._reservations=undefined;this._workerChannels=undefined};y.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new g(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};y.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=v.of({ActivitySid:o.get(t,"activitySid"),Attributes:o.get(t,"attributes"),FriendlyName:o.get(t,"friendlyName"),RejectPendingReservations:l.bool(o.get(t,"rejectPendingReservations"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new g(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};y.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(y.prototype,"realTimeStatistics",{get:function(){if(!this._realTimeStatistics){this._realTimeStatistics=new f(this._version,this._solution.workspaceSid)}return this._realTimeStatistics}});Object.defineProperty(y.prototype,"cumulativeStatistics",{get:function(){if(!this._cumulativeStatistics){this._cumulativeStatistics=new h(this._version,this._solution.workspaceSid)}return this._cumulativeStatistics}});Object.defineProperty(y.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new u(this._version,this._solution.workspaceSid,this._solution.sid)}return this._statistics}});Object.defineProperty(y.prototype,"reservations",{get:function(){if(!this._reservations){this._reservations=new c(this._version,this._solution.workspaceSid,this._solution.sid)}return this._reservations}});Object.defineProperty(y.prototype,"workerChannels",{get:function(){if(!this._workerChannels){this._workerChannels=new a(this._version,this._solution.workspaceSid,this._solution.sid)}return this._workerChannels}});y.prototype.toJSON=function toJSON(){return this._solution};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkerList:m,WorkerPage:_,WorkerInstance:g,WorkerContext:y}},61747:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ReservationList(t,e,i){function ReservationListInstance(t){return ReservationListInstance.get(t)}ReservationListInstance._version=t;ReservationListInstance._solution={workspaceSid:e,workerSid:i};ReservationListInstance._uri=`/Workspaces/${e}/Workers/${i}/Reservations`;ReservationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ReservationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ReservationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ReservationStatus:o.get(t,"reservationStatus"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ReservationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ReservationListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,this._solution.workerSid,t)};ReservationListInstance.toJSON=function toJSON(){return this._solution};ReservationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ReservationListInstance};f=function ReservationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ReservationInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.reservationStatus=e.reservation_status;this.sid=e.sid;this.taskSid=e.task_sid;this.workerName=e.worker_name;this.workerSid=e.worker_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,workerSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ReservationContext(t,e,i,n){this._version=t;this._solution={workspaceSid:e,workerSid:i,sid:n};this._uri=`/Workspaces/${e}/Workers/${i}/Reservations/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({ReservationStatus:o.get(t,"reservationStatus"),WorkerActivitySid:o.get(t,"workerActivitySid"),Instruction:o.get(t,"instruction"),DequeuePostWorkActivitySid:o.get(t,"dequeuePostWorkActivitySid"),DequeueFrom:o.get(t,"dequeueFrom"),DequeueRecord:o.get(t,"dequeueRecord"),DequeueTimeout:o.get(t,"dequeueTimeout"),DequeueTo:o.get(t,"dequeueTo"),DequeueStatusCallbackUrl:o.get(t,"dequeueStatusCallbackUrl"),CallFrom:o.get(t,"callFrom"),CallRecord:o.get(t,"callRecord"),CallTimeout:o.get(t,"callTimeout"),CallTo:o.get(t,"callTo"),CallUrl:o.get(t,"callUrl"),CallStatusCallbackUrl:o.get(t,"callStatusCallbackUrl"),CallAccept:a.bool(o.get(t,"callAccept")),RedirectCallSid:o.get(t,"redirectCallSid"),RedirectAccept:a.bool(o.get(t,"redirectAccept")),RedirectUrl:o.get(t,"redirectUrl"),To:o.get(t,"to"),From:o.get(t,"from"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),StatusCallbackEvent:a.map(o.get(t,"statusCallbackEvent"),function(t){return t}),Timeout:o.get(t,"timeout"),Record:a.bool(o.get(t,"record")),Muted:a.bool(o.get(t,"muted")),Beep:o.get(t,"beep"),StartConferenceOnEnter:a.bool(o.get(t,"startConferenceOnEnter")),EndConferenceOnExit:a.bool(o.get(t,"endConferenceOnExit")),WaitUrl:o.get(t,"waitUrl"),WaitMethod:o.get(t,"waitMethod"),EarlyMedia:a.bool(o.get(t,"earlyMedia")),MaxParticipants:o.get(t,"maxParticipants"),ConferenceStatusCallback:o.get(t,"conferenceStatusCallback"),ConferenceStatusCallbackMethod:o.get(t,"conferenceStatusCallbackMethod"),ConferenceStatusCallbackEvent:a.map(o.get(t,"conferenceStatusCallbackEvent"),function(t){return t}),ConferenceRecord:o.get(t,"conferenceRecord"),ConferenceTrim:o.get(t,"conferenceTrim"),RecordingChannels:o.get(t,"recordingChannels"),RecordingStatusCallback:o.get(t,"recordingStatusCallback"),RecordingStatusCallbackMethod:o.get(t,"recordingStatusCallbackMethod"),ConferenceRecordingStatusCallback:o.get(t,"conferenceRecordingStatusCallback"),ConferenceRecordingStatusCallbackMethod:o.get(t,"conferenceRecordingStatusCallbackMethod"),Region:o.get(t,"region"),SipAuthUsername:o.get(t,"sipAuthUsername"),SipAuthPassword:o.get(t,"sipAuthPassword"),DequeueStatusCallbackEvent:a.map(o.get(t,"dequeueStatusCallbackEvent"),function(t){return t}),PostWorkActivitySid:o.get(t,"postWorkActivitySid"),EndConferenceOnCustomerExit:a.bool(o.get(t,"endConferenceOnCustomerExit")),BeepOnCustomerEntrance:a.bool(o.get(t,"beepOnCustomerEntrance"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ReservationList:h,ReservationPage:f,ReservationInstance:p,ReservationContext:d}},30781:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WorkerChannelList(t,e,i){function WorkerChannelListInstance(t){return WorkerChannelListInstance.get(t)}WorkerChannelListInstance._version=t;WorkerChannelListInstance._solution={workspaceSid:e,workerSid:i};WorkerChannelListInstance._uri=`/Workspaces/${e}/Workers/${i}/Channels`;WorkerChannelListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WorkerChannelListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WorkerChannelListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkerChannelListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkerChannelListInstance.get=function get(t){return new d(this._version,this._solution.workspaceSid,this._solution.workerSid,t)};WorkerChannelListInstance.toJSON=function toJSON(){return this._solution};WorkerChannelListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkerChannelListInstance};f=function WorkerChannelPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkerChannelInstance(t,e,i,n,o){this._version=t;this.accountSid=e.account_sid;this.assignedTasks=c.integer(e.assigned_tasks);this.available=e.available;this.availableCapacityPercentage=c.integer(e.available_capacity_percentage);this.configuredCapacity=c.integer(e.configured_capacity);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.sid=e.sid;this.taskChannelSid=e.task_channel_sid;this.taskChannelUniqueName=e.task_channel_unique_name;this.workerSid=e.worker_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,workerSid:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WorkerChannelContext(t,e,i,n){this._version=t;this._solution={workspaceSid:e,workerSid:i,sid:n};this._uri=`/Workspaces/${e}/Workers/${i}/Channels/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Capacity:o.get(t,"capacity"),Available:a.bool(o.get(t,"available"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.workerSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkerChannelList:h,WorkerChannelPage:f,WorkerChannelInstance:p,WorkerChannelContext:d}},26500:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function WorkerStatisticsList(t,e,i){function WorkerStatisticsListInstance(t){return WorkerStatisticsListInstance.get(t)}WorkerStatisticsListInstance._version=t;WorkerStatisticsListInstance._solution={workspaceSid:e,workerSid:i};WorkerStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid,this._solution.workerSid)};WorkerStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkerStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkerStatisticsListInstance};h=function WorkerStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid,this._solution.workerSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkerStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.cumulative=e.cumulative;this.workerSid=e.worker_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,workerSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid,this._solution.workerSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkerStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,workerSid:i};this._uri=`/Workspaces/${e}/Workers/${i}/Statistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),EndDate:c.iso8601DateTime(o.get(t,"endDate")),TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid,this._solution.workerSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkerStatisticsList:u,WorkerStatisticsPage:h,WorkerStatisticsInstance:f,WorkerStatisticsContext:p}},62308:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WorkersCumulativeStatisticsList(t,e){function WorkersCumulativeStatisticsListInstance(t){return WorkersCumulativeStatisticsListInstance.get(t)}WorkersCumulativeStatisticsListInstance._version=t;WorkersCumulativeStatisticsListInstance._solution={workspaceSid:e};WorkersCumulativeStatisticsListInstance.get=function get(){return new d(this._version,this._solution.workspaceSid)};WorkersCumulativeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkersCumulativeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkersCumulativeStatisticsListInstance};f=function WorkersCumulativeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkersCumulativeStatisticsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.startTime=c.iso8601DateTime(e.start_time);this.endTime=c.iso8601DateTime(e.end_time);this.activityDurations=e.activity_durations;this.reservationsCreated=c.integer(e.reservations_created);this.reservationsAccepted=c.integer(e.reservations_accepted);this.reservationsRejected=c.integer(e.reservations_rejected);this.reservationsTimedOut=c.integer(e.reservations_timed_out);this.reservationsCanceled=c.integer(e.reservations_canceled);this.reservationsRescinded=c.integer(e.reservations_rescinded);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid)}return this._context}});p.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WorkersCumulativeStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/Workers/CumulativeStatistics`};d.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({EndDate:a.iso8601DateTime(o.get(t,"endDate")),Minutes:o.get(t,"minutes"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkersCumulativeStatisticsList:h,WorkersCumulativeStatisticsPage:f,WorkersCumulativeStatisticsInstance:p,WorkersCumulativeStatisticsContext:d}},98231:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function WorkersRealTimeStatisticsList(t,e){function WorkersRealTimeStatisticsListInstance(t){return WorkersRealTimeStatisticsListInstance.get(t)}WorkersRealTimeStatisticsListInstance._version=t;WorkersRealTimeStatisticsListInstance._solution={workspaceSid:e};WorkersRealTimeStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid)};WorkersRealTimeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkersRealTimeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkersRealTimeStatisticsListInstance};h=function WorkersRealTimeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkersRealTimeStatisticsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.activityStatistics=e.activity_statistics;this.totalWorkers=c.integer(e.total_workers);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkersRealTimeStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/Workers/RealTimeStatistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkersRealTimeStatisticsList:u,WorkersRealTimeStatisticsPage:h,WorkersRealTimeStatisticsInstance:f,WorkersRealTimeStatisticsContext:p}},2858:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function WorkersStatisticsList(t,e){function WorkersStatisticsListInstance(t){return WorkersStatisticsListInstance.get(t)}WorkersStatisticsListInstance._version=t;WorkersStatisticsListInstance._solution={workspaceSid:e};WorkersStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid)};WorkersStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkersStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkersStatisticsListInstance};h=function WorkersStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkersStatisticsInstance(t,e,i){this._version=t;this.realtime=e.realtime;this.cumulative=e.cumulative;this.accountSid=e.account_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkersStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/Workers/Statistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),EndDate:c.iso8601DateTime(o.get(t,"endDate")),TaskQueueSid:o.get(t,"taskQueueSid"),TaskQueueName:o.get(t,"taskQueueName"),FriendlyName:o.get(t,"friendlyName"),TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkersStatisticsList:u,WorkersStatisticsPage:h,WorkersStatisticsInstance:f,WorkersStatisticsContext:p}},66765:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(5086).WorkflowCumulativeStatisticsList;var a=i(74660).WorkflowRealTimeStatisticsList;var u=i(435).WorkflowStatisticsList;var h=i(80513);var f=i(72142);var p;var d;var l;var v;p=function WorkflowList(t,e){function WorkflowListInstance(t){return WorkflowListInstance.get(t)}WorkflowListInstance._version=t;WorkflowListInstance._solution={workspaceSid:e};WorkflowListInstance._uri=`/Workspaces/${e}/Workflows`;WorkflowListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WorkflowListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WorkflowListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkflowListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new d(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkflowListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.configuration)){throw new Error('Required parameter "opts.configuration" missing.')}var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),Configuration:o.get(t,"configuration"),AssignmentCallbackUrl:o.get(t,"assignmentCallbackUrl"),FallbackAssignmentCallbackUrl:o.get(t,"fallbackAssignmentCallbackUrl"),TaskReservationTimeout:o.get(t,"taskReservationTimeout")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WorkflowListInstance.get=function get(t){return new v(this._version,this._solution.workspaceSid,t)};WorkflowListInstance.toJSON=function toJSON(){return this._solution};WorkflowListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkflowListInstance};d=function WorkflowPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(d.prototype,r.prototype);d.prototype.constructor=d;d.prototype.getInstance=function getInstance(t){return new l(this._version,t,this._solution.workspaceSid)};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function WorkflowInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.assignmentCallbackUrl=e.assignment_callback_url;this.configuration=e.configuration;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.documentContentType=e.document_content_type;this.fallbackAssignmentCallbackUrl=e.fallback_assignment_callback_url;this.friendlyName=e.friendly_name;this.sid=e.sid;this.taskReservationTimeout=h.integer(e.task_reservation_timeout);this.workspaceSid=e.workspace_sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={workspaceSid:i,sid:n||this.sid}};Object.defineProperty(l.prototype,"_proxy",{get:function(){if(!this._context){this._context=new v(this._version,this._solution.workspaceSid,this._solution.sid)}return this._context}});l.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};l.prototype.update=function update(t,e){return this._proxy.update(t,e)};l.prototype.remove=function remove(t){return this._proxy.remove(t)};l.prototype.statistics=function statistics(){return this._proxy.statistics};l.prototype.realTimeStatistics=function realTimeStatistics(){return this._proxy.realTimeStatistics};l.prototype.cumulativeStatistics=function cumulativeStatistics(){return this._proxy.cumulativeStatistics};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function WorkflowContext(t,e,i){this._version=t;this._solution={workspaceSid:e,sid:i};this._uri=`/Workspaces/${e}/Workflows/${i}`;this._statistics=undefined;this._realTimeStatistics=undefined;this._cumulativeStatistics=undefined};v.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new l(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};v.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=f.of({FriendlyName:o.get(t,"friendlyName"),AssignmentCallbackUrl:o.get(t,"assignmentCallbackUrl"),FallbackAssignmentCallbackUrl:o.get(t,"fallbackAssignmentCallbackUrl"),Configuration:o.get(t,"configuration"),TaskReservationTimeout:o.get(t,"taskReservationTimeout"),ReEvaluateTasks:o.get(t,"reEvaluateTasks")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution.workspaceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};v.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(v.prototype,"statistics",{get:function(){if(!this._statistics){this._statistics=new u(this._version,this._solution.workspaceSid,this._solution.sid)}return this._statistics}});Object.defineProperty(v.prototype,"realTimeStatistics",{get:function(){if(!this._realTimeStatistics){this._realTimeStatistics=new a(this._version,this._solution.workspaceSid,this._solution.sid)}return this._realTimeStatistics}});Object.defineProperty(v.prototype,"cumulativeStatistics",{get:function(){if(!this._cumulativeStatistics){this._cumulativeStatistics=new c(this._version,this._solution.workspaceSid,this._solution.sid)}return this._cumulativeStatistics}});v.prototype.toJSON=function toJSON(){return this._solution};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkflowList:p,WorkflowPage:d,WorkflowInstance:l,WorkflowContext:v}},5086:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WorkflowCumulativeStatisticsList(t,e,i){function WorkflowCumulativeStatisticsListInstance(t){return WorkflowCumulativeStatisticsListInstance.get(t)}WorkflowCumulativeStatisticsListInstance._version=t;WorkflowCumulativeStatisticsListInstance._solution={workspaceSid:e,workflowSid:i};WorkflowCumulativeStatisticsListInstance.get=function get(){return new d(this._version,this._solution.workspaceSid,this._solution.workflowSid)};WorkflowCumulativeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkflowCumulativeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkflowCumulativeStatisticsListInstance};f=function WorkflowCumulativeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid,this._solution.workflowSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkflowCumulativeStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.avgTaskAcceptanceTime=c.integer(e.avg_task_acceptance_time);this.startTime=c.iso8601DateTime(e.start_time);this.endTime=c.iso8601DateTime(e.end_time);this.reservationsCreated=c.integer(e.reservations_created);this.reservationsAccepted=c.integer(e.reservations_accepted);this.reservationsRejected=c.integer(e.reservations_rejected);this.reservationsTimedOut=c.integer(e.reservations_timed_out);this.reservationsCanceled=c.integer(e.reservations_canceled);this.reservationsRescinded=c.integer(e.reservations_rescinded);this.splitByWaitTime=e.split_by_wait_time;this.waitDurationUntilAccepted=e.wait_duration_until_accepted;this.waitDurationUntilCanceled=e.wait_duration_until_canceled;this.tasksCanceled=c.integer(e.tasks_canceled);this.tasksCompleted=c.integer(e.tasks_completed);this.tasksEntered=c.integer(e.tasks_entered);this.tasksDeleted=c.integer(e.tasks_deleted);this.tasksMoved=c.integer(e.tasks_moved);this.tasksTimedOutInWorkflow=c.integer(e.tasks_timed_out_in_workflow);this.workflowSid=e.workflow_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,workflowSid:n}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid,this._solution.workflowSid)}return this._context}});p.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WorkflowCumulativeStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,workflowSid:i};this._uri=`/Workspaces/${e}/Workflows/${i}/CumulativeStatistics`};d.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({EndDate:a.iso8601DateTime(o.get(t,"endDate")),Minutes:o.get(t,"minutes"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid,this._solution.workflowSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkflowCumulativeStatisticsList:h,WorkflowCumulativeStatisticsPage:f,WorkflowCumulativeStatisticsInstance:p,WorkflowCumulativeStatisticsContext:d}},74660:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function WorkflowRealTimeStatisticsList(t,e,i){function WorkflowRealTimeStatisticsListInstance(t){return WorkflowRealTimeStatisticsListInstance.get(t)}WorkflowRealTimeStatisticsListInstance._version=t;WorkflowRealTimeStatisticsListInstance._solution={workspaceSid:e,workflowSid:i};WorkflowRealTimeStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid,this._solution.workflowSid)};WorkflowRealTimeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkflowRealTimeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkflowRealTimeStatisticsListInstance};h=function WorkflowRealTimeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid,this._solution.workflowSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkflowRealTimeStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.longestTaskWaitingAge=c.integer(e.longest_task_waiting_age);this.longestTaskWaitingSid=e.longest_task_waiting_sid;this.tasksByPriority=e.tasks_by_priority;this.tasksByStatus=e.tasks_by_status;this.totalTasks=c.integer(e.total_tasks);this.workflowSid=e.workflow_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,workflowSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid,this._solution.workflowSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkflowRealTimeStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,workflowSid:i};this._uri=`/Workspaces/${e}/Workflows/${i}/RealTimeStatistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid,this._solution.workflowSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkflowRealTimeStatisticsList:u,WorkflowRealTimeStatisticsPage:h,WorkflowRealTimeStatisticsInstance:f,WorkflowRealTimeStatisticsContext:p}},435:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function WorkflowStatisticsList(t,e,i){function WorkflowStatisticsListInstance(t){return WorkflowStatisticsListInstance.get(t)}WorkflowStatisticsListInstance._version=t;WorkflowStatisticsListInstance._solution={workspaceSid:e,workflowSid:i};WorkflowStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid,this._solution.workflowSid)};WorkflowStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkflowStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkflowStatisticsListInstance};h=function WorkflowStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid,this._solution.workflowSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkflowStatisticsInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.cumulative=e.cumulative;this.realtime=e.realtime;this.workflowSid=e.workflow_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i,workflowSid:n}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid,this._solution.workflowSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkflowStatisticsContext(t,e,i){this._version=t;this._solution={workspaceSid:e,workflowSid:i};this._uri=`/Workspaces/${e}/Workflows/${i}/Statistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),EndDate:c.iso8601DateTime(o.get(t,"endDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid,this._solution.workflowSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkflowStatisticsList:u,WorkflowStatisticsPage:h,WorkflowStatisticsInstance:f,WorkflowStatisticsContext:p}},47678:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WorkspaceCumulativeStatisticsList(t,e){function WorkspaceCumulativeStatisticsListInstance(t){return WorkspaceCumulativeStatisticsListInstance.get(t)}WorkspaceCumulativeStatisticsListInstance._version=t;WorkspaceCumulativeStatisticsListInstance._solution={workspaceSid:e};WorkspaceCumulativeStatisticsListInstance.get=function get(){return new d(this._version,this._solution.workspaceSid)};WorkspaceCumulativeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkspaceCumulativeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkspaceCumulativeStatisticsListInstance};f=function WorkspaceCumulativeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.workspaceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkspaceCumulativeStatisticsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.avgTaskAcceptanceTime=c.integer(e.avg_task_acceptance_time);this.startTime=c.iso8601DateTime(e.start_time);this.endTime=c.iso8601DateTime(e.end_time);this.reservationsCreated=c.integer(e.reservations_created);this.reservationsAccepted=c.integer(e.reservations_accepted);this.reservationsRejected=c.integer(e.reservations_rejected);this.reservationsTimedOut=c.integer(e.reservations_timed_out);this.reservationsCanceled=c.integer(e.reservations_canceled);this.reservationsRescinded=c.integer(e.reservations_rescinded);this.splitByWaitTime=e.split_by_wait_time;this.waitDurationUntilAccepted=e.wait_duration_until_accepted;this.waitDurationUntilCanceled=e.wait_duration_until_canceled;this.tasksCanceled=c.integer(e.tasks_canceled);this.tasksCompleted=c.integer(e.tasks_completed);this.tasksCreated=c.integer(e.tasks_created);this.tasksDeleted=c.integer(e.tasks_deleted);this.tasksMoved=c.integer(e.tasks_moved);this.tasksTimedOutInWorkflow=c.integer(e.tasks_timed_out_in_workflow);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.workspaceSid)}return this._context}});p.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WorkspaceCumulativeStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/CumulativeStatistics`};d.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({EndDate:a.iso8601DateTime(o.get(t,"endDate")),Minutes:o.get(t,"minutes"),StartDate:a.iso8601DateTime(o.get(t,"startDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkspaceCumulativeStatisticsList:h,WorkspaceCumulativeStatisticsPage:f,WorkspaceCumulativeStatisticsInstance:p,WorkspaceCumulativeStatisticsContext:d}},5751:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function WorkspaceRealTimeStatisticsList(t,e){function WorkspaceRealTimeStatisticsListInstance(t){return WorkspaceRealTimeStatisticsListInstance.get(t)}WorkspaceRealTimeStatisticsListInstance._version=t;WorkspaceRealTimeStatisticsListInstance._solution={workspaceSid:e};WorkspaceRealTimeStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid)};WorkspaceRealTimeStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkspaceRealTimeStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkspaceRealTimeStatisticsListInstance};h=function WorkspaceRealTimeStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkspaceRealTimeStatisticsInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.activityStatistics=e.activity_statistics;this.longestTaskWaitingAge=c.integer(e.longest_task_waiting_age);this.longestTaskWaitingSid=e.longest_task_waiting_sid;this.tasksByPriority=e.tasks_by_priority;this.tasksByStatus=e.tasks_by_status;this.totalTasks=c.integer(e.total_tasks);this.totalWorkers=c.integer(e.total_workers);this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkspaceRealTimeStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/RealTimeStatistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({TaskChannel:o.get(t,"taskChannel")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkspaceRealTimeStatisticsList:u,WorkspaceRealTimeStatisticsPage:h,WorkspaceRealTimeStatisticsInstance:f,WorkspaceRealTimeStatisticsContext:p}},52593:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function WorkspaceStatisticsList(t,e){function WorkspaceStatisticsListInstance(t){return WorkspaceStatisticsListInstance.get(t)}WorkspaceStatisticsListInstance._version=t;WorkspaceStatisticsListInstance._solution={workspaceSid:e};WorkspaceStatisticsListInstance.get=function get(){return new p(this._version,this._solution.workspaceSid)};WorkspaceStatisticsListInstance.toJSON=function toJSON(){return this._solution};WorkspaceStatisticsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WorkspaceStatisticsListInstance};h=function WorkspaceStatisticsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.workspaceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function WorkspaceStatisticsInstance(t,e,i){this._version=t;this.realtime=e.realtime;this.cumulative=e.cumulative;this.accountSid=e.account_sid;this.workspaceSid=e.workspace_sid;this.url=e.url;this._context=undefined;this._solution={workspaceSid:i}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.workspaceSid)}return this._context}});f.prototype.fetch=function fetch(t,e){return this._proxy.fetch(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WorkspaceStatisticsContext(t,e){this._version=t;this._solution={workspaceSid:e};this._uri=`/Workspaces/${e}/Statistics`};p.prototype.fetch=function fetch(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Minutes:o.get(t,"minutes"),StartDate:c.iso8601DateTime(o.get(t,"startDate")),EndDate:c.iso8601DateTime(o.get(t,"endDate")),TaskChannel:o.get(t,"taskChannel"),SplitByWaitTime:o.get(t,"splitByWaitTime")});var r=this._version.fetch({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.workspaceSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WorkspaceStatisticsList:u,WorkspaceStatisticsPage:h,WorkspaceStatisticsInstance:f,WorkspaceStatisticsContext:p}},99996:(t,e,i)=>{"use strict";var n=i(90250);var o=i(59242).TrunkList;var s=i(64351);function V1(t){s.prototype.constructor.call(this,t,"v1");this._trunks=undefined}n.extend(V1.prototype,s.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"trunks",{get:function(){this._trunks=this._trunks||new o(this);return this._trunks}});t.exports=V1},59242:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(85327).CredentialListList;var c=i(33779).IpAccessControlListList;var a=i(11093).OriginationUrlList;var u=i(60938);var h=i(17471).PhoneNumberList;var f=i(17126).RecordingList;var p=i(80513);var d=i(6372);var l=i(72142);var v;var m;var _;var g;v=function TrunkList(t){function TrunkListInstance(t){return TrunkListInstance.get(t)}TrunkListInstance._version=t;TrunkListInstance._solution={};TrunkListInstance._uri=`/Trunks`;TrunkListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=l.of({FriendlyName:o.get(t,"friendlyName"),DomainName:o.get(t,"domainName"),DisasterRecoveryUrl:o.get(t,"disasterRecoveryUrl"),DisasterRecoveryMethod:o.get(t,"disasterRecoveryMethod"),TransferMode:o.get(t,"transferMode"),Secure:d.bool(o.get(t,"secure")),CnamLookupEnabled:d.bool(o.get(t,"cnamLookupEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new _(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TrunkListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};TrunkListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};TrunkListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=l.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new m(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TrunkListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new m(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};TrunkListInstance.get=function get(t){return new g(this._version,t)};TrunkListInstance.toJSON=function toJSON(){return this._solution};TrunkListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return TrunkListInstance};m=function TrunkPage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(m.prototype,u.prototype);m.prototype.constructor=m;m.prototype.getInstance=function getInstance(t){return new _(this._version,t)};m.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};_=function TrunkInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.domainName=e.domain_name;this.disasterRecoveryMethod=e.disaster_recovery_method;this.disasterRecoveryUrl=e.disaster_recovery_url;this.friendlyName=e.friendly_name;this.secure=e.secure;this.recording=e.recording;this.transferMode=e.transfer_mode;this.cnamLookupEnabled=e.cnam_lookup_enabled;this.authType=e.auth_type;this.authTypeSet=e.auth_type_set;this.dateCreated=p.iso8601DateTime(e.date_created);this.dateUpdated=p.iso8601DateTime(e.date_updated);this.sid=e.sid;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(_.prototype,"_proxy",{get:function(){if(!this._context){this._context=new g(this._version,this._solution.sid)}return this._context}});_.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};_.prototype.remove=function remove(t){return this._proxy.remove(t)};_.prototype.update=function update(t,e){return this._proxy.update(t,e)};_.prototype.originationUrls=function originationUrls(){return this._proxy.originationUrls};_.prototype.credentialsLists=function credentialsLists(){return this._proxy.credentialsLists};_.prototype.ipAccessControlLists=function ipAccessControlLists(){return this._proxy.ipAccessControlLists};_.prototype.phoneNumbers=function phoneNumbers(){return this._proxy.phoneNumbers};_.prototype.recordings=function recordings(){return this._proxy.recordings};_.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};_.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};g=function TrunkContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Trunks/${e}`;this._originationUrls=undefined;this._credentialsLists=undefined;this._ipAccessControlLists=undefined;this._phoneNumbers=undefined;this._recordings=undefined};g.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new _(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};g.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};g.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=l.of({FriendlyName:o.get(t,"friendlyName"),DomainName:o.get(t,"domainName"),DisasterRecoveryUrl:o.get(t,"disasterRecoveryUrl"),DisasterRecoveryMethod:o.get(t,"disasterRecoveryMethod"),TransferMode:o.get(t,"transferMode"),Secure:d.bool(o.get(t,"secure")),CnamLookupEnabled:d.bool(o.get(t,"cnamLookupEnabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new _(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(g.prototype,"originationUrls",{get:function(){if(!this._originationUrls){this._originationUrls=new a(this._version,this._solution.sid)}return this._originationUrls}});Object.defineProperty(g.prototype,"credentialsLists",{get:function(){if(!this._credentialsLists){this._credentialsLists=new r(this._version,this._solution.sid)}return this._credentialsLists}});Object.defineProperty(g.prototype,"ipAccessControlLists",{get:function(){if(!this._ipAccessControlLists){this._ipAccessControlLists=new c(this._version,this._solution.sid)}return this._ipAccessControlLists}});Object.defineProperty(g.prototype,"phoneNumbers",{get:function(){if(!this._phoneNumbers){this._phoneNumbers=new h(this._version,this._solution.sid)}return this._phoneNumbers}});Object.defineProperty(g.prototype,"recordings",{get:function(){if(!this._recordings){this._recordings=new f(this._version,this._solution.sid)}return this._recordings}});g.prototype.toJSON=function toJSON(){return this._solution};g.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={TrunkList:v,TrunkPage:m,TrunkInstance:_,TrunkContext:g}},85327:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function CredentialListList(t,e){function CredentialListListInstance(t){return CredentialListListInstance.get(t)}CredentialListListInstance._version=t;CredentialListListInstance._solution={trunkSid:e};CredentialListListInstance._uri=`/Trunks/${e}/CredentialLists`;CredentialListListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.credentialListSid)){throw new Error('Required parameter "opts.credentialListSid" missing.')}var i=n.defer();var s=a.of({CredentialListSid:o.get(t,"credentialListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CredentialListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CredentialListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CredentialListListInstance.get=function get(t){return new p(this._version,this._solution.trunkSid,t)};CredentialListListInstance.toJSON=function toJSON(){return this._solution};CredentialListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CredentialListListInstance};h=function CredentialListPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.trunkSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CredentialListInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.trunkSid=e.trunk_sid;this.friendlyName=e.friendly_name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={trunkSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.trunkSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CredentialListContext(t,e,i){this._version=t;this._solution={trunkSid:e,sid:i};this._uri=`/Trunks/${e}/CredentialLists/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CredentialListList:u,CredentialListPage:h,CredentialListInstance:f,CredentialListContext:p}},33779:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function IpAccessControlListList(t,e){function IpAccessControlListListInstance(t){return IpAccessControlListListInstance.get(t)}IpAccessControlListListInstance._version=t;IpAccessControlListListInstance._solution={trunkSid:e};IpAccessControlListListInstance._uri=`/Trunks/${e}/IpAccessControlLists`;IpAccessControlListListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.ipAccessControlListSid)){throw new Error('Required parameter "opts.ipAccessControlListSid" missing.')}var i=n.defer();var s=a.of({IpAccessControlListSid:o.get(t,"ipAccessControlListSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IpAccessControlListListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IpAccessControlListListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpAccessControlListListInstance.get=function get(t){return new p(this._version,this._solution.trunkSid,t)};IpAccessControlListListInstance.toJSON=function toJSON(){return this._solution};IpAccessControlListListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IpAccessControlListListInstance};h=function IpAccessControlListPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.trunkSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function IpAccessControlListInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.trunkSid=e.trunk_sid;this.friendlyName=e.friendly_name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={trunkSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.trunkSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function IpAccessControlListContext(t,e,i){this._version=t;this._solution={trunkSid:e,sid:i};this._uri=`/Trunks/${e}/IpAccessControlLists/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IpAccessControlListList:u,IpAccessControlListPage:h,IpAccessControlListInstance:f,IpAccessControlListContext:p}},11093:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function OriginationUrlList(t,e){function OriginationUrlListInstance(t){return OriginationUrlListInstance.get(t)}OriginationUrlListInstance._version=t;OriginationUrlListInstance._solution={trunkSid:e};OriginationUrlListInstance._uri=`/Trunks/${e}/OriginationUrls`;OriginationUrlListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.weight)){throw new Error('Required parameter "opts.weight" missing.')}if(o.isUndefined(t.priority)){throw new Error('Required parameter "opts.priority" missing.')}if(o.isUndefined(t.enabled)){throw new Error('Required parameter "opts.enabled" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.sipUrl)){throw new Error('Required parameter "opts.sipUrl" missing.')}var i=n.defer();var s=u.of({Weight:o.get(t,"weight"),Priority:o.get(t,"priority"),Enabled:a.bool(o.get(t,"enabled")),FriendlyName:o.get(t,"friendlyName"),SipUrl:o.get(t,"sipUrl")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};OriginationUrlListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};OriginationUrlListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};OriginationUrlListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};OriginationUrlListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};OriginationUrlListInstance.get=function get(t){return new d(this._version,this._solution.trunkSid,t)};OriginationUrlListInstance.toJSON=function toJSON(){return this._solution};OriginationUrlListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return OriginationUrlListInstance};f=function OriginationUrlPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.trunkSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function OriginationUrlInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.trunkSid=e.trunk_sid;this.weight=c.integer(e.weight);this.enabled=e.enabled;this.sipUrl=e.sip_url;this.friendlyName=e.friendly_name;this.priority=c.integer(e.priority);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={trunkSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.trunkSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function OriginationUrlContext(t,e,i){this._version=t;this._solution={trunkSid:e,sid:i};this._uri=`/Trunks/${e}/OriginationUrls/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Weight:o.get(t,"weight"),Priority:o.get(t,"priority"),Enabled:a.bool(o.get(t,"enabled")),FriendlyName:o.get(t,"friendlyName"),SipUrl:o.get(t,"sipUrl")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={OriginationUrlList:h,OriginationUrlPage:f,OriginationUrlInstance:p,OriginationUrlContext:d}},17471:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function PhoneNumberList(t,e){function PhoneNumberListInstance(t){return PhoneNumberListInstance.get(t)}PhoneNumberListInstance._version=t;PhoneNumberListInstance._solution={trunkSid:e};PhoneNumberListInstance._uri=`/Trunks/${e}/PhoneNumbers`;PhoneNumberListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.phoneNumberSid)){throw new Error('Required parameter "opts.phoneNumberSid" missing.')}var i=n.defer();var s=a.of({PhoneNumberSid:o.get(t,"phoneNumberSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PhoneNumberListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PhoneNumberListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PhoneNumberListInstance.get=function get(t){return new p(this._version,this._solution.trunkSid,t)};PhoneNumberListInstance.toJSON=function toJSON(){return this._solution};PhoneNumberListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PhoneNumberListInstance};h=function PhoneNumberPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.trunkSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PhoneNumberInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.addressRequirements=e.address_requirements;this.apiVersion=e.api_version;this.beta=e.beta;this.capabilities=e.capabilities;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.links=e.links;this.phoneNumber=e.phone_number;this.sid=e.sid;this.smsApplicationSid=e.sms_application_sid;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.trunkSid=e.trunk_sid;this.url=e.url;this.voiceApplicationSid=e.voice_application_sid;this.voiceCallerIdLookup=e.voice_caller_id_lookup;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this._context=undefined;this._solution={trunkSid:i,sid:n||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.trunkSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PhoneNumberContext(t,e,i){this._version=t;this._solution={trunkSid:e,sid:i};this._uri=`/Trunks/${e}/PhoneNumbers/${i}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.trunkSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PhoneNumberList:u,PhoneNumberPage:h,PhoneNumberInstance:f,PhoneNumberContext:p}},17126:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function RecordingList(t,e){function RecordingListInstance(t){return RecordingListInstance.get(t)}RecordingListInstance._version=t;RecordingListInstance._solution={trunkSid:e};RecordingListInstance.get=function get(){return new f(this._version,this._solution.trunkSid)};RecordingListInstance.toJSON=function toJSON(){return this._solution};RecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingListInstance};u=function RecordingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.trunkSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function RecordingInstance(t,e,i){this._version=t;this.mode=e.mode;this.trim=e.trim;this._context=undefined;this._solution={trunkSid:i}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.trunkSid)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.update=function update(t,e){return this._proxy.update(t,e)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function RecordingContext(t,e){this._version=t;this._solution={trunkSid:e};this._uri=`/Trunks/${e}/Recording`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.trunkSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({Mode:o.get(t,"mode"),Trim:o.get(t,"trim")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution.trunkSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingList:a,RecordingPage:u,RecordingInstance:h,RecordingContext:f}},79352:(t,e,i)=>{"use strict";var n=i(90250);var o=i(25610).FormList;var s=i(5398).ServiceList;var r=i(64351);function V2(t){r.prototype.constructor.call(this,t,"v2");this._forms=undefined;this._services=undefined}n.extend(V2.prototype,r.prototype);V2.prototype.constructor=V2;Object.defineProperty(V2.prototype,"forms",{get:function(){this._forms=this._forms||new o(this);return this._forms}});Object.defineProperty(V2.prototype,"services",{get:function(){this._services=this._services||new s(this);return this._services}});t.exports=V2},25610:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;var f;a=function FormList(t){function FormListInstance(t){return FormListInstance.get(t)}FormListInstance._version=t;FormListInstance._solution={};FormListInstance.get=function get(t){return new f(this._version,t)};FormListInstance.toJSON=function toJSON(){return this._solution};FormListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FormListInstance};u=function FormPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function FormInstance(t,e,i){this._version=t;this.formType=e.form_type;this.forms=e.forms;this.formMeta=e.form_meta;this.url=e.url;this._context=undefined;this._solution={formType:i||this.formType}};Object.defineProperty(h.prototype,"_proxy",{get:function(){if(!this._context){this._context=new f(this._version,this._solution.formType)}return this._context}});h.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FormContext(t,e){this._version=t;this._solution={formType:e};this._uri=`/Forms/${e}`};f.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new h(this._version,t,this._solution.formType))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};f.prototype.toJSON=function toJSON(){return this._solution};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FormList:a,FormPage:u,FormInstance:h,FormContext:f}},5398:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(95873).AccessTokenList;var c=i(77654).EntityList;var a=i(44711).MessagingConfigurationList;var u=i(60938);var h=i(83857).RateLimitList;var f=i(67609).VerificationCheckList;var p=i(40843).VerificationList;var d=i(27240).WebhookList;var l=i(80513);var v=i(6372);var m=i(72142);var _;var g;var y;var S;_=function ServiceList(t){function ServiceListInstance(t){return ServiceListInstance.get(t)}ServiceListInstance._version=t;ServiceListInstance._solution={};ServiceListInstance._uri=`/Services`;ServiceListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=m.of({FriendlyName:o.get(t,"friendlyName"),CodeLength:o.get(t,"codeLength"),LookupEnabled:v.bool(o.get(t,"lookupEnabled")),SkipSmsToLandlines:v.bool(o.get(t,"skipSmsToLandlines")),DtmfInputRequired:v.bool(o.get(t,"dtmfInputRequired")),TtsName:o.get(t,"ttsName"),Psd2Enabled:v.bool(o.get(t,"psd2Enabled")),DoNotShareWarningEnabled:v.bool(o.get(t,"doNotShareWarningEnabled")),CustomCodeEnabled:v.bool(o.get(t,"customCodeEnabled")),"Push.IncludeDate":v.bool(o.get(t,"push.includeDate")),"Push.ApnCredentialSid":o.get(t,"push.apnCredentialSid"),"Push.FcmCredentialSid":o.get(t,"push.fcmCredentialSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new y(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ServiceListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ServiceListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=m.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new g(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new g(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ServiceListInstance.get=function get(t){return new S(this._version,t)};ServiceListInstance.toJSON=function toJSON(){return this._solution};ServiceListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ServiceListInstance};g=function ServicePage(t,e,i){this._solution=i;u.prototype.constructor.call(this,t,e,this._solution)};o.extend(g.prototype,u.prototype);g.prototype.constructor=g;g.prototype.getInstance=function getInstance(t){return new y(this._version,t)};g.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};g.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};y=function ServiceInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.codeLength=l.integer(e.code_length);this.lookupEnabled=e.lookup_enabled;this.psd2Enabled=e.psd2_enabled;this.skipSmsToLandlines=e.skip_sms_to_landlines;this.dtmfInputRequired=e.dtmf_input_required;this.ttsName=e.tts_name;this.doNotShareWarningEnabled=e.do_not_share_warning_enabled;this.customCodeEnabled=e.custom_code_enabled;this.push=e.push;this.dateCreated=l.iso8601DateTime(e.date_created);this.dateUpdated=l.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(y.prototype,"_proxy",{get:function(){if(!this._context){this._context=new S(this._version,this._solution.sid)}return this._context}});y.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};y.prototype.remove=function remove(t){return this._proxy.remove(t)};y.prototype.update=function update(t,e){return this._proxy.update(t,e)};y.prototype.verifications=function verifications(){return this._proxy.verifications};y.prototype.verificationChecks=function verificationChecks(){return this._proxy.verificationChecks};y.prototype.rateLimits=function rateLimits(){return this._proxy.rateLimits};y.prototype.messagingConfigurations=function messagingConfigurations(){return this._proxy.messagingConfigurations};y.prototype.entities=function entities(){return this._proxy.entities};y.prototype.webhooks=function webhooks(){return this._proxy.webhooks};y.prototype.accessTokens=function accessTokens(){return this._proxy.accessTokens};y.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};y.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};S=function ServiceContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Services/${e}`;this._verifications=undefined;this._verificationChecks=undefined;this._rateLimits=undefined;this._messagingConfigurations=undefined;this._entities=undefined;this._webhooks=undefined;this._accessTokens=undefined};S.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new y(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};S.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};S.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=m.of({FriendlyName:o.get(t,"friendlyName"),CodeLength:o.get(t,"codeLength"),LookupEnabled:v.bool(o.get(t,"lookupEnabled")),SkipSmsToLandlines:v.bool(o.get(t,"skipSmsToLandlines")),DtmfInputRequired:v.bool(o.get(t,"dtmfInputRequired")),TtsName:o.get(t,"ttsName"),Psd2Enabled:v.bool(o.get(t,"psd2Enabled")),DoNotShareWarningEnabled:v.bool(o.get(t,"doNotShareWarningEnabled")),CustomCodeEnabled:v.bool(o.get(t,"customCodeEnabled")),"Push.IncludeDate":v.bool(o.get(t,"push.includeDate")),"Push.ApnCredentialSid":o.get(t,"push.apnCredentialSid"),"Push.FcmCredentialSid":o.get(t,"push.fcmCredentialSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new y(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(S.prototype,"verifications",{get:function(){if(!this._verifications){this._verifications=new p(this._version,this._solution.sid)}return this._verifications}});Object.defineProperty(S.prototype,"verificationChecks",{get:function(){if(!this._verificationChecks){this._verificationChecks=new f(this._version,this._solution.sid)}return this._verificationChecks}});Object.defineProperty(S.prototype,"rateLimits",{get:function(){if(!this._rateLimits){this._rateLimits=new h(this._version,this._solution.sid)}return this._rateLimits}});Object.defineProperty(S.prototype,"messagingConfigurations",{get:function(){if(!this._messagingConfigurations){this._messagingConfigurations=new a(this._version,this._solution.sid)}return this._messagingConfigurations}});Object.defineProperty(S.prototype,"entities",{get:function(){if(!this._entities){this._entities=new c(this._version,this._solution.sid)}return this._entities}});Object.defineProperty(S.prototype,"webhooks",{get:function(){if(!this._webhooks){this._webhooks=new d(this._version,this._solution.sid)}return this._webhooks}});Object.defineProperty(S.prototype,"accessTokens",{get:function(){if(!this._accessTokens){this._accessTokens=new r(this._version,this._solution.sid)}return this._accessTokens}});S.prototype.toJSON=function toJSON(){return this._solution};S.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ServiceList:_,ServicePage:g,ServiceInstance:y,ServiceContext:S}},95873:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function AccessTokenList(t,e){function AccessTokenListInstance(t){return AccessTokenListInstance.get(t)}AccessTokenListInstance._version=t;AccessTokenListInstance._solution={serviceSid:e};AccessTokenListInstance._uri=`/Services/${e}/AccessTokens`;AccessTokenListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}if(o.isUndefined(t.factorType)){throw new Error('Required parameter "opts.factorType" missing.')}var i=n.defer();var s=c.of({Identity:o.get(t,"identity"),FactorType:o.get(t,"factorType")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new h(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};AccessTokenListInstance.toJSON=function toJSON(){return this._solution};AccessTokenListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return AccessTokenListInstance};u=function AccessTokenPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.serviceSid)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function AccessTokenInstance(t,e,i){this._version=t;this.token=e.token;this._context=undefined;this._solution={serviceSid:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={AccessTokenList:a,AccessTokenPage:u,AccessTokenInstance:h}},77654:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(11696).ChallengeList;var c=i(11144).FactorList;var a=i(60938);var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function EntityList(t,e){function EntityListInstance(t){return EntityListInstance.get(t)}EntityListInstance._version=t;EntityListInstance._solution={serviceSid:e};EntityListInstance._uri=`/Services/${e}/Entities`;EntityListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.identity)){throw new Error('Required parameter "opts.identity" missing.')}var i=n.defer();var s=h.of({Identity:o.get(t,"identity")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.identity))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EntityListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};EntityListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};EntityListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EntityListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};EntityListInstance.get=function get(t){return new l(this._version,this._solution.serviceSid,t)};EntityListInstance.toJSON=function toJSON(){return this._solution};EntityListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return EntityListInstance};p=function EntityPage(t,e,i){this._solution=i;a.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,a.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t,this._solution.serviceSid)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function EntityInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.identity=e.identity;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,identity:n||this.identity}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.serviceSid,this._solution.identity)}return this._context}});d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.factors=function factors(){return this._proxy.factors};d.prototype.challenges=function challenges(){return this._proxy.challenges};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function EntityContext(t,e,i){this._version=t;this._solution={serviceSid:e,identity:i};this._uri=`/Services/${e}/Entities/${i}`;this._factors=undefined;this._challenges=undefined};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.serviceSid,this._solution.identity))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"factors",{get:function(){if(!this._factors){this._factors=new c(this._version,this._solution.serviceSid,this._solution.identity)}return this._factors}});Object.defineProperty(l.prototype,"challenges",{get:function(){if(!this._challenges){this._challenges=new r(this._version,this._solution.serviceSid,this._solution.identity)}return this._challenges}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={EntityList:f,EntityPage:p,EntityInstance:d,EntityContext:l}},11696:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ChallengeList(t,e,i){function ChallengeListInstance(t){return ChallengeListInstance.get(t)}ChallengeListInstance._version=t;ChallengeListInstance._solution={serviceSid:e,identity:i};ChallengeListInstance._uri=`/Services/${e}/Entities/${i}/Challenges`;ChallengeListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.factorSid)){throw new Error('Required parameter "opts.factorSid" missing.')}var i=n.defer();var s=u.of({FactorSid:o.get(t,"factorSid"),ExpirationDate:a.iso8601DateTime(o.get(t,"expirationDate")),"Details.Message":o.get(t,"details.message"),"Details.Fields":a.map(o.get(t,"details.fields"),function(t){return a.object(t)}),HiddenDetails:a.object(o.get(t,"hiddenDetails"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChallengeListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ChallengeListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ChallengeListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FactorSid:o.get(t,"factorSid"),Status:o.get(t,"status"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChallengeListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ChallengeListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,this._solution.identity,t)};ChallengeListInstance.toJSON=function toJSON(){return this._solution};ChallengeListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ChallengeListInstance};f=function ChallengePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid,this._solution.identity)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ChallengeInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.entitySid=e.entity_sid;this.identity=e.identity;this.factorSid=e.factor_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.dateResponded=c.iso8601DateTime(e.date_responded);this.expirationDate=c.iso8601DateTime(e.expiration_date);this.status=e.status;this.respondedReason=e.responded_reason;this.details=e.details;this.hiddenDetails=e.hidden_details;this.factorType=e.factor_type;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,identity:n,sid:o||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.identity,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ChallengeContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,identity:i,sid:n};this._uri=`/Services/${e}/Entities/${i}/Challenges/${n}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({AuthPayload:o.get(t,"authPayload")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ChallengeList:h,ChallengePage:f,ChallengeInstance:p,ChallengeContext:d}},11144:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function FactorList(t,e,i){function FactorListInstance(t){return FactorListInstance.get(t)}FactorListInstance._version=t;FactorListInstance._solution={serviceSid:e,identity:i};FactorListInstance._uri=`/Services/${e}/Entities/${i}/Factors`;FactorListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.factorType)){throw new Error('Required parameter "opts.factorType" missing.')}var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),FactorType:o.get(t,"factorType"),"Binding.Alg":o.get(t,"binding.alg"),"Binding.PublicKey":o.get(t,"binding.publicKey"),"Config.AppId":o.get(t,"config.appId"),"Config.NotificationPlatform":o.get(t,"config.notificationPlatform"),"Config.NotificationToken":o.get(t,"config.notificationToken"),"Config.SdkVersion":o.get(t,"config.sdkVersion")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FactorListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};FactorListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};FactorListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FactorListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};FactorListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.identity,t)};FactorListInstance.toJSON=function toJSON(){return this._solution};FactorListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return FactorListInstance};h=function FactorPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.identity)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function FactorInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.entitySid=e.entity_sid;this.identity=e.identity;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.friendlyName=e.friendly_name;this.status=e.status;this.factorType=e.factor_type;this.config=e.config;this.url=e.url;this._context=undefined;this._solution={serviceSid:i,identity:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.identity,this._solution.sid)}return this._context}});f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function FactorContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,identity:i,sid:n};this._uri=`/Services/${e}/Entities/${i}/Factors/${n}`};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({AuthPayload:o.get(t,"authPayload"),FriendlyName:o.get(t,"friendlyName"),"Config.NotificationToken":o.get(t,"config.notificationToken"),"Config.SdkVersion":o.get(t,"config.sdkVersion")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.identity,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={FactorList:u,FactorPage:h,FactorInstance:f,FactorContext:p}},44711:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function MessagingConfigurationList(t,e){function MessagingConfigurationListInstance(t){return MessagingConfigurationListInstance.get(t)}MessagingConfigurationListInstance._version=t;MessagingConfigurationListInstance._solution={serviceSid:e};MessagingConfigurationListInstance._uri=`/Services/${e}/MessagingConfigurations`;MessagingConfigurationListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.country)){throw new Error('Required parameter "opts.country" missing.')}if(o.isUndefined(t.messagingServiceSid)){throw new Error('Required parameter "opts.messagingServiceSid" missing.')}var i=n.defer();var s=a.of({Country:o.get(t,"country"),MessagingServiceSid:o.get(t,"messagingServiceSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.country))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessagingConfigurationListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};MessagingConfigurationListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};MessagingConfigurationListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessagingConfigurationListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};MessagingConfigurationListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,t)};MessagingConfigurationListInstance.toJSON=function toJSON(){return this._solution};MessagingConfigurationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return MessagingConfigurationListInstance};h=function MessagingConfigurationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function MessagingConfigurationInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.serviceSid=e.service_sid;this.country=e.country;this.messagingServiceSid=e.messaging_service_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,country:n||this.country}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.country)}return this._context}});f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function MessagingConfigurationContext(t,e,i){this._version=t;this._solution={serviceSid:e,country:i};this._uri=`/Services/${e}/MessagingConfigurations/${i}`};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.messagingServiceSid)){throw new Error('Required parameter "opts.messagingServiceSid" missing.')}var i=n.defer();var s=a.of({MessagingServiceSid:o.get(t,"messagingServiceSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.country))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.country))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={MessagingConfigurationList:u,MessagingConfigurationPage:h,MessagingConfigurationInstance:f,MessagingConfigurationContext:p}},83857:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(15820).BucketList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function RateLimitList(t,e){function RateLimitListInstance(t){return RateLimitListInstance.get(t)}RateLimitListInstance._version=t;RateLimitListInstance._solution={serviceSid:e};RateLimitListInstance._uri=`/Services/${e}/RateLimits`;RateLimitListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.uniqueName)){throw new Error('Required parameter "opts.uniqueName" missing.')}var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),Description:o.get(t,"description")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RateLimitListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RateLimitListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RateLimitListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RateLimitListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RateLimitListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};RateLimitListInstance.toJSON=function toJSON(){return this._solution};RateLimitListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RateLimitListInstance};f=function RateLimitPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RateLimitInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.uniqueName=e.unique_name;this.description=e.description;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.buckets=function buckets(){return this._proxy.buckets};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RateLimitContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/RateLimits/${i}`;this._buckets=undefined};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Description:o.get(t,"description")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"buckets",{get:function(){if(!this._buckets){this._buckets=new r(this._version,this._solution.serviceSid,this._solution.sid)}return this._buckets}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RateLimitList:h,RateLimitPage:f,RateLimitInstance:p,RateLimitContext:d}},15820:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function BucketList(t,e,i){function BucketListInstance(t){return BucketListInstance.get(t)}BucketListInstance._version=t;BucketListInstance._solution={serviceSid:e,rateLimitSid:i};BucketListInstance._uri=`/Services/${e}/RateLimits/${i}/Buckets`;BucketListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.max)){throw new Error('Required parameter "opts.max" missing.')}if(o.isUndefined(t.interval)){throw new Error('Required parameter "opts.interval" missing.')}var i=n.defer();var s=a.of({Max:o.get(t,"max"),Interval:o.get(t,"interval")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.rateLimitSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BucketListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};BucketListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};BucketListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BucketListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BucketListInstance.get=function get(t){return new p(this._version,this._solution.serviceSid,this._solution.rateLimitSid,t)};BucketListInstance.toJSON=function toJSON(){return this._solution};BucketListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BucketListInstance};h=function BucketPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid,this._solution.rateLimitSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function BucketInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.rateLimitSid=e.rate_limit_sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.max=c.integer(e.max);this.interval=c.integer(e.interval);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,rateLimitSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.serviceSid,this._solution.rateLimitSid,this._solution.sid)}return this._context}});f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function BucketContext(t,e,i,n){this._version=t;this._solution={serviceSid:e,rateLimitSid:i,sid:n};this._uri=`/Services/${e}/RateLimits/${i}/Buckets/${n}`};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({Max:o.get(t,"max"),Interval:o.get(t,"interval")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.rateLimitSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.serviceSid,this._solution.rateLimitSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BucketList:u,BucketPage:h,BucketInstance:f,BucketContext:p}},40843:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function VerificationList(t,e){function VerificationListInstance(t){return VerificationListInstance.get(t)}VerificationListInstance._version=t;VerificationListInstance._solution={serviceSid:e};VerificationListInstance._uri=`/Services/${e}/Verifications`;VerificationListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.to)){throw new Error('Required parameter "opts.to" missing.')}if(o.isUndefined(t.channel)){throw new Error('Required parameter "opts.channel" missing.')}var i=n.defer();var s=u.of({To:o.get(t,"to"),Channel:o.get(t,"channel"),CustomFriendlyName:o.get(t,"customFriendlyName"),CustomMessage:o.get(t,"customMessage"),SendDigits:o.get(t,"sendDigits"),Locale:o.get(t,"locale"),CustomCode:o.get(t,"customCode"),Amount:o.get(t,"amount"),Payee:o.get(t,"payee"),RateLimits:a.object(o.get(t,"rateLimits")),ChannelConfiguration:a.object(o.get(t,"channelConfiguration")),AppHash:o.get(t,"appHash")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VerificationListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};VerificationListInstance.toJSON=function toJSON(){return this._solution};VerificationListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return VerificationListInstance};f=function VerificationPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function VerificationInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.to=e.to;this.channel=e.channel;this.status=e.status;this.valid=e.valid;this.lookup=e.lookup;this.amount=e.amount;this.payee=e.payee;this.sendCodeAttempts=e.send_code_attempts;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function VerificationContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Verifications/${i}`};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=u.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={VerificationList:h,VerificationPage:f,VerificationInstance:p,VerificationContext:d}},67609:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function VerificationCheckList(t,e){function VerificationCheckListInstance(t){return VerificationCheckListInstance.get(t)}VerificationCheckListInstance._version=t;VerificationCheckListInstance._solution={serviceSid:e};VerificationCheckListInstance._uri=`/Services/${e}/VerificationCheck`;VerificationCheckListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.code)){throw new Error('Required parameter "opts.code" missing.')}var i=n.defer();var s=a.of({Code:o.get(t,"code"),To:o.get(t,"to"),VerificationSid:o.get(t,"verificationSid"),Amount:o.get(t,"amount"),Payee:o.get(t,"payee")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};VerificationCheckListInstance.toJSON=function toJSON(){return this._solution};VerificationCheckListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return VerificationCheckListInstance};h=function VerificationCheckPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.serviceSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function VerificationCheckInstance(t,e,i){this._version=t;this.sid=e.sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.to=e.to;this.channel=e.channel;this.status=e.status;this.valid=e.valid;this.amount=e.amount;this.payee=e.payee;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={serviceSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={VerificationCheckList:u,VerificationCheckPage:h,VerificationCheckInstance:f}},27240:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function WebhookList(t,e){function WebhookListInstance(t){return WebhookListInstance.get(t)}WebhookListInstance._version=t;WebhookListInstance._solution={serviceSid:e};WebhookListInstance._uri=`/Services/${e}/Webhooks`;WebhookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}if(o.isUndefined(t.eventTypes)){throw new Error('Required parameter "opts.eventTypes" missing.')}if(o.isUndefined(t.webhookUrl)){throw new Error('Required parameter "opts.webhookUrl" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),EventTypes:a.map(o.get(t,"eventTypes"),function(t){return t}),WebhookUrl:o.get(t,"webhookUrl"),Status:o.get(t,"status")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};WebhookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};WebhookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};WebhookListInstance.get=function get(t){return new d(this._version,this._solution.serviceSid,t)};WebhookListInstance.toJSON=function toJSON(){return this._solution};WebhookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return WebhookListInstance};f=function WebhookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.serviceSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function WebhookInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.serviceSid=e.service_sid;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.eventTypes=e.event_types;this.status=e.status;this.webhookUrl=e.webhook_url;this.webhookMethod=e.webhook_method;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={serviceSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.serviceSid,this._solution.sid)}return this._context}});p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function WebhookContext(t,e,i){this._version=t;this._solution={serviceSid:e,sid:i};this._uri=`/Services/${e}/Webhooks/${i}`};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),EventTypes:a.map(o.get(t,"eventTypes"),function(t){return t}),WebhookUrl:o.get(t,"webhookUrl"),Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.serviceSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={WebhookList:h,WebhookPage:f,WebhookInstance:p,WebhookContext:d}},41933:(t,e,i)=>{"use strict";var n=i(90250);var o=i(51065).CompositionHookList;var s=i(96431).CompositionList;var r=i(94633).CompositionSettingsList;var c=i(20370).RecordingList;var a=i(46347).RecordingSettingsList;var u=i(70641).RoomList;var h=i(64351);function V1(t){h.prototype.constructor.call(this,t,"v1");this._compositions=undefined;this._compositionHooks=undefined;this._compositionSettings=undefined;this._recordings=undefined;this._recordingSettings=undefined;this._rooms=undefined}n.extend(V1.prototype,h.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"compositions",{get:function(){this._compositions=this._compositions||new s(this);return this._compositions}});Object.defineProperty(V1.prototype,"compositionHooks",{get:function(){this._compositionHooks=this._compositionHooks||new o(this);return this._compositionHooks}});Object.defineProperty(V1.prototype,"compositionSettings",{get:function(){this._compositionSettings=this._compositionSettings||new r(this);return this._compositionSettings}});Object.defineProperty(V1.prototype,"recordings",{get:function(){this._recordings=this._recordings||new c(this);return this._recordings}});Object.defineProperty(V1.prototype,"recordingSettings",{get:function(){this._recordingSettings=this._recordingSettings||new a(this);return this._recordingSettings}});Object.defineProperty(V1.prototype,"rooms",{get:function(){this._rooms=this._rooms||new u(this);return this._rooms}});t.exports=V1},96431:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CompositionList(t){function CompositionListInstance(t){return CompositionListInstance.get(t)}CompositionListInstance._version=t;CompositionListInstance._solution={};CompositionListInstance._uri=`/Compositions`;CompositionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CompositionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CompositionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Status:o.get(t,"status"),DateCreatedAfter:a.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:a.iso8601DateTime(o.get(t,"dateCreatedBefore")),RoomSid:o.get(t,"roomSid"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.roomSid)){throw new Error('Required parameter "opts.roomSid" missing.')}var i=n.defer();var s=u.of({RoomSid:o.get(t,"roomSid"),VideoLayout:a.object(o.get(t,"videoLayout")),AudioSources:a.map(o.get(t,"audioSources"),function(t){return t}),AudioSourcesExcluded:a.map(o.get(t,"audioSourcesExcluded"),function(t){return t}),Resolution:o.get(t,"resolution"),Format:o.get(t,"format"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),Trim:a.bool(o.get(t,"trim"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionListInstance.get=function get(t){return new d(this._version,t)};CompositionListInstance.toJSON=function toJSON(){return this._solution};CompositionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CompositionListInstance};f=function CompositionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CompositionInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.status=e.status;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateCompleted=c.iso8601DateTime(e.date_completed);this.dateDeleted=c.iso8601DateTime(e.date_deleted);this.sid=e.sid;this.roomSid=e.room_sid;this.audioSources=e.audio_sources;this.audioSourcesExcluded=e.audio_sources_excluded;this.videoLayout=e.video_layout;this.resolution=e.resolution;this.trim=e.trim;this.format=e.format;this.bitrate=c.integer(e.bitrate);this.size=c.integer(e.size);this.duration=c.integer(e.duration);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CompositionContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Compositions/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CompositionList:h,CompositionPage:f,CompositionInstance:p,CompositionContext:d}},51065:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CompositionHookList(t){function CompositionHookListInstance(t){return CompositionHookListInstance.get(t)}CompositionHookListInstance._version=t;CompositionHookListInstance._solution={};CompositionHookListInstance._uri=`/CompositionHooks`;CompositionHookListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CompositionHookListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CompositionHookListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Enabled:a.bool(o.get(t,"enabled")),DateCreatedAfter:a.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:a.iso8601DateTime(o.get(t,"dateCreatedBefore")),FriendlyName:o.get(t,"friendlyName"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionHookListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionHookListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Enabled:a.bool(o.get(t,"enabled")),VideoLayout:a.object(o.get(t,"videoLayout")),AudioSources:a.map(o.get(t,"audioSources"),function(t){return t}),AudioSourcesExcluded:a.map(o.get(t,"audioSourcesExcluded"),function(t){return t}),Resolution:o.get(t,"resolution"),Format:o.get(t,"format"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),Trim:a.bool(o.get(t,"trim"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CompositionHookListInstance.get=function get(t){return new d(this._version,t)};CompositionHookListInstance.toJSON=function toJSON(){return this._solution};CompositionHookListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CompositionHookListInstance};f=function CompositionHookPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CompositionHookInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.enabled=e.enabled;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.sid=e.sid;this.audioSources=e.audio_sources;this.audioSourcesExcluded=e.audio_sources_excluded;this.videoLayout=e.video_layout;this.resolution=e.resolution;this.trim=e.trim;this.format=e.format;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CompositionHookContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/CompositionHooks/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Enabled:a.bool(o.get(t,"enabled")),VideoLayout:a.object(o.get(t,"videoLayout")),AudioSources:a.map(o.get(t,"audioSources"),function(t){return t}),AudioSourcesExcluded:a.map(o.get(t,"audioSourcesExcluded"),function(t){return t}),Trim:a.bool(o.get(t,"trim")),Format:o.get(t,"format"),Resolution:o.get(t,"resolution"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CompositionHookList:h,CompositionHookPage:f,CompositionHookInstance:p,CompositionHookContext:d}},94633:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function CompositionSettingsList(t){function CompositionSettingsListInstance(t){return CompositionSettingsListInstance.get(t)}CompositionSettingsListInstance._version=t;CompositionSettingsListInstance._solution={};CompositionSettingsListInstance.get=function get(){return new p(this._version)};CompositionSettingsListInstance.toJSON=function toJSON(){return this._solution};CompositionSettingsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CompositionSettingsListInstance};h=function CompositionSettingsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function CompositionSettingsInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.awsCredentialsSid=e.aws_credentials_sid;this.awsS3Url=e.aws_s3_url;this.awsStorageEnabled=e.aws_storage_enabled;this.encryptionKeySid=e.encryption_key_sid;this.encryptionEnabled=e.encryption_enabled;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.create=function create(t,e){return this._proxy.create(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CompositionSettingsContext(t){this._version=t;this._solution={};this._uri=`/CompositionSettings/Default`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),AwsCredentialsSid:o.get(t,"awsCredentialsSid"),EncryptionKeySid:o.get(t,"encryptionKeySid"),AwsS3Url:o.get(t,"awsS3Url"),AwsStorageEnabled:c.bool(o.get(t,"awsStorageEnabled")),EncryptionEnabled:c.bool(o.get(t,"encryptionEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CompositionSettingsList:u,CompositionSettingsPage:h,CompositionSettingsInstance:f,CompositionSettingsContext:p}},20370:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RecordingList(t){function RecordingListInstance(t){return RecordingListInstance.get(t)}RecordingListInstance._version=t;RecordingListInstance._solution={};RecordingListInstance._uri=`/Recordings`;RecordingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RecordingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RecordingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Status:o.get(t,"status"),SourceSid:o.get(t,"sourceSid"),GroupingSid:a.map(o.get(t,"groupingSid"),function(t){return t}),DateCreatedAfter:a.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:a.iso8601DateTime(o.get(t,"dateCreatedBefore")),MediaType:o.get(t,"mediaType"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingListInstance.get=function get(t){return new d(this._version,t)};RecordingListInstance.toJSON=function toJSON(){return this._solution};RecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingListInstance};f=function RecordingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RecordingInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.status=e.status;this.dateCreated=c.iso8601DateTime(e.date_created);this.sid=e.sid;this.sourceSid=e.source_sid;this.size=c.integer(e.size);this.url=e.url;this.type=e.type;this.duration=c.integer(e.duration);this.containerFormat=e.container_format;this.codec=e.codec;this.groupingSids=e.grouping_sids;this.trackName=e.track_name;this.offset=c.integer(e.offset);this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RecordingContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Recordings/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingList:h,RecordingPage:f,RecordingInstance:p,RecordingContext:d}},46347:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function RecordingSettingsList(t){function RecordingSettingsListInstance(t){return RecordingSettingsListInstance.get(t)}RecordingSettingsListInstance._version=t;RecordingSettingsListInstance._solution={};RecordingSettingsListInstance.get=function get(){return new p(this._version)};RecordingSettingsListInstance.toJSON=function toJSON(){return this._solution};RecordingSettingsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingSettingsListInstance};h=function RecordingSettingsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function RecordingSettingsInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.awsCredentialsSid=e.aws_credentials_sid;this.awsS3Url=e.aws_s3_url;this.awsStorageEnabled=e.aws_storage_enabled;this.encryptionKeySid=e.encryption_key_sid;this.encryptionEnabled=e.encryption_enabled;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.create=function create(t,e){return this._proxy.create(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RecordingSettingsContext(t){this._version=t;this._solution={};this._uri=`/RecordingSettings/Default`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.friendlyName)){throw new Error('Required parameter "opts.friendlyName" missing.')}var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName"),AwsCredentialsSid:o.get(t,"awsCredentialsSid"),EncryptionKeySid:o.get(t,"encryptionKeySid"),AwsS3Url:o.get(t,"awsS3Url"),AwsStorageEnabled:c.bool(o.get(t,"awsStorageEnabled")),EncryptionEnabled:c.bool(o.get(t,"encryptionEnabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingSettingsList:u,RecordingSettingsPage:h,RecordingSettingsInstance:f,RecordingSettingsContext:p}},70641:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(84704).ParticipantList;var a=i(67285).RecordingRulesList;var u=i(80433).RoomRecordingList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function RoomList(t){function RoomListInstance(t){return RoomListInstance.get(t)}RoomListInstance._version=t;RoomListInstance._solution={};RoomListInstance._uri=`/Rooms`;RoomListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({EnableTurn:f.bool(o.get(t,"enableTurn")),Type:o.get(t,"type"),UniqueName:o.get(t,"uniqueName"),StatusCallback:o.get(t,"statusCallback"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),MaxParticipants:o.get(t,"maxParticipants"),RecordParticipantsOnConnect:f.bool(o.get(t,"recordParticipantsOnConnect")),VideoCodecs:f.map(o.get(t,"videoCodecs"),function(t){return t}),MediaRegion:o.get(t,"mediaRegion")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoomListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoomListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({Status:o.get(t,"status"),UniqueName:o.get(t,"uniqueName"),DateCreatedAfter:f.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:f.iso8601DateTime(o.get(t,"dateCreatedBefore")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomListInstance.get=function get(t){return new m(this._version,t)};RoomListInstance.toJSON=function toJSON(){return this._solution};RoomListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoomListInstance};l=function RoomPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,r.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function RoomInstance(t,e,i){this._version=t;this.sid=e.sid;this.status=e.status;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.accountSid=e.account_sid;this.enableTurn=e.enable_turn;this.uniqueName=e.unique_name;this.statusCallback=e.status_callback;this.statusCallbackMethod=e.status_callback_method;this.endTime=h.iso8601DateTime(e.end_time);this.duration=h.integer(e.duration);this.type=e.type;this.maxParticipants=h.integer(e.max_participants);this.recordParticipantsOnConnect=e.record_participants_on_connect;this.videoCodecs=e.video_codecs;this.mediaRegion=e.media_region;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.recordings=function recordings(){return this._proxy.recordings};v.prototype.participants=function participants(){return this._proxy.participants};v.prototype.recordingRules=function recordingRules(){return this._proxy.recordingRules};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function RoomContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Rooms/${e}`;this._recordings=undefined;this._participants=undefined;this._recordingRules=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.status)){throw new Error('Required parameter "opts.status" missing.')}var i=n.defer();var s=p.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"recordings",{get:function(){if(!this._recordings){this._recordings=new u(this._version,this._solution.sid)}return this._recordings}});Object.defineProperty(m.prototype,"participants",{get:function(){if(!this._participants){this._participants=new c(this._version,this._solution.sid)}return this._participants}});Object.defineProperty(m.prototype,"recordingRules",{get:function(){if(!this._recordingRules){this._recordingRules=new a(this._version,this._solution.sid)}return this._recordingRules}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoomList:d,RoomPage:l,RoomInstance:v,RoomContext:m}},80433:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RoomRecordingList(t,e){function RoomRecordingListInstance(t){return RoomRecordingListInstance.get(t)}RoomRecordingListInstance._version=t;RoomRecordingListInstance._solution={roomSid:e};RoomRecordingListInstance._uri=`/Rooms/${e}/Recordings`;RoomRecordingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RoomRecordingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RoomRecordingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Status:o.get(t,"status"),SourceSid:o.get(t,"sourceSid"),DateCreatedAfter:a.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:a.iso8601DateTime(o.get(t,"dateCreatedBefore")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomRecordingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RoomRecordingListInstance.get=function get(t){return new d(this._version,this._solution.roomSid,t)};RoomRecordingListInstance.toJSON=function toJSON(){return this._solution};RoomRecordingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RoomRecordingListInstance};f=function RoomRecordingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.roomSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RoomRecordingInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.status=e.status;this.dateCreated=c.iso8601DateTime(e.date_created);this.sid=e.sid;this.sourceSid=e.source_sid;this.size=c.integer(e.size);this.url=e.url;this.type=e.type;this.duration=c.integer(e.duration);this.containerFormat=e.container_format;this.codec=e.codec;this.groupingSids=e.grouping_sids;this.trackName=e.track_name;this.offset=c.integer(e.offset);this.roomSid=e.room_sid;this.links=e.links;this._context=undefined;this._solution={roomSid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.roomSid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RoomRecordingContext(t,e,i){this._version=t;this._solution={roomSid:e,sid:i};this._uri=`/Rooms/${e}/Recordings/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.roomSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RoomRecordingList:h,RoomRecordingPage:f,RoomRecordingInstance:p,RoomRecordingContext:d}},84704:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(95290).PublishedTrackList;var a=i(90319).SubscribeRulesList;var u=i(77901).SubscribedTrackList;var h=i(80513);var f=i(6372);var p=i(72142);var d;var l;var v;var m;d=function ParticipantList(t,e){function ParticipantListInstance(t){return ParticipantListInstance.get(t)}ParticipantListInstance._version=t;ParticipantListInstance._solution={roomSid:e};ParticipantListInstance._uri=`/Rooms/${e}/Participants`;ParticipantListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ParticipantListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ParticipantListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({Status:o.get(t,"status"),Identity:o.get(t,"identity"),DateCreatedAfter:f.iso8601DateTime(o.get(t,"dateCreatedAfter")),DateCreatedBefore:f.iso8601DateTime(o.get(t,"dateCreatedBefore")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new l(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ParticipantListInstance.get=function get(t){return new m(this._version,this._solution.roomSid,t)};ParticipantListInstance.toJSON=function toJSON(){return this._solution};ParticipantListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ParticipantListInstance};l=function ParticipantPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(l.prototype,r.prototype);l.prototype.constructor=l;l.prototype.getInstance=function getInstance(t){return new v(this._version,t,this._solution.roomSid)};l.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};v=function ParticipantInstance(t,e,i,n){this._version=t;this.sid=e.sid;this.roomSid=e.room_sid;this.accountSid=e.account_sid;this.status=e.status;this.identity=e.identity;this.dateCreated=h.iso8601DateTime(e.date_created);this.dateUpdated=h.iso8601DateTime(e.date_updated);this.startTime=h.iso8601DateTime(e.start_time);this.endTime=h.iso8601DateTime(e.end_time);this.duration=h.integer(e.duration);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={roomSid:i,sid:n||this.sid}};Object.defineProperty(v.prototype,"_proxy",{get:function(){if(!this._context){this._context=new m(this._version,this._solution.roomSid,this._solution.sid)}return this._context}});v.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};v.prototype.update=function update(t,e){return this._proxy.update(t,e)};v.prototype.publishedTracks=function publishedTracks(){return this._proxy.publishedTracks};v.prototype.subscribedTracks=function subscribedTracks(){return this._proxy.subscribedTracks};v.prototype.subscribeRules=function subscribeRules(){return this._proxy.subscribeRules};v.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};v.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};m=function ParticipantContext(t,e,i){this._version=t;this._solution={roomSid:e,sid:i};this._uri=`/Rooms/${e}/Participants/${i}`;this._publishedTracks=undefined;this._subscribedTracks=undefined;this._subscribeRules=undefined};m.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new v(this._version,t,this._solution.roomSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};m.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=p.of({Status:o.get(t,"status")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new v(this._version,t,this._solution.roomSid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};Object.defineProperty(m.prototype,"publishedTracks",{get:function(){if(!this._publishedTracks){this._publishedTracks=new c(this._version,this._solution.roomSid,this._solution.sid)}return this._publishedTracks}});Object.defineProperty(m.prototype,"subscribedTracks",{get:function(){if(!this._subscribedTracks){this._subscribedTracks=new u(this._version,this._solution.roomSid,this._solution.sid)}return this._subscribedTracks}});Object.defineProperty(m.prototype,"subscribeRules",{get:function(){if(!this._subscribeRules){this._subscribeRules=new a(this._version,this._solution.roomSid,this._solution.sid)}return this._subscribeRules}});m.prototype.toJSON=function toJSON(){return this._solution};m.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ParticipantList:d,ParticipantPage:l,ParticipantInstance:v,ParticipantContext:m}},95290:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function PublishedTrackList(t,e,i){function PublishedTrackListInstance(t){return PublishedTrackListInstance.get(t)}PublishedTrackListInstance._version=t;PublishedTrackListInstance._solution={roomSid:e,participantSid:i};PublishedTrackListInstance._uri=`/Rooms/${e}/Participants/${i}/PublishedTracks`;PublishedTrackListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};PublishedTrackListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};PublishedTrackListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PublishedTrackListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};PublishedTrackListInstance.get=function get(t){return new p(this._version,this._solution.roomSid,this._solution.participantSid,t)};PublishedTrackListInstance.toJSON=function toJSON(){return this._solution};PublishedTrackListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return PublishedTrackListInstance};h=function PublishedTrackPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.roomSid,this._solution.participantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function PublishedTrackInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.participantSid=e.participant_sid;this.roomSid=e.room_sid;this.name=e.name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.enabled=e.enabled;this.kind=e.kind;this.url=e.url;this._context=undefined;this._solution={roomSid:i,participantSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.roomSid,this._solution.participantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function PublishedTrackContext(t,e,i,n){this._version=t;this._solution={roomSid:e,participantSid:i,sid:n};this._uri=`/Rooms/${e}/Participants/${i}/PublishedTracks/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.roomSid,this._solution.participantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={PublishedTrackList:u,PublishedTrackPage:h,PublishedTrackInstance:f,PublishedTrackContext:p}},90319:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function SubscribeRulesList(t,e,i){function SubscribeRulesListInstance(t){return SubscribeRulesListInstance.get(t)}SubscribeRulesListInstance._version=t;SubscribeRulesListInstance._solution={roomSid:e,participantSid:i};SubscribeRulesListInstance._uri=`/Rooms/${e}/Participants/${i}/SubscribeRules`;SubscribeRulesListInstance.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.roomSid,this._solution.participantSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};SubscribeRulesListInstance.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Rules:a.object(o.get(t,"rules"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.roomSid,this._solution.participantSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscribeRulesListInstance.toJSON=function toJSON(){return this._solution};SubscribeRulesListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SubscribeRulesListInstance};f=function SubscribeRulesPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.roomSid,this._solution.participantSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SubscribeRulesInstance(t,e,i,n){this._version=t;this.participantSid=e.participant_sid;this.roomSid=e.room_sid;this.rules=e.rules;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={roomSid:i,participantSid:n}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SubscribeRulesList:h,SubscribeRulesPage:f,SubscribeRulesInstance:p}},77901:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SubscribedTrackList(t,e,i){function SubscribedTrackListInstance(t){return SubscribedTrackListInstance.get(t)}SubscribedTrackListInstance._version=t;SubscribedTrackListInstance._solution={roomSid:e,participantSid:i};SubscribedTrackListInstance._uri=`/Rooms/${e}/Participants/${i}/SubscribedTracks`;SubscribedTrackListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SubscribedTrackListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SubscribedTrackListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscribedTrackListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SubscribedTrackListInstance.get=function get(t){return new p(this._version,this._solution.roomSid,this._solution.participantSid,t)};SubscribedTrackListInstance.toJSON=function toJSON(){return this._solution};SubscribedTrackListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SubscribedTrackListInstance};h=function SubscribedTrackPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.roomSid,this._solution.participantSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SubscribedTrackInstance(t,e,i,n,o){this._version=t;this.sid=e.sid;this.participantSid=e.participant_sid;this.publisherSid=e.publisher_sid;this.roomSid=e.room_sid;this.name=e.name;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.enabled=e.enabled;this.kind=e.kind;this.url=e.url;this._context=undefined;this._solution={roomSid:i,participantSid:n,sid:o||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.roomSid,this._solution.participantSid,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SubscribedTrackContext(t,e,i,n){this._version=t;this._solution={roomSid:e,participantSid:i,sid:n};this._uri=`/Rooms/${e}/Participants/${i}/SubscribedTracks/${n}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.roomSid,this._solution.participantSid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SubscribedTrackList:u,SubscribedTrackPage:h,SubscribedTrackInstance:f,SubscribedTrackContext:p}},67285:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;h=function RecordingRulesList(t,e){function RecordingRulesListInstance(t){return RecordingRulesListInstance.get(t)}RecordingRulesListInstance._version=t;RecordingRulesListInstance._solution={roomSid:e};RecordingRulesListInstance._uri=`/Rooms/${e}/RecordingRules`;RecordingRulesListInstance.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.roomSid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};RecordingRulesListInstance.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Rules:a.object(o.get(t,"rules"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.roomSid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RecordingRulesListInstance.toJSON=function toJSON(){return this._solution};RecordingRulesListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RecordingRulesListInstance};f=function RecordingRulesPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.roomSid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RecordingRulesInstance(t,e,i){this._version=t;this.roomSid=e.room_sid;this.rules=e.rules;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this._context=undefined;this._solution={roomSid:i}};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RecordingRulesList:h,RecordingRulesPage:f,RecordingRulesInstance:p}},24691:(t,e,i)=>{"use strict";var n=i(90250);var o=i(47834).ByocTrunkList;var s=i(33262).ConnectionPolicyList;var r=i(20813).DialingPermissionsList;var c=i(21254).IpRecordList;var a=i(1900).SourceIpMappingList;var u=i(64351);function V1(t){u.prototype.constructor.call(this,t,"v1");this._byocTrunks=undefined;this._connectionPolicies=undefined;this._dialingPermissions=undefined;this._ipRecords=undefined;this._sourceIpMappings=undefined}n.extend(V1.prototype,u.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"byocTrunks",{get:function(){this._byocTrunks=this._byocTrunks||new o(this);return this._byocTrunks}});Object.defineProperty(V1.prototype,"connectionPolicies",{get:function(){this._connectionPolicies=this._connectionPolicies||new s(this);return this._connectionPolicies}});Object.defineProperty(V1.prototype,"dialingPermissions",{get:function(){this._dialingPermissions=this._dialingPermissions||new r(this);return this._dialingPermissions}});Object.defineProperty(V1.prototype,"ipRecords",{get:function(){this._ipRecords=this._ipRecords||new c(this);return this._ipRecords}});Object.defineProperty(V1.prototype,"sourceIpMappings",{get:function(){this._sourceIpMappings=this._sourceIpMappings||new a(this);return this._sourceIpMappings}});t.exports=V1},47834:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ByocTrunkList(t){function ByocTrunkListInstance(t){return ByocTrunkListInstance.get(t)}ByocTrunkListInstance._version=t;ByocTrunkListInstance._solution={};ByocTrunkListInstance._uri=`/ByocTrunks`;ByocTrunkListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),VoiceUrl:o.get(t,"voiceUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),StatusCallbackUrl:o.get(t,"statusCallbackUrl"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),CnamLookupEnabled:a.bool(o.get(t,"cnamLookupEnabled")),ConnectionPolicySid:o.get(t,"connectionPolicySid"),FromDomainSid:o.get(t,"fromDomainSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ByocTrunkListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ByocTrunkListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ByocTrunkListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ByocTrunkListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ByocTrunkListInstance.get=function get(t){return new d(this._version,t)};ByocTrunkListInstance.toJSON=function toJSON(){return this._solution};ByocTrunkListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ByocTrunkListInstance};f=function ByocTrunkPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ByocTrunkInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.voiceUrl=e.voice_url;this.voiceMethod=e.voice_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceFallbackMethod=e.voice_fallback_method;this.statusCallbackUrl=e.status_callback_url;this.statusCallbackMethod=e.status_callback_method;this.cnamLookupEnabled=e.cnam_lookup_enabled;this.connectionPolicySid=e.connection_policy_sid;this.fromDomainSid=e.from_domain_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ByocTrunkContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/ByocTrunks/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),VoiceUrl:o.get(t,"voiceUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),StatusCallbackUrl:o.get(t,"statusCallbackUrl"),StatusCallbackMethod:o.get(t,"statusCallbackMethod"),CnamLookupEnabled:a.bool(o.get(t,"cnamLookupEnabled")),ConnectionPolicySid:o.get(t,"connectionPolicySid"),FromDomainSid:o.get(t,"fromDomainSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ByocTrunkList:h,ByocTrunkPage:f,ByocTrunkInstance:p,ByocTrunkContext:d}},33262:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(50473).ConnectionPolicyTargetList;var c=i(60938);var a=i(80513);var u=i(72142);var h;var f;var p;var d;h=function ConnectionPolicyList(t){function ConnectionPolicyListInstance(t){return ConnectionPolicyListInstance.get(t)}ConnectionPolicyListInstance._version=t;ConnectionPolicyListInstance._solution={};ConnectionPolicyListInstance._uri=`/ConnectionPolicies`;ConnectionPolicyListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConnectionPolicyListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConnectionPolicyListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyListInstance.get=function get(t){return new d(this._version,t)};ConnectionPolicyListInstance.toJSON=function toJSON(){return this._solution};ConnectionPolicyListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConnectionPolicyListInstance};f=function ConnectionPolicyPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConnectionPolicyInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.dateCreated=a.iso8601DateTime(e.date_created);this.dateUpdated=a.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.targets=function targets(){return this._proxy.targets};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ConnectionPolicyContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/ConnectionPolicies/${e}`;this._targets=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"targets",{get:function(){if(!this._targets){this._targets=new r(this._version,this._solution.sid)}return this._targets}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConnectionPolicyList:h,ConnectionPolicyPage:f,ConnectionPolicyInstance:p,ConnectionPolicyContext:d}},50473:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function ConnectionPolicyTargetList(t,e){function ConnectionPolicyTargetListInstance(t){return ConnectionPolicyTargetListInstance.get(t)}ConnectionPolicyTargetListInstance._version=t;ConnectionPolicyTargetListInstance._solution={connectionPolicySid:e};ConnectionPolicyTargetListInstance._uri=`/ConnectionPolicies/${e}/Targets`;ConnectionPolicyTargetListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.target)){throw new Error('Required parameter "opts.target" missing.')}var i=n.defer();var s=u.of({Target:o.get(t,"target"),FriendlyName:o.get(t,"friendlyName"),Priority:o.get(t,"priority"),Weight:o.get(t,"weight"),Enabled:a.bool(o.get(t,"enabled"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.connectionPolicySid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyTargetListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};ConnectionPolicyTargetListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};ConnectionPolicyTargetListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyTargetListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};ConnectionPolicyTargetListInstance.get=function get(t){return new d(this._version,this._solution.connectionPolicySid,t)};ConnectionPolicyTargetListInstance.toJSON=function toJSON(){return this._solution};ConnectionPolicyTargetListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return ConnectionPolicyTargetListInstance};f=function ConnectionPolicyTargetPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t,this._solution.connectionPolicySid)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function ConnectionPolicyTargetInstance(t,e,i,n){this._version=t;this.accountSid=e.account_sid;this.connectionPolicySid=e.connection_policy_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.target=e.target;this.priority=c.integer(e.priority);this.weight=c.integer(e.weight);this.enabled=e.enabled;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={connectionPolicySid:i,sid:n||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.connectionPolicySid,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function ConnectionPolicyTargetContext(t,e,i){this._version=t;this._solution={connectionPolicySid:e,sid:i};this._uri=`/ConnectionPolicies/${e}/Targets/${i}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.connectionPolicySid,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({FriendlyName:o.get(t,"friendlyName"),Target:o.get(t,"target"),Priority:o.get(t,"priority"),Weight:o.get(t,"weight"),Enabled:a.bool(o.get(t,"enabled"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.connectionPolicySid,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={ConnectionPolicyTargetList:h,ConnectionPolicyTargetPage:f,ConnectionPolicyTargetInstance:p,ConnectionPolicyTargetContext:d}},20813:(t,e,i)=>{"use strict";var n=i(90250);var o=i(31669);var s=i(97584).BulkCountryUpdateList;var r=i(78266).CountryList;var c=i(64488).SettingsList;var a;a=function DialingPermissionsList(t){function DialingPermissionsListInstance(t){return DialingPermissionsListInstance.get(t)}DialingPermissionsListInstance._version=t;DialingPermissionsListInstance._solution={};DialingPermissionsListInstance._countries=undefined;DialingPermissionsListInstance._settings=undefined;DialingPermissionsListInstance._bulkCountryUpdates=undefined;Object.defineProperty(DialingPermissionsListInstance,"countries",{get:function countries(){if(!this._countries){this._countries=new r(this._version)}return this._countries}});Object.defineProperty(DialingPermissionsListInstance,"settings",{get:function settings(){if(!this._settings){this._settings=new c(this._version)}return this._settings}});Object.defineProperty(DialingPermissionsListInstance,"bulkCountryUpdates",{get:function bulkCountryUpdates(){if(!this._bulkCountryUpdates){this._bulkCountryUpdates=new s(this._version)}return this._bulkCountryUpdates}});DialingPermissionsListInstance.toJSON=function toJSON(){return this._solution};DialingPermissionsListInstance[o.inspect.custom]=function inspect(t,e){return o.inspect(this.toJSON(),e)};return DialingPermissionsListInstance};t.exports={DialingPermissionsList:a}},97584:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function BulkCountryUpdateList(t){function BulkCountryUpdateListInstance(t){return BulkCountryUpdateListInstance.get(t)}BulkCountryUpdateListInstance._version=t;BulkCountryUpdateListInstance._solution={};BulkCountryUpdateListInstance._uri=`/DialingPermissions/BulkCountryUpdates`;BulkCountryUpdateListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.updateRequest)){throw new Error('Required parameter "opts.updateRequest" missing.')}var i=n.defer();var s=a.of({UpdateRequest:o.get(t,"updateRequest")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};BulkCountryUpdateListInstance.toJSON=function toJSON(){return this._solution};BulkCountryUpdateListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return BulkCountryUpdateListInstance};h=function BulkCountryUpdatePage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function BulkCountryUpdateInstance(t,e){this._version=t;this.updateCount=c.integer(e.update_count);this.updateRequest=e.update_request;this._context=undefined;this._solution={}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={BulkCountryUpdateList:u,BulkCountryUpdatePage:h,BulkCountryUpdateInstance:f}},78266:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(4071).HighriskSpecialPrefixList;var c=i(60938);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CountryList(t){function CountryListInstance(t){return CountryListInstance.get(t)}CountryListInstance._version=t;CountryListInstance._solution={};CountryListInstance._uri=`/DialingPermissions/Countries`;CountryListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CountryListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CountryListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({IsoCode:o.get(t,"isoCode"),Continent:o.get(t,"continent"),CountryCode:o.get(t,"countryCode"),LowRiskNumbersEnabled:a.bool(o.get(t,"lowRiskNumbersEnabled")),HighRiskSpecialNumbersEnabled:a.bool(o.get(t,"highRiskSpecialNumbersEnabled")),HighRiskTollfraudNumbersEnabled:a.bool(o.get(t,"highRiskTollfraudNumbersEnabled")),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CountryListInstance.get=function get(t){return new d(this._version,t)};CountryListInstance.toJSON=function toJSON(){return this._solution};CountryListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CountryListInstance};f=function CountryPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,c.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CountryInstance(t,e,i){this._version=t;this.isoCode=e.iso_code;this.name=e.name;this.continent=e.continent;this.countryCodes=e.country_codes;this.lowRiskNumbersEnabled=e.low_risk_numbers_enabled;this.highRiskSpecialNumbersEnabled=e.high_risk_special_numbers_enabled;this.highRiskTollfraudNumbersEnabled=e.high_risk_tollfraud_numbers_enabled;this.url=e.url;this.links=e.links;this._context=undefined;this._solution={isoCode:i||this.isoCode}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.isoCode)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.highriskSpecialPrefixes=function highriskSpecialPrefixes(){return this._proxy.highriskSpecialPrefixes};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CountryContext(t,e){this._version=t;this._solution={isoCode:e};this._uri=`/DialingPermissions/Countries/${e}`;this._highriskSpecialPrefixes=undefined};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.isoCode))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(d.prototype,"highriskSpecialPrefixes",{get:function(){if(!this._highriskSpecialPrefixes){this._highriskSpecialPrefixes=new r(this._version,this._solution.isoCode)}return this._highriskSpecialPrefixes}});d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CountryList:h,CountryPage:f,CountryInstance:p,CountryContext:d}},4071:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(72142);var a;var u;var h;a=function HighriskSpecialPrefixList(t,e){function HighriskSpecialPrefixListInstance(t){return HighriskSpecialPrefixListInstance.get(t)}HighriskSpecialPrefixListInstance._version=t;HighriskSpecialPrefixListInstance._solution={isoCode:e};HighriskSpecialPrefixListInstance._uri=`/DialingPermissions/Countries/${e}/HighRiskSpecialPrefixes`;HighriskSpecialPrefixListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};HighriskSpecialPrefixListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};HighriskSpecialPrefixListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=c.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};HighriskSpecialPrefixListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new u(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};HighriskSpecialPrefixListInstance.toJSON=function toJSON(){return this._solution};HighriskSpecialPrefixListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return HighriskSpecialPrefixListInstance};u=function HighriskSpecialPrefixPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(u.prototype,r.prototype);u.prototype.constructor=u;u.prototype.getInstance=function getInstance(t){return new h(this._version,t,this._solution.isoCode)};u.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};u.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};h=function HighriskSpecialPrefixInstance(t,e,i){this._version=t;this.prefix=e.prefix;this._context=undefined;this._solution={isoCode:i}};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={HighriskSpecialPrefixList:a,HighriskSpecialPrefixPage:u,HighriskSpecialPrefixInstance:h}},64488:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;var p;u=function SettingsList(t){function SettingsListInstance(t){return SettingsListInstance.get(t)}SettingsListInstance._version=t;SettingsListInstance._solution={};SettingsListInstance.get=function get(){return new p(this._version)};SettingsListInstance.toJSON=function toJSON(){return this._solution};SettingsListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SettingsListInstance};h=function SettingsPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SettingsInstance(t,e){this._version=t;this.dialingPermissionsInheritance=e.dialing_permissions_inheritance;this.url=e.url;this._context=undefined;this._solution={}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SettingsContext(t){this._version=t;this._solution={};this._uri=`/Settings`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({DialingPermissionsInheritance:c.bool(o.get(t,"dialingPermissionsInheritance"))});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SettingsList:u,SettingsPage:h,SettingsInstance:f,SettingsContext:p}},21254:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function IpRecordList(t){function IpRecordListInstance(t){return IpRecordListInstance.get(t)}IpRecordListInstance._version=t;IpRecordListInstance._solution={};IpRecordListInstance._uri=`/IpRecords`;IpRecordListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.ipAddress)){throw new Error('Required parameter "opts.ipAddress" missing.')}var i=n.defer();var s=a.of({IpAddress:o.get(t,"ipAddress"),FriendlyName:o.get(t,"friendlyName"),CidrPrefixLength:o.get(t,"cidrPrefixLength")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpRecordListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};IpRecordListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};IpRecordListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpRecordListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};IpRecordListInstance.get=function get(t){return new p(this._version,t)};IpRecordListInstance.toJSON=function toJSON(){return this._solution};IpRecordListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return IpRecordListInstance};h=function IpRecordPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function IpRecordInstance(t,e,i){this._version=t;this.accountSid=e.account_sid;this.sid=e.sid;this.friendlyName=e.friendly_name;this.ipAddress=e.ip_address;this.cidrPrefixLength=c.integer(e.cidr_prefix_length);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function IpRecordContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/IpRecords/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={IpRecordList:u,IpRecordPage:h,IpRecordInstance:f,IpRecordContext:p}},1900:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;var p;u=function SourceIpMappingList(t){function SourceIpMappingListInstance(t){return SourceIpMappingListInstance.get(t)}SourceIpMappingListInstance._version=t;SourceIpMappingListInstance._solution={};SourceIpMappingListInstance._uri=`/SourceIpMappings`;SourceIpMappingListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.ipRecordSid)){throw new Error('Required parameter "opts.ipRecordSid" missing.')}if(o.isUndefined(t.sipDomainSid)){throw new Error('Required parameter "opts.sipDomainSid" missing.')}var i=n.defer();var s=a.of({IpRecordSid:o.get(t,"ipRecordSid"),SipDomainSid:o.get(t,"sipDomainSid")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SourceIpMappingListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SourceIpMappingListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SourceIpMappingListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SourceIpMappingListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SourceIpMappingListInstance.get=function get(t){return new p(this._version,t)};SourceIpMappingListInstance.toJSON=function toJSON(){return this._solution};SourceIpMappingListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SourceIpMappingListInstance};h=function SourceIpMappingPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function SourceIpMappingInstance(t,e,i){this._version=t;this.sid=e.sid;this.ipRecordSid=e.ip_record_sid;this.sipDomainSid=e.sip_domain_sid;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(f.prototype,"_proxy",{get:function(){if(!this._context){this._context=new p(this._version,this._solution.sid)}return this._context}});f.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};f.prototype.update=function update(t,e){return this._proxy.update(t,e)};f.prototype.remove=function remove(t){return this._proxy.remove(t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function SourceIpMappingContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/SourceIpMappings/${e}`};p.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new f(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.update=function update(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.sipDomainSid)){throw new Error('Required parameter "opts.sipDomainSid" missing.')}var i=n.defer();var s=a.of({SipDomainSid:o.get(t,"sipDomainSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};p.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};p.prototype.toJSON=function toJSON(){return this._solution};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SourceIpMappingList:u,SourceIpMappingPage:h,SourceIpMappingInstance:f,SourceIpMappingContext:p}},57415:(t,e,i)=>{"use strict";var n=i(90250);var o=i(24495).CommandList;var s=i(59059).RatePlanList;var r=i(4131).SimList;var c=i(32878).UsageRecordList;var a=i(64351);function V1(t){a.prototype.constructor.call(this,t,"v1");this._usageRecords=undefined;this._commands=undefined;this._ratePlans=undefined;this._sims=undefined}n.extend(V1.prototype,a.prototype);V1.prototype.constructor=V1;Object.defineProperty(V1.prototype,"usageRecords",{get:function(){this._usageRecords=this._usageRecords||new c(this);return this._usageRecords}});Object.defineProperty(V1.prototype,"commands",{get:function(){this._commands=this._commands||new o(this);return this._commands}});Object.defineProperty(V1.prototype,"ratePlans",{get:function(){this._ratePlans=this._ratePlans||new s(this);return this._ratePlans}});Object.defineProperty(V1.prototype,"sims",{get:function(){this._sims=this._sims||new r(this);return this._sims}});t.exports=V1},24495:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function CommandList(t){function CommandListInstance(t){return CommandListInstance.get(t)}CommandListInstance._version=t;CommandListInstance._solution={};CommandListInstance._uri=`/Commands`;CommandListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};CommandListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};CommandListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({Sim:o.get(t,"sim"),Status:o.get(t,"status"),Direction:o.get(t,"direction"),Transport:o.get(t,"transport"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.create=function create(t,e){if(o.isUndefined(t)){throw new Error('Required parameter "opts" missing.')}if(o.isUndefined(t.command)){throw new Error('Required parameter "opts.command" missing.')}var i=n.defer();var s=u.of({Command:o.get(t,"command"),Sim:o.get(t,"sim"),CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl"),CommandMode:o.get(t,"commandMode"),IncludeSid:o.get(t,"includeSid"),DeliveryReceiptRequested:a.bool(o.get(t,"deliveryReceiptRequested"))});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};CommandListInstance.get=function get(t){return new d(this._version,t)};CommandListInstance.toJSON=function toJSON(){return this._solution};CommandListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return CommandListInstance};f=function CommandPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function CommandInstance(t,e,i){this._version=t;this.sid=e.sid;this.accountSid=e.account_sid;this.simSid=e.sim_sid;this.command=e.command;this.commandMode=e.command_mode;this.transport=e.transport;this.deliveryReceiptRequested=e.delivery_receipt_requested;this.status=e.status;this.direction=e.direction;this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function CommandContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Commands/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={CommandList:h,CommandPage:f,CommandInstance:p,CommandContext:d}},59059:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(6372);var u=i(72142);var h;var f;var p;var d;h=function RatePlanList(t){function RatePlanListInstance(t){return RatePlanListInstance.get(t)}RatePlanListInstance._version=t;RatePlanListInstance._solution={};RatePlanListInstance._uri=`/RatePlans`;RatePlanListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};RatePlanListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};RatePlanListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new f(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.create=function create(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName"),DataEnabled:a.bool(o.get(t,"dataEnabled")),DataLimit:o.get(t,"dataLimit"),DataMetering:o.get(t,"dataMetering"),MessagingEnabled:a.bool(o.get(t,"messagingEnabled")),VoiceEnabled:a.bool(o.get(t,"voiceEnabled")),NationalRoamingEnabled:a.bool(o.get(t,"nationalRoamingEnabled")),InternationalRoaming:a.map(o.get(t,"internationalRoaming"),function(t){return t}),NationalRoamingDataLimit:o.get(t,"nationalRoamingDataLimit"),InternationalRoamingDataLimit:o.get(t,"internationalRoamingDataLimit")});var r=this._version.create({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};RatePlanListInstance.get=function get(t){return new d(this._version,t)};RatePlanListInstance.toJSON=function toJSON(){return this._solution};RatePlanListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return RatePlanListInstance};f=function RatePlanPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(f.prototype,r.prototype);f.prototype.constructor=f;f.prototype.getInstance=function getInstance(t){return new p(this._version,t)};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};p=function RatePlanInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.friendlyName=e.friendly_name;this.dataEnabled=e.data_enabled;this.dataMetering=e.data_metering;this.dataLimit=c.integer(e.data_limit);this.messagingEnabled=e.messaging_enabled;this.voiceEnabled=e.voice_enabled;this.nationalRoamingEnabled=e.national_roaming_enabled;this.nationalRoamingDataLimit=c.integer(e.national_roaming_data_limit);this.internationalRoaming=e.international_roaming;this.internationalRoamingDataLimit=c.integer(e.international_roaming_data_limit);this.dateCreated=c.iso8601DateTime(e.date_created);this.dateUpdated=c.iso8601DateTime(e.date_updated);this.url=e.url;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(p.prototype,"_proxy",{get:function(){if(!this._context){this._context=new d(this._version,this._solution.sid)}return this._context}});p.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};p.prototype.update=function update(t,e){return this._proxy.update(t,e)};p.prototype.remove=function remove(t){return this._proxy.remove(t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function RatePlanContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/RatePlans/${e}`};d.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new p(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=u.of({UniqueName:o.get(t,"uniqueName"),FriendlyName:o.get(t,"friendlyName")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};d.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};d.prototype.toJSON=function toJSON(){return this._solution};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={RatePlanList:h,RatePlanPage:f,RatePlanInstance:p,RatePlanContext:d}},4131:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(48120).DataSessionList;var c=i(60938);var a=i(89630).UsageRecordList;var u=i(80513);var h=i(72142);var f;var p;var d;var l;f=function SimList(t){function SimListInstance(t){return SimListInstance.get(t)}SimListInstance._version=t;SimListInstance._solution={};SimListInstance._uri=`/Sims`;SimListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};SimListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};SimListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({Status:o.get(t,"status"),Iccid:o.get(t,"iccid"),RatePlan:o.get(t,"ratePlan"),EId:o.get(t,"eId"),SimRegistrationCode:o.get(t,"simRegistrationCode"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new p(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};SimListInstance.get=function get(t){return new l(this._version,t)};SimListInstance.toJSON=function toJSON(){return this._solution};SimListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return SimListInstance};p=function SimPage(t,e,i){this._solution=i;c.prototype.constructor.call(this,t,e,this._solution)};o.extend(p.prototype,c.prototype);p.prototype.constructor=p;p.prototype.getInstance=function getInstance(t){return new d(this._version,t)};p.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};p.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};d=function SimInstance(t,e,i){this._version=t;this.sid=e.sid;this.uniqueName=e.unique_name;this.accountSid=e.account_sid;this.ratePlanSid=e.rate_plan_sid;this.friendlyName=e.friendly_name;this.iccid=e.iccid;this.eId=e.e_id;this.status=e.status;this.resetStatus=e.reset_status;this.commandsCallbackUrl=e.commands_callback_url;this.commandsCallbackMethod=e.commands_callback_method;this.smsFallbackMethod=e.sms_fallback_method;this.smsFallbackUrl=e.sms_fallback_url;this.smsMethod=e.sms_method;this.smsUrl=e.sms_url;this.voiceFallbackMethod=e.voice_fallback_method;this.voiceFallbackUrl=e.voice_fallback_url;this.voiceMethod=e.voice_method;this.voiceUrl=e.voice_url;this.dateCreated=u.iso8601DateTime(e.date_created);this.dateUpdated=u.iso8601DateTime(e.date_updated);this.url=e.url;this.links=e.links;this.ipAddress=e.ip_address;this._context=undefined;this._solution={sid:i||this.sid}};Object.defineProperty(d.prototype,"_proxy",{get:function(){if(!this._context){this._context=new l(this._version,this._solution.sid)}return this._context}});d.prototype.fetch=function fetch(t){return this._proxy.fetch(t)};d.prototype.update=function update(t,e){return this._proxy.update(t,e)};d.prototype.remove=function remove(t){return this._proxy.remove(t)};d.prototype.usageRecords=function usageRecords(){return this._proxy.usageRecords};d.prototype.dataSessions=function dataSessions(){return this._proxy.dataSessions};d.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};d.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};l=function SimContext(t,e){this._version=t;this._solution={sid:e};this._uri=`/Sims/${e}`;this._usageRecords=undefined;this._dataSessions=undefined};l.prototype.fetch=function fetch(t){var e=n.defer();var i=this._version.fetch({uri:this._uri,method:"GET"});i=i.then(function(t){e.resolve(new d(this._version,t,this._solution.sid))}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};l.prototype.update=function update(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=h.of({UniqueName:o.get(t,"uniqueName"),CallbackMethod:o.get(t,"callbackMethod"),CallbackUrl:o.get(t,"callbackUrl"),FriendlyName:o.get(t,"friendlyName"),RatePlan:o.get(t,"ratePlan"),Status:o.get(t,"status"),CommandsCallbackMethod:o.get(t,"commandsCallbackMethod"),CommandsCallbackUrl:o.get(t,"commandsCallbackUrl"),SmsFallbackMethod:o.get(t,"smsFallbackMethod"),SmsFallbackUrl:o.get(t,"smsFallbackUrl"),SmsMethod:o.get(t,"smsMethod"),SmsUrl:o.get(t,"smsUrl"),VoiceFallbackMethod:o.get(t,"voiceFallbackMethod"),VoiceFallbackUrl:o.get(t,"voiceFallbackUrl"),VoiceMethod:o.get(t,"voiceMethod"),VoiceUrl:o.get(t,"voiceUrl"),ResetStatus:o.get(t,"resetStatus"),AccountSid:o.get(t,"accountSid")});var r=this._version.update({uri:this._uri,method:"POST",data:s});r=r.then(function(t){i.resolve(new d(this._version,t,this._solution.sid))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};l.prototype.remove=function remove(t){var e=n.defer();var i=this._version.remove({uri:this._uri,method:"DELETE"});i=i.then(function(t){e.resolve(t)}.bind(this));i.catch(function(t){e.reject(t)});if(o.isFunction(t)){e.promise.nodeify(t)}return e.promise};Object.defineProperty(l.prototype,"usageRecords",{get:function(){if(!this._usageRecords){this._usageRecords=new a(this._version,this._solution.sid)}return this._usageRecords}});Object.defineProperty(l.prototype,"dataSessions",{get:function(){if(!this._dataSessions){this._dataSessions=new r(this._version,this._solution.sid)}return this._dataSessions}});l.prototype.toJSON=function toJSON(){return this._solution};l.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={SimList:f,SimPage:p,SimInstance:d,SimContext:l}},48120:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(80513);var a=i(72142);var u;var h;var f;u=function DataSessionList(t,e){function DataSessionListInstance(t){return DataSessionListInstance.get(t)}DataSessionListInstance._version=t;DataSessionListInstance._solution={simSid:e};DataSessionListInstance._uri=`/Sims/${e}/DataSessions`;DataSessionListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};DataSessionListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};DataSessionListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DataSessionListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};DataSessionListInstance.toJSON=function toJSON(){return this._solution};DataSessionListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return DataSessionListInstance};h=function DataSessionPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.simSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function DataSessionInstance(t,e,i){this._version=t;this.sid=e.sid;this.simSid=e.sim_sid;this.accountSid=e.account_sid;this.radioLink=e.radio_link;this.operatorMcc=e.operator_mcc;this.operatorMnc=e.operator_mnc;this.operatorCountry=e.operator_country;this.operatorName=e.operator_name;this.cellId=e.cell_id;this.cellLocationEstimate=e.cell_location_estimate;this.packetsUploaded=c.integer(e.packets_uploaded);this.packetsDownloaded=c.integer(e.packets_downloaded);this.lastUpdated=c.iso8601DateTime(e.last_updated);this.start=c.iso8601DateTime(e.start);this.end=c.iso8601DateTime(e.end);this.imei=e.imei;this._context=undefined;this._solution={simSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={DataSessionList:u,DataSessionPage:h,DataSessionInstance:f}},89630:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;u=function UsageRecordList(t,e){function UsageRecordListInstance(t){return UsageRecordListInstance.get(t)}UsageRecordListInstance._version=t;UsageRecordListInstance._solution={simSid:e};UsageRecordListInstance._uri=`/Sims/${e}/UsageRecords`;UsageRecordListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UsageRecordListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UsageRecordListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({End:c.iso8601DateTime(o.get(t,"end")),Start:c.iso8601DateTime(o.get(t,"start")),Granularity:o.get(t,"granularity"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.toJSON=function toJSON(){return this._solution};UsageRecordListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UsageRecordListInstance};h=function UsageRecordPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t,this._solution.simSid)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UsageRecordInstance(t,e,i){this._version=t;this.simSid=e.sim_sid;this.accountSid=e.account_sid;this.period=e.period;this.commands=e.commands;this.data=e.data;this._context=undefined;this._solution={simSid:i}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UsageRecordList:u,UsageRecordPage:h,UsageRecordInstance:f}},32878:(t,e,i)=>{"use strict";var n=i(56172);var o=i(90250);var s=i(31669);var r=i(60938);var c=i(6372);var a=i(72142);var u;var h;var f;u=function UsageRecordList(t){function UsageRecordListInstance(t){return UsageRecordListInstance.get(t)}UsageRecordListInstance._version=t;UsageRecordListInstance._solution={};UsageRecordListInstance._uri=`/UsageRecords`;UsageRecordListInstance.each=function each(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};if(t.callback){e=t.callback}if(o.isUndefined(e)){throw new Error("Callback function must be provided")}var i=false;var n=1;var s=0;var r=this._version.readLimits({limit:t.limit,pageSize:t.pageSize});function onComplete(e){i=true;if(o.isFunction(t.done)){t.done(e)}}function fetchNextPage(c){var a=c();if(o.isUndefined(a)){onComplete();return}a.then(function(c){o.each(c.instances,function(n){if(i||!o.isUndefined(t.limit)&&s>=t.limit){i=true;return false}s++;e(n,onComplete)});if(r.pageLimit&&r.pageLimit<=n){onComplete()}else if(!i){n++;fetchNextPage(o.bind(c.nextPage,c))}});a.catch(onComplete)}fetchNextPage(o.bind(this.page,this,o.merge(t,r)))};UsageRecordListInstance.list=function list(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=[];t.callback=function(e,i){s.push(e);if(!o.isUndefined(t.limit)&&s.length===t.limit){i()}};t.done=function(t){if(o.isUndefined(t)){i.resolve(s)}else{i.reject(t)}};if(o.isFunction(e)){i.promise.nodeify(e)}this.each(t);return i.promise};UsageRecordListInstance.page=function page(t,e){if(o.isFunction(t)){e=t;t={}}t=t||{};var i=n.defer();var s=a.of({End:c.iso8601DateTime(o.get(t,"end")),Start:c.iso8601DateTime(o.get(t,"start")),Granularity:o.get(t,"granularity"),PageToken:t.pageToken,Page:t.pageNumber,PageSize:t.pageSize});var r=this._version.page({uri:this._uri,method:"GET",params:s});r=r.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));r.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.getPage=function getPage(t,e){var i=n.defer();var s=this._version._domain.twilio.request({method:"GET",uri:t});s=s.then(function(t){i.resolve(new h(this._version,t,this._solution))}.bind(this));s.catch(function(t){i.reject(t)});if(o.isFunction(e)){i.promise.nodeify(e)}return i.promise};UsageRecordListInstance.toJSON=function toJSON(){return this._solution};UsageRecordListInstance[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};return UsageRecordListInstance};h=function UsageRecordPage(t,e,i){this._solution=i;r.prototype.constructor.call(this,t,e,this._solution)};o.extend(h.prototype,r.prototype);h.prototype.constructor=h;h.prototype.getInstance=function getInstance(t){return new f(this._version,t)};h.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};h.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};f=function UsageRecordInstance(t,e){this._version=t;this.accountSid=e.account_sid;this.period=e.period;this.commands=e.commands;this.data=e.data;this._context=undefined;this._solution={}};f.prototype.toJSON=function toJSON(){let t={};o.forOwn(this,function(e,i){if(!o.startsWith(i,"_")&&!o.isFunction(e)){t[i]=e}});return t};f.prototype[s.inspect.custom]=function inspect(t,e){return s.inspect(this.toJSON(),e)};t.exports={UsageRecordList:u,UsageRecordPage:h,UsageRecordInstance:f}},18682:(t,e,i)=>{"use strict";var n=i(18671);function FaxResponse(){n.call(this);this._propertyName="response"}FaxResponse.prototype=Object.create(n.prototype);FaxResponse.prototype.constructor=FaxResponse;FaxResponse.prototype.receive=function receive(t){return new Receive(this.response.ele("Receive",t))};function Receive(t){this.receive=t;this._propertyName="receive"}Receive.prototype=Object.create(n.prototype);Receive.prototype.constructor=Receive;t.exports=FaxResponse},53341:(t,e,i)=>{"use strict";var n=i(18671);function MessagingResponse(){n.call(this);this._propertyName="response"}MessagingResponse.prototype=Object.create(n.prototype);MessagingResponse.prototype.constructor=MessagingResponse;MessagingResponse.prototype.message=function message(t,e){return new Message(this.response.ele("Message",t,e))};MessagingResponse.prototype.redirect=function redirect(t,e){return new Redirect(this.response.ele("Redirect",t,e))};function Redirect(t){this.redirect=t;this._propertyName="redirect"}Redirect.prototype=Object.create(n.prototype);Redirect.prototype.constructor=Redirect;function Message(t){this.message=t;this._propertyName="message"}Message.prototype=Object.create(n.prototype);Message.prototype.constructor=Message;Message.prototype.body=function body(t,e){return new Body(this.message.ele("Body",t,e))};Message.prototype.media=function media(t,e){return new Media(this.message.ele("Media",t,e))};function Media(t){this.media=t;this._propertyName="media"}Media.prototype=Object.create(n.prototype);Media.prototype.constructor=Media;function Body(t){this.body=t;this._propertyName="body"}Body.prototype=Object.create(n.prototype);Body.prototype.constructor=Body;t.exports=MessagingResponse},18671:(t,e,i)=>{"use strict";var n=i(52958);function TwiML(){this.response=n.create("Response",{stringify:{attValue:function(t){if(Array.isArray(t)){t=t.join(" ")}return this.attEscape(""+t||"")}}}).dec("1.0","UTF-8")}TwiML.prototype._getXml=function _getPropertyName(){return this[this._propertyName]};TwiML.prototype.toString=function toString(){return this._getXml().end()};TwiML.prototype.addText=function addText(t){this._getXml().txt(t)};TwiML.prototype.addChild=function addChild(t,e){return new GenericNode(this._getXml().ele(t,e))};function GenericNode(t){this.node=t;this._propertyName="node"}GenericNode.prototype=Object.create(TwiML.prototype);GenericNode.prototype.constructor=GenericNode;t.exports=TwiML},28905:(t,e,i)=>{"use strict";var n=i(31669);var o=i(18671);function VoiceResponse(){o.call(this);this._propertyName="response"}VoiceResponse.prototype=Object.create(o.prototype);VoiceResponse.prototype.constructor=VoiceResponse;VoiceResponse.prototype.connect=function connect(t){return new Connect(this.response.ele("Connect",t))};VoiceResponse.prototype.dial=function dial(t,e){return new Dial(this.response.ele("Dial",t,e))};VoiceResponse.prototype.echo=function echo(t){return new Echo(this.response.ele("Echo",t))};VoiceResponse.prototype.enqueue=function enqueue(t,e){return new Enqueue(this.response.ele("Enqueue",t,e))};VoiceResponse.prototype.gather=function gather(t){return new Gather(this.response.ele("Gather",t))};VoiceResponse.prototype.hangup=function hangup(t){return new Hangup(this.response.ele("Hangup",t))};VoiceResponse.prototype.leave=function leave(t){return new Leave(this.response.ele("Leave",t))};VoiceResponse.prototype.pause=function pause(t){return new Pause(this.response.ele("Pause",t))};VoiceResponse.prototype.play=function play(t,e){return new Play(this.response.ele("Play",t,e))};VoiceResponse.prototype.queue=function queue(t,e){return new Queue(this.response.ele("Queue",t,e))};VoiceResponse.prototype.record=function record(t){return new Record(this.response.ele("Record",t))};VoiceResponse.prototype.redirect=function redirect(t,e){return new Redirect(this.response.ele("Redirect",t,e))};VoiceResponse.prototype.reject=function reject(t){return new Reject(this.response.ele("Reject",t))};VoiceResponse.prototype.say=function say(t,e){return new Say(this.response.ele("Say",t,e))};VoiceResponse.prototype.sms=function sms(t,e){return new Sms(this.response.ele("Sms",t,e))};VoiceResponse.prototype.pay=function pay(t){return new Pay(this.response.ele("Pay",t))};VoiceResponse.prototype.prompt=function prompt(t){return new Prompt(this.response.ele("Prompt",t))};VoiceResponse.prototype.start=function start(t){return new Start(this.response.ele("Start",t))};VoiceResponse.prototype.stop=function stop(t){return new Stop(this.response.ele("Stop",t))};VoiceResponse.prototype.refer=function refer(t){return new Refer(this.response.ele("Refer",t))};function Refer(t){this.refer=t;this._propertyName="refer"}Refer.prototype=Object.create(o.prototype);Refer.prototype.constructor=Refer;Refer.prototype.sip=function sip(t,e){return new ReferSip(this.refer.ele("Sip",t,e))};Refer.prototype.referSip=n.deprecate(function referSip(t,e){return this.sip(t,e)},"referSip() is deprecated. Use sip() instead.");function ReferSip(t){this.referSip=t;this._propertyName="referSip"}ReferSip.prototype=Object.create(o.prototype);ReferSip.prototype.constructor=ReferSip;function Stop(t){this.stop=t;this._propertyName="stop"}Stop.prototype=Object.create(o.prototype);Stop.prototype.constructor=Stop;Stop.prototype.stream=function stream(t){return new Stream(this.stop.ele("Stream",t))};Stop.prototype.siprec=function siprec(t){return new Siprec(this.stop.ele("Siprec",t))};function Siprec(t){this.siprec=t;this._propertyName="siprec"}Siprec.prototype=Object.create(o.prototype);Siprec.prototype.constructor=Siprec;Siprec.prototype.parameter=function parameter(t){return new Parameter(this.siprec.ele("Parameter",t))};function Parameter(t){this.parameter=t;this._propertyName="parameter"}Parameter.prototype=Object.create(o.prototype);Parameter.prototype.constructor=Parameter;function Stream(t){this.stream=t;this._propertyName="stream"}Stream.prototype=Object.create(o.prototype);Stream.prototype.constructor=Stream;Stream.prototype.parameter=function parameter(t){return new Parameter(this.stream.ele("Parameter",t))};function Start(t){this.start=t;this._propertyName="start"}Start.prototype=Object.create(o.prototype);Start.prototype.constructor=Start;Start.prototype.stream=function stream(t){return new Stream(this.start.ele("Stream",t))};Start.prototype.siprec=function siprec(t){return new Siprec(this.start.ele("Siprec",t))};function Prompt(t){this.prompt=t;this._propertyName="prompt"}Prompt.prototype=Object.create(o.prototype);Prompt.prototype.constructor=Prompt;Prompt.prototype.say=function say(t,e){return new Say(this.prompt.ele("Say",t,e))};Prompt.prototype.play=function play(t,e){return new Play(this.prompt.ele("Play",t,e))};Prompt.prototype.pause=function pause(t){return new Pause(this.prompt.ele("Pause",t))};function Pause(t){this.pause=t;this._propertyName="pause"}Pause.prototype=Object.create(o.prototype);Pause.prototype.constructor=Pause;function Play(t){this.play=t;this._propertyName="play"}Play.prototype=Object.create(o.prototype);Play.prototype.constructor=Play;function Say(t){this.say=t;this._propertyName="say"}Say.prototype=Object.create(o.prototype);Say.prototype.constructor=Say;Say.prototype.break_=function break_(t){return new SsmlBreak(this.say.ele("break",t))};Say.prototype.ssmlBreak=n.deprecate(function ssmlBreak(t){return this.break_(t)},"ssmlBreak() is deprecated. Use break_() instead.");Say.prototype.emphasis=function emphasis(t,e){return new SsmlEmphasis(this.say.ele("emphasis",t,e))};Say.prototype.ssmlEmphasis=n.deprecate(function ssmlEmphasis(t,e){return this.emphasis(t,e)},"ssmlEmphasis() is deprecated. Use emphasis() instead.");Say.prototype.lang=function lang(t,e){return new SsmlLang(this.say.ele("lang",t,e))};Say.prototype.ssmlLang=n.deprecate(function ssmlLang(t,e){return this.lang(t,e)},"ssmlLang() is deprecated. Use lang() instead.");Say.prototype.p=function p(t,e){return new SsmlP(this.say.ele("p",t,e))};Say.prototype.ssmlP=n.deprecate(function ssmlP(t,e){return this.p(t,e)},"ssmlP() is deprecated. Use p() instead.");Say.prototype.phoneme=function phoneme(t,e){return new SsmlPhoneme(this.say.ele("phoneme",t,e))};Say.prototype.ssmlPhoneme=n.deprecate(function ssmlPhoneme(t,e){return this.phoneme(t,e)},"ssmlPhoneme() is deprecated. Use phoneme() instead.");Say.prototype.prosody=function prosody(t,e){return new SsmlProsody(this.say.ele("prosody",t,e))};Say.prototype.ssmlProsody=n.deprecate(function ssmlProsody(t,e){return this.prosody(t,e)},"ssmlProsody() is deprecated. Use prosody() instead.");Say.prototype.s=function s(t,e){return new SsmlS(this.say.ele("s",t,e))};Say.prototype.ssmlS=n.deprecate(function ssmlS(t,e){return this.s(t,e)},"ssmlS() is deprecated. Use s() instead.");Say.prototype.sayAs=function sayAs(t,e){return new SsmlSayAs(this.say.ele("say-as",t,e))};Say.prototype.ssmlSayAs=n.deprecate(function ssmlSayAs(t,e){return this.sayAs(t,e)},"ssmlSayAs() is deprecated. Use sayAs() instead.");Say.prototype.sub=function sub(t,e){return new SsmlSub(this.say.ele("sub",t,e))};Say.prototype.ssmlSub=n.deprecate(function ssmlSub(t,e){return this.sub(t,e)},"ssmlSub() is deprecated. Use sub() instead.");Say.prototype.w=function w(t,e){return new SsmlW(this.say.ele("w",t,e))};Say.prototype.ssmlW=n.deprecate(function ssmlW(t,e){return this.w(t,e)},"ssmlW() is deprecated. Use w() instead.");function SsmlW(t){this.ssmlW=t;this._propertyName="ssmlW"}SsmlW.prototype=Object.create(o.prototype);SsmlW.prototype.constructor=SsmlW;function SsmlSub(t){this.ssmlSub=t;this._propertyName="ssmlSub"}SsmlSub.prototype=Object.create(o.prototype);SsmlSub.prototype.constructor=SsmlSub;function SsmlSayAs(t){this.ssmlSayAs=t;this._propertyName="ssmlSayAs"}SsmlSayAs.prototype=Object.create(o.prototype);SsmlSayAs.prototype.constructor=SsmlSayAs;function SsmlS(t){this.ssmlS=t;this._propertyName="ssmlS"}SsmlS.prototype=Object.create(o.prototype);SsmlS.prototype.constructor=SsmlS;function SsmlProsody(t){this.ssmlProsody=t;this._propertyName="ssmlProsody"}SsmlProsody.prototype=Object.create(o.prototype);SsmlProsody.prototype.constructor=SsmlProsody;function SsmlPhoneme(t){this.ssmlPhoneme=t;this._propertyName="ssmlPhoneme"}SsmlPhoneme.prototype=Object.create(o.prototype);SsmlPhoneme.prototype.constructor=SsmlPhoneme;function SsmlP(t){this.ssmlP=t;this._propertyName="ssmlP"}SsmlP.prototype=Object.create(o.prototype);SsmlP.prototype.constructor=SsmlP;function SsmlLang(t){this.ssmlLang=t;this._propertyName="ssmlLang"}SsmlLang.prototype=Object.create(o.prototype);SsmlLang.prototype.constructor=SsmlLang;function SsmlEmphasis(t){this.ssmlEmphasis=t;this._propertyName="ssmlEmphasis"}SsmlEmphasis.prototype=Object.create(o.prototype);SsmlEmphasis.prototype.constructor=SsmlEmphasis;function SsmlBreak(t){this.ssmlBreak=t;this._propertyName="ssmlBreak"}SsmlBreak.prototype=Object.create(o.prototype);SsmlBreak.prototype.constructor=SsmlBreak;function Pay(t){this.pay=t;this._propertyName="pay"}Pay.prototype=Object.create(o.prototype);Pay.prototype.constructor=Pay;Pay.prototype.prompt=function prompt(t){return new Prompt(this.pay.ele("Prompt",t))};Pay.prototype.parameter=function parameter(t){return new Parameter(this.pay.ele("Parameter",t))};function Sms(t){this.sms=t;this._propertyName="sms"}Sms.prototype=Object.create(o.prototype);Sms.prototype.constructor=Sms;function Reject(t){this.reject=t;this._propertyName="reject"}Reject.prototype=Object.create(o.prototype);Reject.prototype.constructor=Reject;function Redirect(t){this.redirect=t;this._propertyName="redirect"}Redirect.prototype=Object.create(o.prototype);Redirect.prototype.constructor=Redirect;function Record(t){this.record=t;this._propertyName="record"}Record.prototype=Object.create(o.prototype);Record.prototype.constructor=Record;function Queue(t){this.queue=t;this._propertyName="queue"}Queue.prototype=Object.create(o.prototype);Queue.prototype.constructor=Queue;function Leave(t){this.leave=t;this._propertyName="leave"}Leave.prototype=Object.create(o.prototype);Leave.prototype.constructor=Leave;function Hangup(t){this.hangup=t;this._propertyName="hangup"}Hangup.prototype=Object.create(o.prototype);Hangup.prototype.constructor=Hangup;function Gather(t){this.gather=t;this._propertyName="gather"}Gather.prototype=Object.create(o.prototype);Gather.prototype.constructor=Gather;Gather.prototype.say=function say(t,e){return new Say(this.gather.ele("Say",t,e))};Gather.prototype.pause=function pause(t){return new Pause(this.gather.ele("Pause",t))};Gather.prototype.play=function play(t,e){return new Play(this.gather.ele("Play",t,e))};function Enqueue(t){this.enqueue=t;this._propertyName="enqueue"}Enqueue.prototype=Object.create(o.prototype);Enqueue.prototype.constructor=Enqueue;Enqueue.prototype.task=function task(t,e){return new Task(this.enqueue.ele("Task",t,e))};function Task(t){this.task=t;this._propertyName="task"}Task.prototype=Object.create(o.prototype);Task.prototype.constructor=Task;function Echo(t){this.echo=t;this._propertyName="echo"}Echo.prototype=Object.create(o.prototype);Echo.prototype.constructor=Echo;function Dial(t){this.dial=t;this._propertyName="dial"}Dial.prototype=Object.create(o.prototype);Dial.prototype.constructor=Dial;Dial.prototype.client=function client(t,e){return new Client(this.dial.ele("Client",t,e))};Dial.prototype.conference=function conference(t,e){return new Conference(this.dial.ele("Conference",t,e))};Dial.prototype.number=function number(t,e){return new Number(this.dial.ele("Number",t,e))};Dial.prototype.queue=function queue(t,e){return new Queue(this.dial.ele("Queue",t,e))};Dial.prototype.sim=function sim(t,e){return new Sim(this.dial.ele("Sim",t,e))};Dial.prototype.sip=function sip(t,e){return new Sip(this.dial.ele("Sip",t,e))};function Sip(t){this.sip=t;this._propertyName="sip"}Sip.prototype=Object.create(o.prototype);Sip.prototype.constructor=Sip;function Sim(t){this.sim=t;this._propertyName="sim"}Sim.prototype=Object.create(o.prototype);Sim.prototype.constructor=Sim;function Number(t){this.number=t;this._propertyName="number"}Number.prototype=Object.create(o.prototype);Number.prototype.constructor=Number;function Conference(t){this.conference=t;this._propertyName="conference"}Conference.prototype=Object.create(o.prototype);Conference.prototype.constructor=Conference;function Client(t){this.client=t;this._propertyName="client"}Client.prototype=Object.create(o.prototype);Client.prototype.constructor=Client;Client.prototype.identity=function identity(t,e){return new Identity(this.client.ele("Identity",t,e))};Client.prototype.parameter=function parameter(t){return new Parameter(this.client.ele("Parameter",t))};function Identity(t){this.identity=t;this._propertyName="identity"}Identity.prototype=Object.create(o.prototype);Identity.prototype.constructor=Identity;function Connect(t){this.connect=t;this._propertyName="connect"}Connect.prototype=Object.create(o.prototype);Connect.prototype.constructor=Connect;Connect.prototype.room=function room(t,e){return new Room(this.connect.ele("Room",t,e))};Connect.prototype.autopilot=function autopilot(t,e){return new Autopilot(this.connect.ele("Autopilot",t,e))};Connect.prototype.stream=function stream(t){return new Stream(this.connect.ele("Stream",t))};function Autopilot(t){this.autopilot=t;this._propertyName="autopilot"}Autopilot.prototype=Object.create(o.prototype);Autopilot.prototype.constructor=Autopilot;function Room(t){this.room=t;this._propertyName="room"}Room.prototype=Object.create(o.prototype);Room.prototype.constructor=Room;t.exports=VoiceResponse},19149:(t,e,i)=>{"use strict";var n=i(76417);var o=i(90250);var s=i(8812);var r=i(78835);var c=i(25682);function buildUrlWithStandardPort(t){let e="";const i=t.protocol==="https:"?":443":":80";e+=t.protocol?t.protocol+"//":"";e+=t.username;e+=t.password?":"+t.password:"";e+=t.username||t.password?"@":"";e+=t.host?t.host+i:"";e+=t.pathname+t.query+t.hash;return e}function addPort(t){if(!t.port){return buildUrlWithStandardPort(t)}return t.toString()}function removePort(t){t.set("port","");return t.toString()}function getExpectedTwilioSignature(t,e,i){if(e.indexOf("bodySHA256")!==-1){i={}}var o=Object.keys(i).sort().reduce((t,e)=>t+e+i[e],e);return n.createHmac("sha1",t).update(Buffer.from(o,"utf-8")).digest("base64")}function getExpectedBodyHash(t){return n.createHash("sha256").update(Buffer.from(t,"utf-8")).digest("hex")}function validateRequest(t,e,i,n){e=e||"";const o=new c(i);const r=addPort(o);const a=removePort(o);const u=getExpectedTwilioSignature(t,r,n);const h=getExpectedTwilioSignature(t,a,n);const f=s(Buffer.from(e),Buffer.from(u));const p=s(Buffer.from(e),Buffer.from(h));return p||f}function validateBody(t,e){var i=getExpectedBodyHash(t);return s(Buffer.from(e),Buffer.from(i))}function validateRequestWithBody(t,e,i,n){const o=new c(i,true);return validateRequest(t,e,i,{})&&validateBody(n,o.query.bodySHA256)}function validateExpressRequest(t,e,i){var n=i||{};var o;if(n.url){o=n.url}else{var s=n.protocol||t.protocol;var c=n.host||t.headers.host;o=r.format({protocol:s,host:c,pathname:t.originalUrl});if(t.originalUrl.search(/\?/)>=0){o=o.replace(/%3F/g,"?");o=o.replace(/%3A/g,":");o=o.replace(/%40/g,"@")}}if(o.indexOf("bodySHA256")>0){return validateRequestWithBody(e,t.header("X-Twilio-Signature"),o,t.body||{})}else{return validateRequest(e,t.header("X-Twilio-Signature"),o,t.body||{})}}function webhook(){var t={validate:true};var e;for(var i=0,n=arguments.length;i{"use strict";var n=i(44742),o=i(13319),s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,r=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,c="[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]",a=new RegExp("^"+c+"+");function trimLeft(t){return(t?t:"").toString().replace(a,"")}var u=[["#","hash"],["?","query"],function sanitize(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",undefined,1,1],[/:(\d+)$/,"port",undefined,1],[NaN,"hostname",undefined,1,1]];var h={hash:1,query:1};function lolcation(t){var e;if(typeof window!=="undefined")e=window;else if(typeof global!=="undefined")e=global;else if(typeof self!=="undefined")e=self;else e={};var i=e.location||{};t=t||i;var n={},o=typeof t,r;if("blob:"===t.protocol){n=new Url(unescape(t.pathname),{})}else if("string"===o){n=new Url(t,{});for(r in h)delete n[r]}else if("object"===o){for(r in t){if(r in h)continue;n[r]=t[r]}if(n.slashes===undefined){n.slashes=s.test(t.href)}}return n}function extractProtocol(t){t=trimLeft(t);var e=r.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function resolve(t,e){if(t==="")return e;var i=(e||"/").split("/").slice(0,-1).concat(t.split("/")),n=i.length,o=i[n-1],s=false,r=0;while(n--){if(i[n]==="."){i.splice(n,1)}else if(i[n]===".."){i.splice(n,1);r++}else if(r){if(n===0)s=true;i.splice(n,1);r--}}if(s)i.unshift("");if(o==="."||o==="..")i.push("");return i.join("/")}function Url(t,e,i){t=trimLeft(t);if(!(this instanceof Url)){return new Url(t,e,i)}var s,r,c,a,h,f,p=u.slice(),d=typeof e,l=this,v=0;if("object"!==d&&"string"!==d){i=e;e=null}if(i&&"function"!==typeof i)i=o.parse;e=lolcation(e);r=extractProtocol(t||"");s=!r.protocol&&!r.slashes;l.slashes=r.slashes||s&&e.slashes;l.protocol=r.protocol||e.protocol||"";t=r.rest;if(!r.slashes)p[3]=[/(.*)/,"pathname"];for(;v{(function WeakMapModule(){"use strict";if(typeof ses!=="undefined"&&ses.ok&&!ses.ok()){return}function weakMapPermitHostObjects(t){if(t.permitHostObjects___){t.permitHostObjects___(weakMapPermitHostObjects)}}if(typeof ses!=="undefined"){ses.weakMapPermitHostObjects=weakMapPermitHostObjects}var e=false;if(typeof WeakMap==="function"){var i=WeakMap;if(typeof navigator!=="undefined"&&/Firefox/.test(navigator.userAgent)){}else{var n=new i;var o=Object.freeze({});n.set(o,1);if(n.get(o)!==1){e=true}else{t.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty;var r=Object.getOwnPropertyNames;var c=Object.defineProperty;var a=Object.isExtensible;var u="weakmap:";var h=u+"ident:"+Math.random()+"___";if(typeof crypto!=="undefined"&&typeof crypto.getRandomValues==="function"&&typeof ArrayBuffer==="function"&&typeof Uint8Array==="function"){var f=new ArrayBuffer(25);var p=new Uint8Array(f);crypto.getRandomValues(p);h=u+"rand:"+Array.prototype.map.call(p,function(t){return(t%36).toString(36)}).join("")+"___"}function isNotHiddenName(t){return!(t.substr(0,u.length)==u&&t.substr(t.length-3)==="___")}c(Object,"getOwnPropertyNames",{value:function fakeGetOwnPropertyNames(t){return r(t).filter(isNotHiddenName)}});if("getPropertyNames"in Object){var d=Object.getPropertyNames;c(Object,"getPropertyNames",{value:function fakeGetPropertyNames(t){return d(t).filter(isNotHiddenName)}})}function getHiddenRecord(t){if(t!==Object(t)){throw new TypeError("Not an object: "+t)}var e=t[h];if(e&&e.key===t){return e}if(!a(t)){return void 0}e={key:t};try{c(t,h,{value:e,writable:false,enumerable:false,configurable:false});return e}catch(t){return void 0}}(function(){var t=Object.freeze;c(Object,"freeze",{value:function identifyingFreeze(e){getHiddenRecord(e);return t(e)}});var e=Object.seal;c(Object,"seal",{value:function identifyingSeal(t){getHiddenRecord(t);return e(t)}});var i=Object.preventExtensions;c(Object,"preventExtensions",{value:function identifyingPreventExtensions(t){getHiddenRecord(t);return i(t)}})})();function constFunc(t){t.prototype=null;return Object.freeze(t)}var l=false;function calledAsFunctionWarning(){if(!l&&typeof console!=="undefined"){l=true;console.warn("WeakMap should be invoked as new WeakMap(), not "+"WeakMap(). This will be an error in the future.")}}var v=0;var m=function(){if(!(this instanceof m)){calledAsFunctionWarning()}var t=[];var e=[];var i=v++;function get___(n,o){var s;var r=getHiddenRecord(n);if(r){return i in r?r[i]:o}else{s=t.indexOf(n);return s>=0?e[s]:o}}function has___(e){var n=getHiddenRecord(e);if(n){return i in n}else{return t.indexOf(e)>=0}}function set___(n,o){var s;var r=getHiddenRecord(n);if(r){r[i]=o}else{s=t.indexOf(n);if(s>=0){e[s]=o}else{s=t.length;e[s]=o;t[s]=n}}return this}function delete___(n){var o=getHiddenRecord(n);var s,r;if(o){return i in o&&delete o[i]}else{s=t.indexOf(n);if(s<0){return false}r=t.length-1;t[s]=void 0;e[s]=e[r];t[s]=t[r];t.length=r;e.length=r;return true}}return Object.create(m.prototype,{get___:{value:constFunc(get___)},has___:{value:constFunc(has___)},set___:{value:constFunc(set___)},delete___:{value:constFunc(delete___)}})};m.prototype=Object.create(Object.prototype,{get:{value:function get(t,e){return this.get___(t,e)},writable:true,configurable:true},has:{value:function has(t){return this.has___(t)},writable:true,configurable:true},set:{value:function set(t,e){return this.set___(t,e)},writable:true,configurable:true},delete:{value:function remove(t){return this.delete___(t)},writable:true,configurable:true}});if(typeof i==="function"){(function(){if(e&&typeof Proxy!=="undefined"){Proxy=undefined}function DoubleWeakMap(){if(!(this instanceof m)){calledAsFunctionWarning()}var t=new i;var n=undefined;var o=false;function dget(e,i){if(n){return t.has(e)?t.get(e):n.get___(e,i)}else{return t.get(e,i)}}function dhas(e){return t.has(e)||(n?n.has___(e):false)}var s;if(e){s=function(e,i){t.set(e,i);if(!t.has(e)){if(!n){n=new m}n.set(e,i)}return this}}else{s=function(e,i){if(o){try{t.set(e,i)}catch(t){if(!n){n=new m}n.set___(e,i)}}else{t.set(e,i)}return this}}function ddelete(e){var i=!!t["delete"](e);if(n){return n.delete___(e)||i}return i}return Object.create(m.prototype,{get___:{value:constFunc(dget)},has___:{value:constFunc(dhas)},set___:{value:constFunc(s)},delete___:{value:constFunc(ddelete)},permitHostObjects___:{value:constFunc(function(t){if(t===weakMapPermitHostObjects){o=true}else{throw new Error("bogus call to permitHostObjects___")}})}})}DoubleWeakMap.prototype=m.prototype;t.exports=DoubleWeakMap;Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:false,configurable:true,writable:true})})()}else{if(typeof Proxy!=="undefined"){Proxy=undefined}t.exports=m}})()},52839:function(t){(function(){t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},29267:function(t){(function(){t.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},58229:function(t){(function(){var e,i,n,o,s,r,c,a={}.hasOwnProperty;e=function(t,...e){var i,n,o,r;if(s(Object.assign)){Object.assign.apply(null,arguments)}else{for(i=0,o=e.length;i"}else{return"attribute: {"+t+"}, parent: <"+this.parent.name+">"}}isEqualNode(t){if(t.namespaceURI!==this.namespaceURI){return false}if(t.prefix!==this.prefix){return false}if(t.localName!==this.localName){return false}if(t.value!==this.value){return false}return true}}Object.defineProperty(XMLAttribute.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLAttribute.prototype,"ownerElement",{get:function(){return this.parent}});Object.defineProperty(XMLAttribute.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}});Object.defineProperty(XMLAttribute.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLAttribute.prototype,"specified",{get:function(){return true}});return XMLAttribute}.call(this)}).call(this)},90333:function(t,e,i){(function(){var e,n,o;e=i(29267);o=i(87709);t.exports=n=class XMLCData extends o{constructor(t,i){super(t);if(i==null){throw new Error("Missing CDATA text. "+this.debugInfo())}this.name="#cdata-section";this.type=e.CData;this.value=this.stringify.cdata(i)}clone(){return Object.create(this)}toString(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))}}}).call(this)},87709:function(t,e,i){(function(){var e,n;n=i(67608);t.exports=e=function(){class XMLCharacterData extends n{constructor(t){super(t);this.value=""}clone(){return Object.create(this)}substringData(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendData(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}insertData(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}deleteData(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceData(t,e,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(t){if(!super.isEqualNode(t)){return false}if(t.data!==this.data){return false}return true}}Object.defineProperty(XMLCharacterData.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}});Object.defineProperty(XMLCharacterData.prototype,"length",{get:function(){return this.value.length}});Object.defineProperty(XMLCharacterData.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}});return XMLCharacterData}.call(this)}).call(this)},74407:function(t,e,i){(function(){var e,n,o;e=i(29267);n=i(87709);t.exports=o=class XMLComment extends n{constructor(t,i){super(t);if(i==null){throw new Error("Missing comment text. "+this.debugInfo())}this.name="#comment";this.type=e.Comment;this.value=this.stringify.comment(i)}clone(){return Object.create(this)}toString(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))}}}).call(this)},67465:function(t,e,i){(function(){var e,n,o;n=i(46744);o=i(97028);t.exports=e=function(){class XMLDOMConfiguration{constructor(){var t;this.defaultParams={"canonical-form":false,"cdata-sections":false,comments:false,"datatype-normalization":false,"element-content-whitespace":true,entities:true,"error-handler":new n,infoset:true,"validate-if-schema":false,namespaces:true,"namespace-declarations":true,"normalize-characters":false,"schema-location":"","schema-type":"","split-cdata-sections":true,validate:false,"well-formed":true};this.params=t=Object.create(this.defaultParams)}getParameter(t){if(this.params.hasOwnProperty(t)){return this.params[t]}else{return null}}canSetParameter(t,e){return true}setParameter(t,e){if(e!=null){return this.params[t]=e}else{return delete this.params[t]}}}Object.defineProperty(XMLDOMConfiguration.prototype,"parameterNames",{get:function(){return new o(Object.keys(this.defaultParams))}});return XMLDOMConfiguration}.call(this)}).call(this)},46744:function(t){(function(){var e;t.exports=e=class XMLDOMErrorHandler{constructor(){}handleError(t){throw new Error(t)}}}).call(this)},78310:function(t){(function(){var e;t.exports=e=class XMLDOMImplementation{hasFeature(t,e){return true}createDocumentType(t,e,i){throw new Error("This DOM method is not implemented.")}createDocument(t,e,i){throw new Error("This DOM method is not implemented.")}createHTMLDocument(t){throw new Error("This DOM method is not implemented.")}getFeature(t,e){throw new Error("This DOM method is not implemented.")}}}).call(this)},97028:function(t){(function(){var e;t.exports=e=function(){class XMLDOMStringList{constructor(t){this.arr=t||[]}item(t){return this.arr[t]||null}contains(t){return this.arr.indexOf(t)!==-1}}Object.defineProperty(XMLDOMStringList.prototype,"length",{get:function(){return this.arr.length}});return XMLDOMStringList}.call(this)}).call(this)},81015:function(t,e,i){(function(){var e,n,o;o=i(67608);e=i(29267);t.exports=n=class XMLDTDAttList extends o{constructor(t,i,n,o,s,r){super(t);if(i==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(n==null){throw new Error("Missing DTD attribute name. "+this.debugInfo(i))}if(!o){throw new Error("Missing DTD attribute type. "+this.debugInfo(i))}if(!s){throw new Error("Missing DTD attribute default. "+this.debugInfo(i))}if(s.indexOf("#")!==0){s="#"+s}if(!s.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)){throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(i))}if(r&&!s.match(/^(#FIXED|#DEFAULT)$/)){throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(i))}this.elementName=this.stringify.name(i);this.type=e.AttributeDeclaration;this.attributeName=this.stringify.name(n);this.attributeType=this.stringify.dtdAttType(o);if(r){this.defaultValue=this.stringify.dtdAttDefault(r)}this.defaultValueType=s}toString(t){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(t))}}}).call(this)},52421:function(t,e,i){(function(){var e,n,o;o=i(67608);e=i(29267);t.exports=n=class XMLDTDElement extends o{constructor(t,i,n){super(t);if(i==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(!n){n="(#PCDATA)"}if(Array.isArray(n)){n="("+n.join(",")+")"}this.name=this.stringify.name(i);this.type=e.ElementDeclaration;this.value=this.stringify.dtdElementValue(n)}toString(t){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(t))}}}).call(this)},40053:function(t,e,i){(function(){var e,n,o,s;({isObject:s}=i(58229));o=i(67608);e=i(29267);t.exports=n=function(){class XMLDTDEntity extends o{constructor(t,i,n,o){super(t);if(n==null){throw new Error("Missing DTD entity name. "+this.debugInfo(n))}if(o==null){throw new Error("Missing DTD entity value. "+this.debugInfo(n))}this.pe=!!i;this.name=this.stringify.name(n);this.type=e.EntityDeclaration;if(!s(o)){this.value=this.stringify.dtdEntityValue(o);this.internal=true}else{if(!o.pubID&&!o.sysID){throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n))}if(o.pubID&&!o.sysID){throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n))}this.internal=false;if(o.pubID!=null){this.pubID=this.stringify.dtdPubID(o.pubID)}if(o.sysID!=null){this.sysID=this.stringify.dtdSysID(o.sysID)}if(o.nData!=null){this.nData=this.stringify.dtdNData(o.nData)}if(this.pe&&this.nData){throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}}toString(t){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(t))}}Object.defineProperty(XMLDTDEntity.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDEntity.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDTDEntity.prototype,"notationName",{get:function(){return this.nData||null}});Object.defineProperty(XMLDTDEntity.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlVersion",{get:function(){return null}});return XMLDTDEntity}.call(this)}).call(this)},82837:function(t,e,i){(function(){var e,n,o;o=i(67608);e=i(29267);t.exports=n=function(){class XMLDTDNotation extends o{constructor(t,i,n){super(t);if(i==null){throw new Error("Missing DTD notation name. "+this.debugInfo(i))}if(!n.pubID&&!n.sysID){throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(i))}this.name=this.stringify.name(i);this.type=e.NotationDeclaration;if(n.pubID!=null){this.pubID=this.stringify.dtdPubID(n.pubID)}if(n.sysID!=null){this.sysID=this.stringify.dtdSysID(n.sysID)}}toString(t){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(t))}}Object.defineProperty(XMLDTDNotation.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDNotation.prototype,"systemId",{get:function(){return this.sysID}});return XMLDTDNotation}.call(this)}).call(this)},46364:function(t,e,i){(function(){var e,n,o,s;({isObject:s}=i(58229));o=i(67608);e=i(29267);t.exports=n=class XMLDeclaration extends o{constructor(t,i,n,o){super(t);if(s(i)){({version:i,encoding:n,standalone:o}=i)}if(!i){i="1.0"}this.type=e.Declaration;this.version=this.stringify.xmlVersion(i);if(n!=null){this.encoding=this.stringify.xmlEncoding(n)}if(o!=null){this.standalone=this.stringify.xmlStandalone(o)}}toString(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))}}}).call(this)},81801:function(t,e,i){(function(){var e,n,o,s,r,c,a,u,h;({isObject:h}=i(58229));u=i(67608);e=i(29267);n=i(81015);s=i(40053);o=i(52421);r=i(82837);a=i(4361);t.exports=c=function(){class XMLDocType extends u{constructor(t,i,n){var o,s,r,c;super(t);this.type=e.DocType;if(t.children){c=t.children;for(s=0,r=c.length;s=0){this.up()}return this.onEnd()}openCurrent(){if(this.currentNode){this.currentNode.children=true;return this.openNode(this.currentNode)}}openNode(t){var i,o,s,r;if(!t.isOpen){if(!this.root&&this.currentLevel===0&&t.type===e.Element){this.root=t}o="";if(t.type===e.Element){this.writerOptions.state=n.OpenTag;o=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<"+t.name;r=t.attribs;for(s in r){if(!O.call(r,s))continue;i=r[s];o+=this.writer.attribute(i,this.writerOptions,this.currentLevel)}o+=(t.children?">":"/>")+this.writer.endline(t,this.writerOptions,this.currentLevel);this.writerOptions.state=n.InsideTag}else{this.writerOptions.state=n.OpenTag;o=this.writer.indent(t,this.writerOptions,this.currentLevel)+""}o+=this.writer.endline(t,this.writerOptions,this.currentLevel)}this.onData(o,this.currentLevel);return t.isOpen=true}}closeNode(t){var i;if(!t.isClosed){i="";this.writerOptions.state=n.CloseTag;if(t.type===e.Element){i=this.writer.indent(t,this.writerOptions,this.currentLevel)+""+this.writer.endline(t,this.writerOptions,this.currentLevel)}else{i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(t,this.writerOptions,this.currentLevel)}this.writerOptions.state=n.None;this.onData(i,this.currentLevel);return t.isClosed=true}}onData(t,e){this.documentStarted=true;return this.onDataCallback(t,e+1)}onEnd(){this.documentCompleted=true;return this.onEndCallback()}debugInfo(t){if(t==null){return""}else{return"node: <"+t+">"}}ele(){return this.element(...arguments)}nod(t,e,i){return this.node(t,e,i)}txt(t){return this.text(t)}dat(t){return this.cdata(t)}com(t){return this.comment(t)}ins(t,e){return this.instruction(t,e)}dec(t,e,i){return this.declaration(t,e,i)}dtd(t,e,i){return this.doctype(t,e,i)}e(t,e,i){return this.element(t,e,i)}n(t,e,i){return this.node(t,e,i)}t(t){return this.text(t)}d(t){return this.cdata(t)}c(t){return this.comment(t)}r(t){return this.raw(t)}i(t,e){return this.instruction(t,e)}att(){if(this.currentNode&&this.currentNode.type===e.DocType){return this.attList(...arguments)}else{return this.attribute(...arguments)}}a(){if(this.currentNode&&this.currentNode.type===e.DocType){return this.attList(...arguments)}else{return this.attribute(...arguments)}}ent(t,e){return this.entity(t,e)}pent(t,e){return this.pEntity(t,e)}not(t,e){return this.notation(t,e)}}}).call(this)},43590:function(t,e,i){(function(){var e,n,o;o=i(67608);e=i(29267);t.exports=n=class XMLDummy extends o{constructor(t){super(t);this.type=e.Dummy}clone(){return Object.create(this)}toString(t){return""}}}).call(this)},9437:function(t,e,i){(function(){var e,n,o,s,r,c,a,u,h={}.hasOwnProperty;({isObject:u,isFunction:a,getValue:c}=i(58229));r=i(67608);e=i(29267);n=i(58376);s=i(4361);t.exports=o=function(){class XMLElement extends r{constructor(t,i,n){var o,s,r,c;super(t);if(i==null){throw new Error("Missing element name. "+this.debugInfo())}this.name=this.stringify.name(i);this.type=e.Element;this.attribs={};this.schemaTypeInfo=null;if(n!=null){this.attribute(n)}if(t.type===e.Document){this.isRoot=true;this.documentObject=t;t.rootObject=this;if(t.children){c=t.children;for(s=0,r=c.length;s=n;e=0<=n?++i:--i){if(!this.attribs[e].isEqualNode(t.attribs[e])){return false}}return true}}Object.defineProperty(XMLElement.prototype,"tagName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"attributes",{get:function(){if(!this.attributeMap||!this.attributeMap.nodes){this.attributeMap=new s(this.attribs)}return this.attributeMap}});return XMLElement}.call(this)}).call(this)},4361:function(t){(function(){var e;t.exports=e=function(){class XMLNamedNodeMap{constructor(t){this.nodes=t}clone(){return this.nodes=null}getNamedItem(t){return this.nodes[t]}setNamedItem(t){var e;e=this.nodes[t.nodeName];this.nodes[t.nodeName]=t;return e||null}removeNamedItem(t){var e;e=this.nodes[t];delete this.nodes[t];return e||null}item(t){return this.nodes[Object.keys(this.nodes)[t]]||null}getNamedItemNS(t,e){throw new Error("This DOM method is not implemented.")}setNamedItemNS(t){throw new Error("This DOM method is not implemented.")}removeNamedItemNS(t,e){throw new Error("This DOM method is not implemented.")}}Object.defineProperty(XMLNamedNodeMap.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}});return XMLNamedNodeMap}.call(this)}).call(this)},67608:function(t,e,i){(function(){var e,n,o,s,r,c,a,u,h,f,p,d,l,v,m,_,g,y,S={}.hasOwnProperty,b=[].splice;({isObject:y,isFunction:g,isEmpty:_,getValue:m}=i(58229));u=null;o=null;s=null;r=null;c=null;l=null;v=null;d=null;a=null;n=null;p=null;h=null;e=null;t.exports=f=function(){class XMLNode{constructor(t){this.parent=t;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}this.value=null;this.children=[];this.baseURI=null;if(!u){u=i(9437);o=i(90333);s=i(74407);r=i(46364);c=i(81801);l=i(16329);v=i(21318);d=i(56939);a=i(43590);n=i(29267);p=i(36768);h=i(4361);e=i(52839)}}setParent(t){var e,i,n,o,s;this.parent=t;if(t){this.options=t.options;this.stringify=t.stringify}o=this.children;s=[];for(i=0,n=o.length;i"}else if(!((i=this.parent)!=null?i.name:void 0)){return"node: <"+t+">"}else{return"node: <"+t+">, parent: <"+this.parent.name+">"}}ele(t,e,i){return this.element(t,e,i)}nod(t,e,i){return this.node(t,e,i)}txt(t){return this.text(t)}dat(t){return this.cdata(t)}com(t){return this.comment(t)}ins(t,e){return this.instruction(t,e)}doc(){return this.document()}dec(t,e,i){return this.declaration(t,e,i)}e(t,e,i){return this.element(t,e,i)}n(t,e,i){return this.node(t,e,i)}t(t){return this.text(t)}d(t){return this.cdata(t)}c(t){return this.comment(t)}r(t){return this.raw(t)}i(t,e){return this.instruction(t,e)}u(){return this.up()}importXMLBuilder(t){return this.importDocument(t)}attribute(t,e){throw new Error("attribute() applies to element nodes only.")}att(t,e){return this.attribute(t,e)}a(t,e){return this.attribute(t,e)}removeAttribute(t){throw new Error("attribute() applies to element nodes only.")}replaceChild(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeChild(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendChild(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasChildNodes(){return this.children.length!==0}cloneNode(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalize(){throw new Error("This DOM method is not implemented."+this.debugInfo())}isSupported(t,e){return true}hasAttributes(){return this.attribs.length!==0}compareDocumentPosition(t){var i,n;i=this;if(i===t){return 0}else if(this.document()!==t.document()){n=e.Disconnected|e.ImplementationSpecific;if(Math.random()<.5){n|=e.Preceding}else{n|=e.Following}return n}else if(i.isAncestor(t)){return e.Contains|e.Preceding}else if(i.isDescendant(t)){return e.Contains|e.Following}else if(i.isPreceding(t)){return e.Preceding}else{return e.Following}}isSameNode(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupPrefix(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}isDefaultNamespace(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupNamespaceURI(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(t){var e,i,n;if(t.nodeType!==this.nodeType){return false}if(t.children.length!==this.children.length){return false}for(e=i=0,n=this.children.length-1;0<=n?i<=n:i>=n;e=0<=n?++i:--i){if(!this.children[e].isEqualNode(t.children[e])){return false}}return true}getFeature(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}setUserData(t,e,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getUserData(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}contains(t){if(!t){return false}return t===this||this.isDescendant(t)}isDescendant(t){var e,i,n,o,s;s=this.children;for(n=0,o=s.length;ni}}treePosition(t){var e,i;i=0;e=false;this.foreachTreeNode(this.document(),function(n){i++;if(!e&&n===t){return e=true}});if(e){return i}else{return-1}}foreachTreeNode(t,e){var i,n,o,s,r;t||(t=this.document());s=t.children;for(n=0,o=s.length;n0){this.stream.write(" [");this.stream.write(this.endline(t,e,i));e.state=n.InsideTag;c=t.children;for(s=0,r=c.length;s");this.stream.write(this.endline(t,e,i));e.state=n.None;return this.closeNode(t,e,i)}element(t,i,o){var s,c,a,u,h,f,p,d,l,v,m,_,g,y,S,b;o||(o=0);this.openNode(t,i,o);i.state=n.OpenTag;m=this.indent(t,i,o)+"<"+t.name;if(i.pretty&&i.width>0){p=m.length;g=t.attribs;for(l in g){if(!r.call(g,l))continue;s=g[l];_=this.attribute(s,i,o);c=_.length;if(p+c>i.width){b=this.indent(t,i,o+1)+_;m+=this.endline(t,i,o)+b;p=b.length}else{b=" "+_;m+=b;p+=b.length}}}else{y=t.attribs;for(l in y){if(!r.call(y,l))continue;s=y[l];m+=this.attribute(s,i,o)}}this.stream.write(m);u=t.children.length;h=u===0?null:t.children[0];if(u===0||t.children.every(function(t){return(t.type===e.Text||t.type===e.Raw)&&t.value===""})){if(i.allowEmpty){this.stream.write(">");i.state=n.CloseTag;this.stream.write("")}else{i.state=n.CloseTag;this.stream.write(i.spaceBeforeSlash+"/>")}}else if(i.pretty&&u===1&&(h.type===e.Text||h.type===e.Raw)&&h.value!=null){this.stream.write(">");i.state=n.InsideTag;i.suppressPrettyCount++;v=true;this.writeChildNode(h,i,o+1);i.suppressPrettyCount--;v=false;i.state=n.CloseTag;this.stream.write("")}else{this.stream.write(">"+this.endline(t,i,o));i.state=n.InsideTag;S=t.children;for(f=0,d=S.length;f")}this.stream.write(this.endline(t,i,o));i.state=n.None;return this.closeNode(t,i,o)}processingInstruction(t,e,i){return this.stream.write(super.processingInstruction(t,e,i))}raw(t,e,i){return this.stream.write(super.raw(t,e,i))}text(t,e,i){return this.stream.write(super.text(t,e,i))}dtdAttList(t,e,i){return this.stream.write(super.dtdAttList(t,e,i))}dtdElement(t,e,i){return this.stream.write(super.dtdElement(t,e,i))}dtdEntity(t,e,i){return this.stream.write(super.dtdEntity(t,e,i))}dtdNotation(t,e,i){return this.stream.write(super.dtdNotation(t,e,i))}}}).call(this)},85913:function(t,e,i){(function(){var e,n;n=i(66752);t.exports=e=class XMLStringWriter extends n{constructor(t){super(t)}document(t,e){var i,n,o,s,r;e=this.filterOptions(e);s="";r=t.children;for(n=0,o=r.length;n","]]]]>");return this.assertLegalChar(t)}comment(t){if(this.options.noValidation){return t}t=""+t||"";if(t.match(/--/)){throw new Error("Comment text cannot contain double-hypen: "+t)}return this.assertLegalChar(t)}raw(t){if(this.options.noValidation){return t}return""+t||""}attValue(t){if(this.options.noValidation){return t}return this.assertLegalChar(this.attEscape(t=""+t||""))}insTarget(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}insValue(t){if(this.options.noValidation){return t}t=""+t||"";if(t.match(/\?>/)){throw new Error("Invalid processing instruction value: "+t)}return this.assertLegalChar(t)}xmlVersion(t){if(this.options.noValidation){return t}t=""+t||"";if(!t.match(/1\.[0-9]+/)){throw new Error("Invalid version number: "+t)}return t}xmlEncoding(t){if(this.options.noValidation){return t}t=""+t||"";if(!t.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)){throw new Error("Invalid encoding: "+t)}return this.assertLegalChar(t)}xmlStandalone(t){if(this.options.noValidation){return t}if(t){return"yes"}else{return"no"}}dtdPubID(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdSysID(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdElementValue(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdAttType(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdAttDefault(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdEntityValue(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}dtdNData(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")}assertLegalChar(t){var e,i;if(this.options.noValidation){return t}e="";if(this.options.version==="1.0"){e=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(i=t.match(e)){throw new Error(`Invalid character in string: ${t} at index ${i.index}`)}}else if(this.options.version==="1.1"){e=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(i=t.match(e)){throw new Error(`Invalid character in string: ${t} at index ${i.index}`)}}return t}assertLegalName(t){var e;if(this.options.noValidation){return t}this.assertLegalChar(t);e=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;if(!t.match(e)){throw new Error("Invalid character in name")}return t}textEscape(t){var e;if(this.options.noValidation){return t}e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return t.replace(e,"&").replace(//g,">").replace(/\r/g," ")}attEscape(t){var e;if(this.options.noValidation){return t}e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return t.replace(e,"&").replace(/0){return new Array(n).join(e.indent)}}return""}endline(t,e,i){if(!e.pretty||e.suppressPrettyCount){return""}else{return e.newline}}attribute(t,e,i){var n;this.openAttribute(t,e,i);if(e.pretty&&e.width>0){n=t.name+'="'+t.value+'"'}else{n=" "+t.name+'="'+t.value+'"'}this.closeAttribute(t,e,i);return n}cdata(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+""+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}comment(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+"\x3c!-- ";e.state=n.InsideTag;o+=t.value;e.state=n.CloseTag;o+=" --\x3e"+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}declaration(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+"";o+=this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}docType(t,e,i){var o,s,r,c,a;i||(i=0);this.openNode(t,e,i);e.state=n.OpenTag;c=this.indent(t,e,i);c+="0){c+=" [";c+=this.endline(t,e,i);e.state=n.InsideTag;a=t.children;for(s=0,r=a.length;s";c+=this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return c}element(t,i,o){var s,r,c,a,u,h,f,p,d,l,v,m,_,g,S,b,w,L,I;o||(o=0);m=false;this.openNode(t,i,o);i.state=n.OpenTag;_=this.indent(t,i,o)+"<"+t.name;if(i.pretty&&i.width>0){p=_.length;S=t.attribs;for(v in S){if(!y.call(S,v))continue;s=S[v];g=this.attribute(s,i,o);r=g.length;if(p+r>i.width){I=this.indent(t,i,o+1)+g;_+=this.endline(t,i,o)+I;p=I.length}else{I=" "+g;_+=I;p+=I.length}}}else{b=t.attribs;for(v in b){if(!y.call(b,v))continue;s=b[v];_+=this.attribute(s,i,o)}}a=t.children.length;u=a===0?null:t.children[0];if(a===0||t.children.every(function(t){return(t.type===e.Text||t.type===e.Raw)&&t.value===""})){if(i.allowEmpty){_+=">";i.state=n.CloseTag;_+=""+this.endline(t,i,o)}else{i.state=n.CloseTag;_+=i.spaceBeforeSlash+"/>"+this.endline(t,i,o)}}else if(i.pretty&&a===1&&(u.type===e.Text||u.type===e.Raw)&&u.value!=null){_+=">";i.state=n.InsideTag;i.suppressPrettyCount++;m=true;_+=this.writeChildNode(u,i,o+1);i.suppressPrettyCount--;m=false;i.state=n.CloseTag;_+=""+this.endline(t,i,o)}else{if(i.dontPrettyTextNodes){w=t.children;for(h=0,d=w.length;h"+this.endline(t,i,o);i.state=n.InsideTag;L=t.children;for(f=0,l=L.length;f";if(m){i.suppressPrettyCount--}_+=this.endline(t,i,o);i.state=n.None}this.closeNode(t,i,o);return _}writeChildNode(t,i,n){switch(t.type){case e.CData:return this.cdata(t,i,n);case e.Comment:return this.comment(t,i,n);case e.Element:return this.element(t,i,n);case e.Raw:return this.raw(t,i,n);case e.Text:return this.text(t,i,n);case e.ProcessingInstruction:return this.processingInstruction(t,i,n);case e.Dummy:return"";case e.Declaration:return this.declaration(t,i,n);case e.DocType:return this.docType(t,i,n);case e.AttributeDeclaration:return this.dtdAttList(t,i,n);case e.ElementDeclaration:return this.dtdElement(t,i,n);case e.EntityDeclaration:return this.dtdEntity(t,i,n);case e.NotationDeclaration:return this.dtdNotation(t,i,n);default:throw new Error("Unknown XML node type: "+t.constructor.name)}}processingInstruction(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+"";o+=this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}raw(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i);e.state=n.InsideTag;o+=t.value;e.state=n.CloseTag;o+=this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}text(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i);e.state=n.InsideTag;o+=t.value;e.state=n.CloseTag;o+=this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}dtdAttList(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+""+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}dtdElement(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+""+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}dtdEntity(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+""+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}dtdNotation(t,e,i){var o;this.openNode(t,e,i);e.state=n.OpenTag;o=this.indent(t,e,i)+""+this.endline(t,e,i);e.state=n.None;this.closeNode(t,e,i);return o}openNode(t,e,i){}closeNode(t,e,i){}openAttribute(t,e,i){}closeAttribute(t,e,i){}}}).call(this)},52958:function(t,e,i){(function(){var e,n,o,s,r,c,a,u,h;({assign:u,isFunction:h}=i(58229));o=i(78310);s=i(53730);r=i(77356);a=i(85913);c=i(78601);e=i(29267);n=i(9766);t.exports.create=function(t,e,i,n){var o,r;if(t==null){throw new Error("Root element needs a name.")}n=u({},e,i,n);o=new s(n);r=o.element(t);if(!n.headless){o.declaration(n);if(n.pubID!=null||n.sysID!=null){o.dtd(n)}}return r};t.exports.begin=function(t,e,i){if(h(t)){[e,i]=[t,e];t={}}if(e){return new r(t,e,i)}else{return new s(t)}};t.exports.stringWriter=function(t){return new a(t)};t.exports.streamWriter=function(t,e){return new c(t,e)};t.exports.implementation=new o;t.exports.nodeType=e;t.exports.writerState=n}).call(this)},6144:function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){if(n===undefined)n=i;Object.defineProperty(t,n,{enumerable:true,get:function(){return e[i]}})}:function(t,e,i,n){if(n===undefined)n=i;t[n]=e[i]});var o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i))n(e,t,i);o(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.main=void 0;const r=s(i(42186));const c=s(i(75595));const a=async()=>{try{const t=await c.default(r.getInput("twilio_account_sid"),r.getInput("twilio_auth_token"),{lazyLoading:true}).fax.faxes.create({from:r.getInput("from"),to:r.getInput("to"),mediaUrl:r.getInput("url")});r.setOutput("sid",t.sid)}catch({message:t}){r.setFailed(t)}};e.main=a;e.main()},20696:t=>{"use strict";t.exports=JSON.parse('{"name":"axios","version":"0.19.2","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test && bundlesize","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://github.com/axios/axios","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"typings":"./index.d.ts","dependencies":{"follow-redirects":"1.5.10"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},87751:t=>{"use strict";t.exports=JSON.parse('{"name":"twilio","description":"A Twilio helper library","version":"3.54.1","author":"API Team ","contributors":[{"name":"twilio-node contributors","url":"https://github.com/twilio/twilio-node/graphs/contributors"}],"keywords":["twilio","sms","rest","api"],"repository":{"type":"git","url":"https://github.com/twilio/twilio-node.git"},"peerDependencies":{"@types/express":"^4.17.7","@types/qs":"6.9.4"},"dependencies":{"axios":"^0.19.2","dayjs":"^1.8.29","jsonwebtoken":"^8.5.1","lodash":"^4.17.19","q":"2.0.x","qs":"^6.9.4","rootpath":"^0.1.2","scmp":"^2.1.0","url-parse":"^1.4.7","xmlbuilder":"^13.0.2"},"devDependencies":{"@types/express":"^4.17.7","@types/qs":"6.9.4","@types/lodash":"4.14.112","@types/node":"9.6.57","eslint":"^7.3.1","express":"^4.17.1","jasmine":"~3.5.0","jsdoc":"^3.6.4","jshint":"^2.11.0","mock-fs":"^4.12.0","nock":"^10.0.6","node-mocks-http":"^1.8.1","proxyquire":"^2.1.3","typescript":"^2.8.3"},"scripts":{"test":"npm run test:javascript && npm run test:typescript","test:javascript":"jasmine spec/**/**.spec.js","test:typescript":"tsc examples/typescript/example.ts --noEmit --strict","jshint":"jshint lib/rest/** lib/base/** lib/http/**","jscs":"eslint lib/base/**/**.js lib/http/**/**.js --fix","check":"npm run jshint && npm run jscs","ci":"npm test && npm run nsp","jsdoc":"jsdoc -r lib -d docs","nsp":"if [ `npm --version | cut -d\'.\' -f1` -ge \\"6\\" ]; then npm audit; else echo \\"npm audit is not available for npm < 6.0\\"; fi"},"files":["lib","index.js","index.d.ts"],"main":"./lib","types":"./index.d.ts","engines":{"node":">=6.0"},"license":"MIT"}')},42357:t=>{"use strict";t.exports=require("assert")},64293:t=>{"use strict";t.exports=require("buffer")},76417:t=>{"use strict";t.exports=require("crypto")},85229:t=>{"use strict";t.exports=require("domain")},35747:t=>{"use strict";t.exports=require("fs")},98605:t=>{"use strict";t.exports=require("http")},57211:t=>{"use strict";t.exports=require("https")},12087:t=>{"use strict";t.exports=require("os")},85622:t=>{"use strict";t.exports=require("path")},71191:t=>{"use strict";t.exports=require("querystring")},92413:t=>{"use strict";t.exports=require("stream")},33867:t=>{"use strict";t.exports=require("tty")},78835:t=>{"use strict";t.exports=require("url")},31669:t=>{"use strict";t.exports=require("util")},78761:t=>{"use strict";t.exports=require("zlib")}};var e={};function __webpack_require__(i){if(e[i]){return e[i].exports}var n=e[i]={id:i,loaded:false,exports:{}};var o=true;try{t[i].call(n.exports,n,n.exports,__webpack_require__);o=false}finally{if(o)delete e[i]}n.loaded=true;return n.exports}(()=>{__webpack_require__.nmd=(t=>{t.paths=[];if(!t.children)t.children=[];return t})})();__webpack_require__.ab=__dirname+"/";return __webpack_require__(6144)})(); \ No newline at end of file diff --git a/package.json b/package.json index 2791ffa..4f07789 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "twilio-fax-action", - "version": "1.0.5", + "version": "1.0.6", "description": "This GitHub action sends fax with the defined text.", "main": "dist/index.js", "repository": { @@ -20,7 +20,7 @@ }, "scripts": { "build": "ncc build -m src/index.ts", - "lint": "eslint --ext ts src", + "lint": "eslint --config .github/linters/.eslintrc.json --ext ts src", "security:auth": "snyk auth", "security:test": "snyk test", "test": "jest --config=jest.config.json --coverage", @@ -34,25 +34,19 @@ }, "devDependencies": { "@types/jest": "26.0.19", - "@types/node": "14.14.16", - "@typescript-eslint/eslint-plugin": "4.11.0", - "@typescript-eslint/parser": "4.11.0", + "@types/node": "14.14.17", + "@typescript-eslint/eslint-plugin": "4.11.1", + "@typescript-eslint/parser": "4.11.1", "@vercel/ncc": "0.26.1", "eslint": "7.16.0", "eslint-config-google": "0.14.0", "git-branch-is": "4.0.0", - "husky": "4.3.6", + "husky": "5.0.6", "jest": "26.6.3", "jest-circus": "26.6.3", "snyk": "1.437.3", "ts-jest": "26.4.4", "typescript": "4.1.3" }, - "snyk": true, - "husky": { - "hooks": { - "pre-commit": "git-branch-is --not main && yarn run build && git add dist/index.js", - "pre-push": "yarn run lint && yarn test" - } - } + "snyk": true } diff --git a/yarn.lock b/yarn.lock index 09262db..7117a90 100644 --- a/yarn.lock +++ b/yarn.lock @@ -486,25 +486,25 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@nodelib/fs.scandir@2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" - integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== +"@nodelib/fs.scandir@2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" + integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== dependencies: - "@nodelib/fs.stat" "2.0.3" + "@nodelib/fs.stat" "2.0.4" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" - integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== +"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" + integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== "@nodelib/fs.walk@^1.2.3": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" - integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + version "1.2.6" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" + integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== dependencies: - "@nodelib/fs.scandir" "2.1.3" + "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" "@octetstream/promisify@2.0.2": @@ -815,10 +815,10 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@14.14.16": - version "14.14.16" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.16.tgz#3cc351f8d48101deadfed4c9e4f116048d437b4b" - integrity sha512-naXYePhweTi+BMv11TgioE2/FXU4fSl29HAH1ffxVciNsH3rYXjNP2yM8wqmSm7jS20gM8TIklKiTen+1iVncw== +"@types/node@*", "@types/node@14.14.17": + version "14.14.17" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.17.tgz#29fab92f3986c0e379968ad3c2043683d8020dbb" + integrity sha512-G0lD1/7qD60TJ/mZmhog76k7NcpLWkPVGgzkRy3CTlnFu4LUQh5v2Wa661z6vnXmD8EQrnALUyf0VRtrACYztw== "@types/node@^6.14.4", "@types/node@^6.14.7": version "6.14.13" @@ -830,11 +830,6 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - "@types/prettier@^2.0.0": version "2.1.6" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.6.tgz#f4b1efa784e8db479cdb8b14403e2144b1e9ff03" @@ -869,61 +864,61 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.11.0.tgz#bc6c1e4175c0cf42083da4314f7931ad12f731cc" - integrity sha512-x4arJMXBxyD6aBXLm3W7mSDZRiABzy+2PCLJbL7OPqlp53VXhaA1HKK7R2rTee5OlRhnUgnp8lZyVIqjnyPT6g== +"@typescript-eslint/eslint-plugin@4.11.1": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.11.1.tgz#7579c6d17ad862154c10bc14b40e5427b729e209" + integrity sha512-fABclAX2QIEDmTMk6Yd7Muv1CzFLwWM4505nETzRHpP3br6jfahD9UUJkhnJ/g2m7lwfz8IlswcwGGPGiq9exw== dependencies: - "@typescript-eslint/experimental-utils" "4.11.0" - "@typescript-eslint/scope-manager" "4.11.0" + "@typescript-eslint/experimental-utils" "4.11.1" + "@typescript-eslint/scope-manager" "4.11.1" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.11.0.tgz#d1a47cc6cfe1c080ce4ead79267574b9881a1565" - integrity sha512-1VC6mSbYwl1FguKt8OgPs8xxaJgtqFpjY/UzUYDBKq4pfQ5lBvN2WVeqYkzf7evW42axUHYl2jm9tNyFsb8oLg== +"@typescript-eslint/experimental-utils@4.11.1": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.11.1.tgz#2dad3535b878c25c7424e40bfa79d899f3f485bc" + integrity sha512-mAlWowT4A6h0TC9F+J5pdbEhjNiEMO+kqPKQ4sc3fVieKL71dEqfkKgtcFVSX3cjSBwYwhImaQ/mXQF0oaI38g== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.11.0" - "@typescript-eslint/types" "4.11.0" - "@typescript-eslint/typescript-estree" "4.11.0" + "@typescript-eslint/scope-manager" "4.11.1" + "@typescript-eslint/types" "4.11.1" + "@typescript-eslint/typescript-estree" "4.11.1" eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.11.0.tgz#1dd3d7e42708c10ce9f3aa64c63c0ab99868b4e2" - integrity sha512-NBTtKCC7ZtuxEV5CrHUO4Pg2s784pvavc3cnz6V+oJvVbK4tH9135f/RBP6eUA2KHiFKAollSrgSctQGmHbqJQ== +"@typescript-eslint/parser@4.11.1": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.11.1.tgz#981e18de2e019d6ca312596615f92e8f6f6598ed" + integrity sha512-BJ3jwPQu1jeynJ5BrjLuGfK/UJu6uwHxJ/di7sanqmUmxzmyIcd3vz58PMR7wpi8k3iWq2Q11KMYgZbUpRoIPw== dependencies: - "@typescript-eslint/scope-manager" "4.11.0" - "@typescript-eslint/types" "4.11.0" - "@typescript-eslint/typescript-estree" "4.11.0" + "@typescript-eslint/scope-manager" "4.11.1" + "@typescript-eslint/types" "4.11.1" + "@typescript-eslint/typescript-estree" "4.11.1" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.11.0.tgz#2d906537db8a3a946721699e4fc0833810490254" - integrity sha512-6VSTm/4vC2dHM3ySDW9Kl48en+yLNfVV6LECU8jodBHQOhO8adAVizaZ1fV0QGZnLQjQ/y0aBj5/KXPp2hBTjA== +"@typescript-eslint/scope-manager@4.11.1": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.11.1.tgz#72dc2b60b0029ab0888479b12bf83034920b4b69" + integrity sha512-Al2P394dx+kXCl61fhrrZ1FTI7qsRDIUiVSuN6rTwss6lUn8uVO2+nnF4AvO0ug8vMsy3ShkbxLu/uWZdTtJMQ== dependencies: - "@typescript-eslint/types" "4.11.0" - "@typescript-eslint/visitor-keys" "4.11.0" + "@typescript-eslint/types" "4.11.1" + "@typescript-eslint/visitor-keys" "4.11.1" -"@typescript-eslint/types@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.11.0.tgz#86cf95e7eac4ccfd183f9fcf1480cece7caf4ca4" - integrity sha512-XXOdt/NPX++txOQHM1kUMgJUS43KSlXGdR/aDyEwuAEETwuPt02Nc7v+s57PzuSqMbNLclblQdv3YcWOdXhQ7g== +"@typescript-eslint/types@4.11.1": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.11.1.tgz#3ba30c965963ef9f8ced5a29938dd0c465bd3e05" + integrity sha512-5kvd38wZpqGY4yP/6W3qhYX6Hz0NwUbijVsX2rxczpY6OXaMxh0+5E5uLJKVFwaBM7PJe1wnMym85NfKYIh6CA== -"@typescript-eslint/typescript-estree@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.11.0.tgz#1144d145841e5987d61c4c845442a24b24165a4b" - integrity sha512-eA6sT5dE5RHAFhtcC+b5WDlUIGwnO9b0yrfGa1mIOIAjqwSQCpXbLiFmKTdRbQN/xH2EZkGqqLDrKUuYOZ0+Hg== +"@typescript-eslint/typescript-estree@4.11.1": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.11.1.tgz#a4416b4a65872a48773b9e47afabdf7519eb10bc" + integrity sha512-tC7MKZIMRTYxQhrVAFoJq/DlRwv1bnqA4/S2r3+HuHibqvbrPcyf858lNzU7bFmy4mLeIHFYr34ar/1KumwyRw== dependencies: - "@typescript-eslint/types" "4.11.0" - "@typescript-eslint/visitor-keys" "4.11.0" + "@typescript-eslint/types" "4.11.1" + "@typescript-eslint/visitor-keys" "4.11.1" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -931,12 +926,12 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.11.0.tgz#906669a50f06aa744378bb84c7d5c4fdbc5b7d51" - integrity sha512-tRYKyY0i7cMk6v4UIOCjl1LhuepC/pc6adQqJk4Is3YcC6k46HvsV9Wl7vQoLbm9qADgeujiT7KdLrylvFIQ+A== +"@typescript-eslint/visitor-keys@4.11.1": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.11.1.tgz#4c050a4c1f7239786e2dd4e69691436143024e05" + integrity sha512-IrlBhD9bm4bdYcS8xpWarazkKXlE7iYb1HzRuyBP114mIaj5DJPo11Us1HgH60dTt41TCZXMaTCAW+OILIYPOg== dependencies: - "@typescript-eslint/types" "4.11.0" + "@typescript-eslint/types" "4.11.1" eslint-visitor-keys "^2.0.0" "@vercel/ncc@0.26.1": @@ -1597,11 +1592,6 @@ commander@^6.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -compare-versions@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" - integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== - component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" @@ -1641,17 +1631,6 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" - integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -1716,9 +1695,9 @@ data-urls@^2.0.0: whatwg-url "^8.0.0" dayjs@^1.8.29: - version "1.9.7" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.9.7.tgz#4b260bb17dceed2d5f29038dfee03c65a6786fc0" - integrity sha512-IC877KBdMhBrCfBfJXHQlo0G8keZ0Opy7YIIq5QKtUbCuHMzim8S4PyiVK4YmihI3iOF9lhfUBW4AQWHTR5WHA== + version "1.9.8" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.9.8.tgz#9a65fbdca037e3d5835f98672da6e796f757cd58" + integrity sha512-F42qBtJRa30FKF7XDnOQyNUTsaxDkuaZRj/i7BejSHC34LlLfPoIU4aeopvWfM+m1dJ6/DHKAWLg2ur+pLgq1w== debug@2, debug@^2.2.0, debug@^2.3.3: version "2.6.9" @@ -2371,13 +2350,6 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-versions@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e" - integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww== - dependencies: - semver-regex "^2.0.0" - flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -2774,21 +2746,10 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== -husky@4.3.6: - version "4.3.6" - resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.6.tgz#ebd9dd8b9324aa851f1587318db4cccb7665a13c" - integrity sha512-o6UjVI8xtlWRL5395iWq9LKDyp/9TE7XMOTvIpEVzW638UcGxTmV5cfel6fsk/jbZSTlvfGVJf2svFtybcIZag== - dependencies: - chalk "^4.0.0" - ci-info "^2.0.0" - compare-versions "^3.6.0" - cosmiconfig "^7.0.0" - find-versions "^3.2.0" - opencollective-postinstall "^2.0.2" - pkg-dir "^4.2.0" - please-upgrade-node "^3.2.0" - slash "^3.0.0" - which-pm-runs "^1.0.0" +husky@5.0.6: + version "5.0.6" + resolved "https://registry.yarnpkg.com/husky/-/husky-5.0.6.tgz#27dbefe8603c6c0912fd89a3a67edfed9fac8bb9" + integrity sha512-SM+evfvcHT3rAYJKvPlatz3L5RqzgeM6xIvDjhs8VuhKj6iKqFDOt/Ov8sPjvWuE4FDB385gJBwWXRj7G3c1hg== iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: version "0.4.24" @@ -4296,11 +4257,6 @@ open@^7.0.3: is-docker "^2.0.0" is-wsl "^2.1.1" -opencollective-postinstall@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" - integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== - optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -4524,13 +4480,6 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -please-upgrade-node@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" - integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== - dependencies: - semver-compare "^1.0.0" - pop-iterate@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/pop-iterate/-/pop-iterate-1.0.1.tgz#ceacfdab4abf353d7a0f2aaa2c1fc7b3f9413ba3" @@ -5030,11 +4979,6 @@ scmp@^2.1.0: resolved "https://registry.yarnpkg.com/scmp/-/scmp-2.1.0.tgz#37b8e197c425bdeb570ab91cc356b311a11f9c9a" integrity sha512-o/mRQGk9Rcer/jEEw/yw4mwo3EU/NvYvp577/Btqrym9Qy5/MdWGBqipbALgd2lrdWTJ5/gqDusxfnQBxOxT2Q== -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" - integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= - semver-diff@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" @@ -5042,11 +4986,6 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -semver-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" - integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== - "semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -5791,9 +5730,9 @@ table@^6.0.4: string-width "^4.2.0" tar-stream@^2.1.0, tar-stream@^2.1.2: - version "2.1.4" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.4.tgz#c4fb1a11eb0da29b893a5b25476397ba2d053bfa" - integrity sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw== + version "2.2.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== dependencies: bl "^4.0.3" end-of-stream "^1.4.1" @@ -6290,11 +6229,6 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which-pm-runs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" - integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= - which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -6362,9 +6296,9 @@ write-file-atomic@^3.0.0: typedarray-to-buffer "^3.1.5" ws@^7.2.3: - version "7.4.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.1.tgz#a333be02696bd0e54cea0434e21dcc8a9ac294bb" - integrity sha512-pTsP8UAfhy3sk1lSk/O/s4tjD0CRwvMnzvwr4OKGX7ZvqZtUyx4KIJB5JWbkykPoc55tixMGgTNoh3k4FkNGFQ== + version "7.4.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.2.tgz#782100048e54eb36fe9843363ab1c68672b261dd" + integrity sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA== xdg-basedir@^4.0.0: version "4.0.0" @@ -6436,7 +6370,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0, yaml@^1.9.2: +yaml@^1.9.2: version "1.10.0" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==